Home | History | Annotate | Download | only in test

Lines Matching refs:RE

405 // Defines StringTypes as the list of all string types that class RE
416 // Tests RE's implicit constructors.
418 const RE empty(TypeParam(""));
421 const RE simple(TypeParam("hello"));
424 const RE normal(TypeParam(".*(\\w+)"));
428 // Tests that RE's constructors reject invalid regular expressions.
431 const RE invalid(TypeParam("?"));
435 // Tests RE::FullMatch().
437 const RE empty(TypeParam(""));
438 EXPECT_TRUE(RE::FullMatch(TypeParam(""), empty));
439 EXPECT_FALSE(RE::FullMatch(TypeParam("a"), empty));
441 const RE re(TypeParam("a.*z"));
442 EXPECT_TRUE(RE::FullMatch(TypeParam("az"), re));
443 EXPECT_TRUE(RE::FullMatch(TypeParam("axyz"), re));
444 EXPECT_FALSE(RE::FullMatch(TypeParam("baz"), re));
445 EXPECT_FALSE(RE::FullMatch(TypeParam("azy"), re));
448 // Tests RE::PartialMatch().
450 const RE empty(TypeParam(""));
451 EXPECT_TRUE(RE::PartialMatch(TypeParam(""), empty));
452 EXPECT_TRUE(RE::PartialMatch(TypeParam("a"), empty));
454 const RE re(TypeParam("a.*z"));
455 EXPECT_TRUE(RE::PartialMatch(TypeParam("az"), re));
456 EXPECT_TRUE(RE::PartialMatch(TypeParam("axyz"), re));
457 EXPECT_TRUE(RE::PartialMatch(TypeParam("baz"), re));
458 EXPECT_TRUE(RE::PartialMatch(TypeParam("azy"), re));
459 EXPECT_FALSE(RE::PartialMatch(TypeParam("zza"), re));
874 // Tests RE's implicit constructors.
876 const RE empty("");
879 const RE simple("hello");
883 // Tests that RE's constructors reject invalid regular expressions.
886 const RE normal(NULL);
890 const RE normal(".*(\\w+");
894 const RE invalid("^?");
898 // Tests RE::FullMatch().
900 const RE empty("");
901 EXPECT_TRUE(RE::FullMatch("", empty));
902 EXPECT_FALSE(RE::FullMatch("a", empty));
904 const RE re1("a");
905 EXPECT_TRUE(RE::FullMatch("a", re1));
907 const RE re("a.*z");
908 EXPECT_TRUE(RE::FullMatch("az", re));
909 EXPECT_TRUE(RE::FullMatch("axyz", re));
910 EXPECT_FALSE(RE::FullMatch("baz", re));
911 EXPECT_FALSE(RE::FullMatch("azy", re));
914 // Tests RE::PartialMatch().
916 const RE empty("");
917 EXPECT_TRUE(RE::PartialMatch("", empty));
918 EXPECT_TRUE(RE::PartialMatch("a", empty));
920 const RE re("a.*z");
921 EXPECT_TRUE(RE::PartialMatch("az", re));
922 EXPECT_TRUE(RE::PartialMatch("axyz", re));
923 EXPECT_TRUE(RE::PartialMatch("baz", re));
924 EXPECT_TRUE(RE::PartialMatch("azy", re));
925 EXPECT_FALSE(RE::PartialMatch("zza", re));