Home | History | Annotate | Download | only in test

Lines Matching refs:RE

410 // Defines StringTypes as the list of all string types that class RE
421 // Tests RE's implicit constructors.
423 const RE empty(TypeParam(""));
426 const RE simple(TypeParam("hello"));
429 const RE normal(TypeParam(".*(\\w+)"));
433 // Tests that RE's constructors reject invalid regular expressions.
436 const RE invalid(TypeParam("?"));
440 // Tests RE::FullMatch().
442 const RE empty(TypeParam(""));
443 EXPECT_TRUE(RE::FullMatch(TypeParam(""), empty));
444 EXPECT_FALSE(RE::FullMatch(TypeParam("a"), empty));
446 const RE re(TypeParam("a.*z"));
447 EXPECT_TRUE(RE::FullMatch(TypeParam("az"), re));
448 EXPECT_TRUE(RE::FullMatch(TypeParam("axyz"), re));
449 EXPECT_FALSE(RE::FullMatch(TypeParam("baz"), re));
450 EXPECT_FALSE(RE::FullMatch(TypeParam("azy"), re));
453 // Tests RE::PartialMatch().
455 const RE empty(TypeParam(""));
456 EXPECT_TRUE(RE::PartialMatch(TypeParam(""), empty));
457 EXPECT_TRUE(RE::PartialMatch(TypeParam("a"), empty));
459 const RE re(TypeParam("a.*z"));
460 EXPECT_TRUE(RE::PartialMatch(TypeParam("az"), re));
461 EXPECT_TRUE(RE::PartialMatch(TypeParam("axyz"), re));
462 EXPECT_TRUE(RE::PartialMatch(TypeParam("baz"), re));
463 EXPECT_TRUE(RE::PartialMatch(TypeParam("azy"), re));
464 EXPECT_FALSE(RE::PartialMatch(TypeParam("zza"), re));
879 // Tests RE's implicit constructors.
881 const RE empty("");
884 const RE simple("hello");
888 // Tests that RE's constructors reject invalid regular expressions.
891 const RE normal(NULL);
895 const RE normal(".*(\\w+");
899 const RE invalid("^?");
903 // Tests RE::FullMatch().
905 const RE empty("");
906 EXPECT_TRUE(RE::FullMatch("", empty));
907 EXPECT_FALSE(RE::FullMatch("a", empty));
909 const RE re1("a");
910 EXPECT_TRUE(RE::FullMatch("a", re1));
912 const RE re("a.*z");
913 EXPECT_TRUE(RE::FullMatch("az", re));
914 EXPECT_TRUE(RE::FullMatch("axyz", re));
915 EXPECT_FALSE(RE::FullMatch("baz", re));
916 EXPECT_FALSE(RE::FullMatch("azy", re));
919 // Tests RE::PartialMatch().
921 const RE empty("");
922 EXPECT_TRUE(RE::PartialMatch("", empty));
923 EXPECT_TRUE(RE::PartialMatch("a", empty));
925 const RE re("a.*z");
926 EXPECT_TRUE(RE::PartialMatch("az", re));
927 EXPECT_TRUE(RE::PartialMatch("axyz", re));
928 EXPECT_TRUE(RE::PartialMatch("baz", re));
929 EXPECT_TRUE(RE::PartialMatch("azy", re));
930 EXPECT_FALSE(RE::PartialMatch("zza", re));