Lines Matching defs:matcher
98 // matches the matcher.
107 // doesn't match the matcher.
143 // Tests that ASSERT_THAT() and EXPECT_THAT() work when the matcher is
218 // matcher.
260 // matcher.
446 // Note that the matcher expects DerivedStruct but we say AStruct
459 // The field is an int, but the inner matcher expects a signed char.
552 // Note that the matcher expects DerivedStruct but we say AStruct
729 // The matcher expects a DerivedClass, but inside the Property() we
744 // n() returns an int but the inner matcher expects a signed char.
850 // The matcher expects a DerivedClass, but inside the Property() we
923 Matcher<int> matcher = ResultOf(&IntToStringFunction, Eq(std::string("foo")));
925 EXPECT_TRUE(matcher.Matches(1));
926 EXPECT_FALSE(matcher.Matches(2));
931 Matcher<int> matcher = ResultOf(&IntToStringFunction, StrEq("foo"));
936 Describe(matcher));
940 DescribeNegation(matcher));
945 Matcher<int> matcher =
948 EXPECT_EQ("whose string conversion is equal to \"foo\"", Describe(matcher));
950 DescribeNegation(matcher));
957 Matcher<int> matcher = ResultOf(&IntFunction, Ge(85));
959 Explain(matcher, 36));
961 matcher = ResultOf(&IntFunction, GreaterThan(85));
964 Explain(matcher, 36));
968 Matcher<int> matcher = ResultOf("magic int conversion", &IntFunction, Ge(85));
970 Explain(matcher, 36));
972 matcher = ResultOf("magic int conversion", &IntFunction, GreaterThan(85));
975 Explain(matcher, 36));
981 Matcher<int> matcher = ResultOf(&IntFunction, Eq(80));
983 EXPECT_TRUE(matcher.Matches(42));
984 EXPECT_FALSE(matcher.Matches(36));
998 Matcher<double&> matcher = ResultOf(&DoubleFunction, Ref(x));
1000 EXPECT_TRUE(matcher.Matches(x));
1001 EXPECT_FALSE(matcher.Matches(x2));
1019 Matcher<const std::string&> matcher = ResultOf(&StringFunction, Ref(s));
1021 EXPECT_TRUE(matcher.Matches(s));
1022 EXPECT_FALSE(matcher.Matches(s2));
1028 // IntFunction() returns int but the inner matcher expects a signed char.
1029 Matcher<int> matcher = ResultOf(IntFunction, Matcher<signed char>(Ge(85)));
1031 EXPECT_TRUE(matcher.Matches(36));
1032 EXPECT_FALSE(matcher.Matches(42));
1047 Matcher<int> matcher = ResultOf(IntToStringFunction, StrEq("foo"));
1048 EXPECT_TRUE(matcher.Matches(1));
1049 EXPECT_FALSE(matcher.Matches(2));
1059 Matcher<int> matcher = ResultOf(Functor(), Eq(std::string("foo")));
1061 EXPECT_TRUE(matcher.Matches(1));
1062 EXPECT_FALSE(matcher.Matches(2));
1088 Matcher<int*> matcher = ResultOf(PolymorphicFunctor(), "good ptr");
1091 EXPECT_TRUE(matcher.Matches(&n));
1092 EXPECT_FALSE(matcher.Matches(nullptr));
1096 Matcher<int> matcher = ResultOf(
1101 EXPECT_TRUE(matcher.Matches(3));
1102 EXPECT_FALSE(matcher.Matches(1));
1106 Matcher<std::unique_ptr<int>> matcher = ResultOf(
1111 EXPECT_TRUE(matcher.Matches(std::unique_ptr<int>(new int(3))));
1112 EXPECT_FALSE(matcher.Matches(std::unique_ptr<int>(new int(1))));
1608 "matcher #0: is equal to 1"));
1615 " - element #0 is matched by matcher #1,\n"
1616 " - element #2 is matched by matcher #0"));
1743 " - element #0 is matched by matcher #1,\n"
1744 " - element #1 is matched by matcher #2"));
1963 // One naive implementation of the matcher runs in O(N!) time, which is too
1964 // slow for many real-world inputs. This test shows that our matcher can match
2027 "matcher #1: is equal to 2"));
2052 "matcher #0: is equal to 1\n"
2059 // Test helper for formatting element, matcher index pairs in expectations.
2060 static std::string EMString(int element, int matcher) {
2062 ss << "(element #" << element << ", matcher #" << matcher << ")";
2489 // A matcher that can return different results when used multiple times on the
2490 // same input. No real matcher should do this; but this lets us test that we
2511 // simulating a flaky matcher.
2527 auto matcher = MakeMatcher(new MockMatcher);
2529 matcher);
2556 " The matcher failed on the initial attempt; but passed when rerun to "
2840 // Changing x and y now shouldn't affect the meaning of the above matcher.