Home | History | Annotate | Download | only in test

Lines Matching refs:re

348 // Defines StringTypes as the list of all string types that class RE
359 // Tests RE's implicit constructors.
361 const RE empty(TypeParam(""));
364 const RE simple(TypeParam("hello"));
367 const RE normal(TypeParam(".*(\\w+)"));
371 // Tests that RE's constructors reject invalid regular expressions.
374 const RE invalid(TypeParam("?"));
378 // Tests RE::FullMatch().
380 const RE empty(TypeParam(""));
381 EXPECT_TRUE(RE::FullMatch(TypeParam(""), empty));
382 EXPECT_FALSE(RE::FullMatch(TypeParam("a"), empty));
384 const RE re(TypeParam("a.*z"));
385 EXPECT_TRUE(RE::FullMatch(TypeParam("az"), re));
386 EXPECT_TRUE(RE::FullMatch(TypeParam("axyz"), re));
387 EXPECT_FALSE(RE::FullMatch(TypeParam("baz"), re));
388 EXPECT_FALSE(RE::FullMatch(TypeParam("azy"), re));
391 // Tests RE::PartialMatch().
393 const RE empty(TypeParam(""));
394 EXPECT_TRUE(RE::PartialMatch(TypeParam(""), empty));
395 EXPECT_TRUE(RE::PartialMatch(TypeParam("a"), empty));
397 const RE re(TypeParam("a.*z"));
398 EXPECT_TRUE(RE::PartialMatch(TypeParam("az"), re));
399 EXPECT_TRUE(RE::PartialMatch(TypeParam("axyz"), re));
400 EXPECT_TRUE(RE::PartialMatch(TypeParam("baz"), re));
401 EXPECT_TRUE(RE::PartialMatch(TypeParam("azy"), re));
402 EXPECT_FALSE(RE::PartialMatch(TypeParam("zza"), re));
817 // Tests RE's implicit constructors.
819 const RE empty("");
822 const RE simple("hello");
826 // Tests that RE's constructors reject invalid regular expressions.
829 const RE normal(NULL);
833 const RE normal(".*(\\w+");
837 const RE invalid("^?");
841 // Tests RE::FullMatch().
843 const RE empty("");
844 EXPECT_TRUE(RE::FullMatch("", empty));
845 EXPECT_FALSE(RE::FullMatch("a", empty));
847 const RE re1("a");
848 EXPECT_TRUE(RE::FullMatch("a", re1));
850 const RE re("a.*z");
851 EXPECT_TRUE(RE::FullMatch("az", re));
852 EXPECT_TRUE(RE::FullMatch("axyz", re));
853 EXPECT_FALSE(RE::FullMatch("baz", re));
854 EXPECT_FALSE(RE::FullMatch("azy", re));
857 // Tests RE::PartialMatch().
859 const RE empty("");
860 EXPECT_TRUE(RE::PartialMatch("", empty));
861 EXPECT_TRUE(RE::PartialMatch("a", empty));
863 const RE re("a.*z");
864 EXPECT_TRUE(RE::PartialMatch("az", re));
865 EXPECT_TRUE(RE::PartialMatch("axyz", re));
866 EXPECT_TRUE(RE::PartialMatch("baz", re));
867 EXPECT_TRUE(RE::PartialMatch("azy", re));
868 EXPECT_FALSE(RE::PartialMatch("zza", re));