diff options
author | zhanyong.wan <zhanyong.wan@8415998a-534a-0410-bf83-d39667b30386> | 2010-01-14 05:36:32 +0000 |
---|---|---|
committer | zhanyong.wan <zhanyong.wan@8415998a-534a-0410-bf83-d39667b30386> | 2010-01-14 05:36:32 +0000 |
commit | d14aaed74b2a8a1222d60d8fa3afcfc93a21c321 (patch) | |
tree | cf118668b44f1b3914c22003d763bb58504a37eb /test/gmock-matchers_test.cc | |
parent | 6953a725fc2151eff18078f8315d92811cd4d90e (diff) | |
download | googletest-d14aaed74b2a8a1222d60d8fa3afcfc93a21c321.tar.gz googletest-d14aaed74b2a8a1222d60d8fa3afcfc93a21c321.tar.bz2 googletest-d14aaed74b2a8a1222d60d8fa3afcfc93a21c321.zip |
Enables regex matchers on all platforms.
Diffstat (limited to 'test/gmock-matchers_test.cc')
-rw-r--r-- | test/gmock-matchers_test.cc | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/test/gmock-matchers_test.cc b/test/gmock-matchers_test.cc index e10b7275..555cc228 100644 --- a/test/gmock-matchers_test.cc +++ b/test/gmock-matchers_test.cc @@ -126,11 +126,9 @@ using testing::internal::linked_ptr; using testing::internal::scoped_ptr; using testing::internal::string; -#ifdef GMOCK_HAS_REGEX using testing::ContainsRegex; using testing::MatchesRegex; using testing::internal::RE; -#endif // GMOCK_HAS_REGEX // For testing ExplainMatchResultTo(). class GreaterThanMatcher : public MatcherInterface<int> { @@ -1249,8 +1247,6 @@ TEST(EndsWithTest, CanDescribeSelf) { EXPECT_EQ("ends with \"Hi\"", Describe(m)); } -#ifdef GMOCK_HAS_REGEX - // Tests MatchesRegex(). TEST(MatchesRegexTest, MatchesStringMatchingGivenRegex) { @@ -1269,8 +1265,8 @@ TEST(MatchesRegexTest, CanDescribeSelf) { Matcher<const std::string> m1 = MatchesRegex(string("Hi.*")); EXPECT_EQ("matches regular expression \"Hi.*\"", Describe(m1)); - Matcher<const char*> m2 = MatchesRegex(new RE("[a-z].*")); - EXPECT_EQ("matches regular expression \"[a-z].*\"", Describe(m2)); + Matcher<const char*> m2 = MatchesRegex(new RE("a.*")); + EXPECT_EQ("matches regular expression \"a.*\"", Describe(m2)); } // Tests ContainsRegex(). @@ -1291,10 +1287,9 @@ TEST(ContainsRegexTest, CanDescribeSelf) { Matcher<const std::string> m1 = ContainsRegex("Hi.*"); EXPECT_EQ("contains regular expression \"Hi.*\"", Describe(m1)); - Matcher<const char*> m2 = ContainsRegex(new RE("[a-z].*")); - EXPECT_EQ("contains regular expression \"[a-z].*\"", Describe(m2)); + Matcher<const char*> m2 = ContainsRegex(new RE("a.*")); + EXPECT_EQ("contains regular expression \"a.*\"", Describe(m2)); } -#endif // GMOCK_HAS_REGEX // Tests for wide strings. #if GTEST_HAS_STD_WSTRING |