Home | History | Annotate | Download | only in test

Lines Matching refs:re

167 // Defines StringTypes as the list of all string types that class RE
180 // Tests RE's implicit constructors.
182 const RE empty(TypeParam(""));
185 const RE simple(TypeParam("hello"));
188 const RE normal(TypeParam(".*(\\w+)"));
192 // Tests that RE's constructors reject invalid regular expressions.
195 const RE invalid(TypeParam("?"));
199 // Tests RE::FullMatch().
201 const RE empty(TypeParam(""));
202 EXPECT_TRUE(RE::FullMatch(TypeParam(""), empty));
203 EXPECT_FALSE(RE::FullMatch(TypeParam("a"), empty));
205 const RE re(TypeParam("a.*z"));
206 EXPECT_TRUE(RE::FullMatch(TypeParam("az"), re));
207 EXPECT_TRUE(RE::FullMatch(TypeParam("axyz"), re));
208 EXPECT_FALSE(RE::FullMatch(TypeParam("baz"), re));
209 EXPECT_FALSE(RE::FullMatch(TypeParam("azy"), re));
212 // Tests RE::PartialMatch().
214 const RE empty(TypeParam(""));
215 EXPECT_TRUE(RE::PartialMatch(TypeParam(""), empty));
216 EXPECT_TRUE(RE::PartialMatch(TypeParam("a"), empty));
218 const RE re(TypeParam("a.*z"));
219 EXPECT_TRUE(RE::PartialMatch(TypeParam("az"), re));
220 EXPECT_TRUE(RE::PartialMatch(TypeParam("axyz"), re));
221 EXPECT_TRUE(RE::PartialMatch(TypeParam("baz"), re));
222 EXPECT_TRUE(RE::PartialMatch(TypeParam("azy"), re));
223 EXPECT_FALSE(RE::PartialMatch(TypeParam("zza"), re));
636 // Tests RE's implicit constructors.
638 const RE empty("");
641 const RE simple("hello");
645 // Tests that RE's constructors reject invalid regular expressions.
648 const RE normal(NULL);
652 const RE normal(".*(\\w+");
656 const RE invalid("^?");
660 // Tests RE::FullMatch().
662 const RE empty("");
663 EXPECT_TRUE(RE::FullMatch("", empty));
664 EXPECT_FALSE(RE::FullMatch("a", empty));
666 const RE re1("a");
667 EXPECT_TRUE(RE::FullMatch("a", re1));
669 const RE re("a.*z");
670 EXPECT_TRUE(RE::FullMatch("az", re));
671 EXPECT_TRUE(RE::FullMatch("axyz", re));
672 EXPECT_FALSE(RE::FullMatch("baz", re));
673 EXPECT_FALSE(RE::FullMatch("azy", re));
676 // Tests RE::PartialMatch().
678 const RE empty("");
679 EXPECT_TRUE(RE::PartialMatch("", empty));
680 EXPECT_TRUE(RE::PartialMatch("a", empty));
682 const RE re("a.*z");
683 EXPECT_TRUE(RE::PartialMatch("az", re));
684 EXPECT_TRUE(RE::PartialMatch("axyz", re));
685 EXPECT_TRUE(RE::PartialMatch("baz", re));
686 EXPECT_TRUE(RE::PartialMatch("azy", re));
687 EXPECT_FALSE(RE::PartialMatch("zza", re));