Home | History | Annotate | Download | only in test

Lines Matching refs:RE

373 // Defines StringTypes as the list of all string types that class RE
384 // Tests RE's implicit constructors.
386 const RE empty(TypeParam(""));
389 const RE simple(TypeParam("hello"));
392 const RE normal(TypeParam(".*(\\w+)"));
396 // Tests that RE's constructors reject invalid regular expressions.
399 const RE invalid(TypeParam("?"));
403 // Tests RE::FullMatch().
405 const RE empty(TypeParam(""));
406 EXPECT_TRUE(RE::FullMatch(TypeParam(""), empty));
407 EXPECT_FALSE(RE::FullMatch(TypeParam("a"), empty));
409 const RE re(TypeParam("a.*z"));
410 EXPECT_TRUE(RE::FullMatch(TypeParam("az"), re));
411 EXPECT_TRUE(RE::FullMatch(TypeParam("axyz"), re));
412 EXPECT_FALSE(RE::FullMatch(TypeParam("baz"), re));
413 EXPECT_FALSE(RE::FullMatch(TypeParam("azy"), re));
416 // Tests RE::PartialMatch().
418 const RE empty(TypeParam(""));
419 EXPECT_TRUE(RE::PartialMatch(TypeParam(""), empty));
420 EXPECT_TRUE(RE::PartialMatch(TypeParam("a"), empty));
422 const RE re(TypeParam("a.*z"));
423 EXPECT_TRUE(RE::PartialMatch(TypeParam("az"), re));
424 EXPECT_TRUE(RE::PartialMatch(TypeParam("axyz"), re));
425 EXPECT_TRUE(RE::PartialMatch(TypeParam("baz"), re));
426 EXPECT_TRUE(RE::PartialMatch(TypeParam("azy"), re));
427 EXPECT_FALSE(RE::PartialMatch(TypeParam("zza"), re));
842 // Tests RE's implicit constructors.
844 const RE empty("");
847 const RE simple("hello");
851 // Tests that RE's constructors reject invalid regular expressions.
854 const RE normal(NULL);
858 const RE normal(".*(\\w+");
862 const RE invalid("^?");
866 // Tests RE::FullMatch().
868 const RE empty("");
869 EXPECT_TRUE(RE::FullMatch("", empty));
870 EXPECT_FALSE(RE::FullMatch("a", empty));
872 const RE re1("a");
873 EXPECT_TRUE(RE::FullMatch("a", re1));
875 const RE re("a.*z");
876 EXPECT_TRUE(RE::FullMatch("az", re));
877 EXPECT_TRUE(RE::FullMatch("axyz", re));
878 EXPECT_FALSE(RE::FullMatch("baz", re));
879 EXPECT_FALSE(RE::FullMatch("azy", re));
882 // Tests RE::PartialMatch().
884 const RE empty("");
885 EXPECT_TRUE(RE::PartialMatch("", empty));
886 EXPECT_TRUE(RE::PartialMatch("a", empty));
888 const RE re("a.*z");
889 EXPECT_TRUE(RE::PartialMatch("az", re));
890 EXPECT_TRUE(RE::PartialMatch("axyz", re));
891 EXPECT_TRUE(RE::PartialMatch("baz", re));
892 EXPECT_TRUE(RE::PartialMatch("azy", re));
893 EXPECT_FALSE(RE::PartialMatch("zza", re));