Home | History | Annotate | Download | only in test

Lines Matching refs:RE

368 // Defines StringTypes as the list of all string types that class RE
379 // Tests RE's implicit constructors.
381 const RE empty(TypeParam(""));
384 const RE simple(TypeParam("hello"));
387 const RE normal(TypeParam(".*(\\w+)"));
391 // Tests that RE's constructors reject invalid regular expressions.
394 const RE invalid(TypeParam("?"));
398 // Tests RE::FullMatch().
400 const RE empty(TypeParam(""));
401 EXPECT_TRUE(RE::FullMatch(TypeParam(""), empty));
402 EXPECT_FALSE(RE::FullMatch(TypeParam("a"), empty));
404 const RE re(TypeParam("a.*z"));
405 EXPECT_TRUE(RE::FullMatch(TypeParam("az"), re));
406 EXPECT_TRUE(RE::FullMatch(TypeParam("axyz"), re));
407 EXPECT_FALSE(RE::FullMatch(TypeParam("baz"), re));
408 EXPECT_FALSE(RE::FullMatch(TypeParam("azy"), re));
411 // Tests RE::PartialMatch().
413 const RE empty(TypeParam(""));
414 EXPECT_TRUE(RE::PartialMatch(TypeParam(""), empty));
415 EXPECT_TRUE(RE::PartialMatch(TypeParam("a"), empty));
417 const RE re(TypeParam("a.*z"));
418 EXPECT_TRUE(RE::PartialMatch(TypeParam("az"), re));
419 EXPECT_TRUE(RE::PartialMatch(TypeParam("axyz"), re));
420 EXPECT_TRUE(RE::PartialMatch(TypeParam("baz"), re));
421 EXPECT_TRUE(RE::PartialMatch(TypeParam("azy"), re));
422 EXPECT_FALSE(RE::PartialMatch(TypeParam("zza"), re));
837 // Tests RE's implicit constructors.
839 const RE empty("");
842 const RE simple("hello");
846 // Tests that RE's constructors reject invalid regular expressions.
849 const RE normal(NULL);
853 const RE normal(".*(\\w+");
857 const RE invalid("^?");
861 // Tests RE::FullMatch().
863 const RE empty("");
864 EXPECT_TRUE(RE::FullMatch("", empty));
865 EXPECT_FALSE(RE::FullMatch("a", empty));
867 const RE re1("a");
868 EXPECT_TRUE(RE::FullMatch("a", re1));
870 const RE re("a.*z");
871 EXPECT_TRUE(RE::FullMatch("az", re));
872 EXPECT_TRUE(RE::FullMatch("axyz", re));
873 EXPECT_FALSE(RE::FullMatch("baz", re));
874 EXPECT_FALSE(RE::FullMatch("azy", re));
877 // Tests RE::PartialMatch().
879 const RE empty("");
880 EXPECT_TRUE(RE::PartialMatch("", empty));
881 EXPECT_TRUE(RE::PartialMatch("a", empty));
883 const RE re("a.*z");
884 EXPECT_TRUE(RE::PartialMatch("az", re));
885 EXPECT_TRUE(RE::PartialMatch("axyz", re));
886 EXPECT_TRUE(RE::PartialMatch("baz", re));
887 EXPECT_TRUE(RE::PartialMatch("azy", re));
888 EXPECT_FALSE(RE::PartialMatch("zza", re));