Lines Matching defs:m1

322   Matcher<int> m1 = 5;
323 EXPECT_TRUE(m1.Matches(5));
324 EXPECT_FALSE(m1.Matches(6));
329 Matcher<int*> m1 = NULL;
330 EXPECT_TRUE(m1.Matches(NULL));
332 EXPECT_FALSE(m1.Matches(&n));
338 Matcher<bool> m1 = Eq(false);
339 EXPECT_TRUE(m1.Matches(false));
340 EXPECT_FALSE(m1.Matches(true));
343 m1 = Eq(true);
344 EXPECT_TRUE(m1.Matches(true));
345 EXPECT_FALSE(m1.Matches(false));
370 Matcher<string> m1 = "hi";
371 EXPECT_TRUE(m1.Matches("hi"));
372 EXPECT_FALSE(m1.Matches("hello"));
382 Matcher<string> m1 = string("hi");
383 EXPECT_TRUE(m1.Matches("hi"));
384 EXPECT_FALSE(m1.Matches("hello"));
395 Matcher<StringPiece> m1 = "cats";
396 EXPECT_TRUE(m1.Matches("cats"));
397 EXPECT_FALSE(m1.Matches("dogs"));
407 Matcher<StringPiece> m1 = string("cats");
408 EXPECT_TRUE(m1.Matches("cats"));
409 EXPECT_FALSE(m1.Matches("dogs"));
419 Matcher<StringPiece> m1 = StringPiece("cats");
420 EXPECT_TRUE(m1.Matches("cats"));
421 EXPECT_FALSE(m1.Matches("dogs"));
464 Matcher<const int&> m1 = ReferencesBarOrIsZero();
465 EXPECT_TRUE(m1.Matches(0));
467 EXPECT_TRUE(m1.Matches(g_bar));
468 EXPECT_FALSE(m1.Matches(1));
469 EXPECT_EQ("g_bar or zero", Describe(m1));
507 const Matcher<int> m1 = PolymorphicIsEven();
508 EXPECT_TRUE(m1.Matches(42));
509 EXPECT_FALSE(m1.Matches(43));
510 EXPECT_EQ("is even", Describe(m1));
512 const Matcher<int> not_m1 = Not(m1);
515 EXPECT_EQ("% 2 == 0", Explain(m1, 42));
556 Matcher<double> m1 = Eq(2.0);
557 Matcher<int> m2 = MatcherCast<int>(m1);
572 Matcher<const int&> m1 = Eq(0);
573 Matcher<int> m2 = MatcherCast<int>(m1);
580 Matcher<int&> m1 = Eq(0);
581 Matcher<int> m2 = MatcherCast<int>(m1);
588 Matcher<int> m1 = Eq(0);
589 Matcher<const int&> m2 = MatcherCast<const int&>(m1);
596 Matcher<int> m1 = Eq(0);
597 Matcher<int&> m2 = MatcherCast<int&>(m1);
606 Matcher<int> m1 = Eq(0);
607 Matcher<int> m2 = MatcherCast<int>(m1);
686 Matcher<double> m1 = DoubleEq(1.0);
687 Matcher<float> m2 = SafeMatcherCast<float>(m1);
700 Matcher<Base*> m1 = Eq(&d);
701 Matcher<Derived*> m2 = SafeMatcherCast<Derived*>(m1);
714 Matcher<const int&> m1 = Ref(n);
715 Matcher<int&> m2 = SafeMatcherCast<int&>(m1);
723 Matcher<int> m1 = Eq(0);
724 Matcher<const int&> m2 = SafeMatcherCast<const int&>(m1);
731 Matcher<int> m1 = Eq(0);
732 Matcher<int&> m2 = SafeMatcherCast<int&>(m1);
741 Matcher<int> m1 = Eq(0);
742 Matcher<int> m2 = SafeMatcherCast<int>(m1);
785 Matcher<double> m1 = A<double>();
786 EXPECT_TRUE(m1.Matches(91.43));
787 EXPECT_TRUE(m1.Matches(-15.32));
814 Matcher<int> m1 = An<int>();
815 EXPECT_TRUE(m1.Matches(9143));
816 EXPECT_TRUE(m1.Matches(-1532));
835 Matcher<int> m1 = _;
836 EXPECT_TRUE(m1.Matches(123));
837 EXPECT_TRUE(m1.Matches(-242));
859 Matcher<const char*> m1 = Eq(a1);
860 EXPECT_TRUE(m1.Matches(a1));
861 EXPECT_FALSE(m1.Matches(a2));
887 Matcher<int> m1 = Eq(1);
888 EXPECT_TRUE(m1.Matches(1));
889 EXPECT_FALSE(m1.Matches(2));
898 Matcher<char> m1 = TypedEq<char>('a');
899 EXPECT_TRUE(m1.Matches('a'));
900 EXPECT_FALSE(m1.Matches('b'));
934 Matcher<int> m1 = Ge(0);
935 EXPECT_TRUE(m1.Matches(1));
936 EXPECT_TRUE(m1.Matches(0));
937 EXPECT_FALSE(m1.Matches(-1));
948 Matcher<double> m1 = Gt(0);
949 EXPECT_TRUE(m1.Matches(1.0));
950 EXPECT_FALSE(m1.Matches(0.0));
951 EXPECT_FALSE(m1.Matches(-1.0));
962 Matcher<char> m1 = Le('b');
963 EXPECT_TRUE(m1.Matches('a'));
964 EXPECT_TRUE(m1.Matches('b'));
965 EXPECT_FALSE(m1.Matches('c'));
976 Matcher<const string&> m1 = Lt("Hello");
977 EXPECT_TRUE(m1.Matches("Abc"));
978 EXPECT_FALSE(m1.Matches("Hello"));
979 EXPECT_FALSE(m1.Matches("Hello, world!"));
990 Matcher<int> m1 = Ne(0);
991 EXPECT_TRUE(m1.Matches(1));
992 EXPECT_TRUE(m1.Matches(-1));
993 EXPECT_FALSE(m1.Matches(0));
1004 Matcher<int*> m1 = IsNull();
1007 EXPECT_TRUE(m1.Matches(p1));
1008 EXPECT_FALSE(m1.Matches(&n));
1067 Matcher<int*> m1 = NotNull();
1070 EXPECT_FALSE(m1.Matches(p1));
1071 EXPECT_TRUE(m1.Matches(&n));
1148 Matcher<const Base&> m1 = Ref(base);
1149 EXPECT_TRUE(m1.Matches(base));
1150 EXPECT_FALSE(m1.Matches(base2));
1151 EXPECT_FALSE(m1.Matches(derived));
1153 m1 = Ref(derived);
1154 EXPECT_TRUE(m1.Matches(derived));
1155 EXPECT_FALSE(m1.Matches(base));
1156 EXPECT_FALSE(m1.Matches(base2));
1231 Matcher<const string&> m1 = StrCaseEq(str1);
1232 EXPECT_TRUE(m1.Matches(str2));
1273 const Matcher<string> m1 = HasSubstr("foo");
1274 EXPECT_TRUE(m1.Matches(string("I love food.")));
1275 EXPECT_FALSE(m1.Matches(string("tofo")));
1284 const Matcher<char*> m1 = HasSubstr("foo");
1285 EXPECT_TRUE(m1.Matches(const_cast<char*>("I love food.")));
1286 EXPECT_FALSE(m1.Matches(const_cast<char*>("tofo")));
1287 EXPECT_FALSE(m1.Matches(NULL));
1358 Matcher<const pair<const char*, int>&> m1 = Pair("foo", 42);
1367 Matcher<const pair<std::string, int>&> m1 = Pair("foo", 42);
1370 Describe(m1));
1373 DescribeNegation(m1));
1463 const Matcher<const char*> m1 = StartsWith(string(""));
1464 EXPECT_TRUE(m1.Matches("Hi"));
1465 EXPECT_TRUE(m1.Matches(""));
1466 EXPECT_FALSE(m1.Matches(NULL));
1484 const Matcher<const char*> m1 = EndsWith("");
1485 EXPECT_TRUE(m1.Matches("Hi"));
1486 EXPECT_TRUE(m1.Matches(""));
1487 EXPECT_FALSE(m1.Matches(NULL));
1505 const Matcher<const char*> m1 = MatchesRegex("a.*z");
1506 EXPECT_TRUE(m1.Matches("az"));
1507 EXPECT_TRUE(m1.Matches("abcz"));
1508 EXPECT_FALSE(m1.Matches(NULL));
1517 Matcher<const std::string> m1 = MatchesRegex(string("Hi.*"));
1518 EXPECT_EQ("matches regular expression \"Hi.*\"", Describe(m1));
1527 const Matcher<const char*> m1 = ContainsRegex(string("a.*z"));
1528 EXPECT_TRUE(m1.Matches("az"));
1529 EXPECT_TRUE(m1.Matches("0abcz1"));
1530 EXPECT_FALSE(m1.Matches(NULL));
1539 Matcher<const std::string> m1 = ContainsRegex("Hi.*");
1540 EXPECT_EQ("contains regular expression \"Hi.*\"", Describe(m1));
1624 Matcher<const ::std::wstring&> m1 = StrCaseEq(str1);
1625 EXPECT_TRUE(m1.Matches(str2));
1666 const Matcher< ::std::wstring> m1 = HasSubstr(L"foo");
1667 EXPECT_TRUE(m1.Matches(::std::wstring(L"I love food.")));
1668 EXPECT_FALSE(m1.Matches(::std::wstring(L"tofo")));
1677 const Matcher<wchar_t*> m1 = HasSubstr(L"foo");
1678 EXPECT_TRUE(m1.Matches(const_cast<wchar_t*>(L"I love food.")));
1679 EXPECT_FALSE(m1.Matches(const_cast<wchar_t*>(L"tofo")));
1680 EXPECT_FALSE(m1.Matches(NULL));
1697 const Matcher<const wchar_t*> m1 = StartsWith(::std::wstring(L""));
1698 EXPECT_TRUE(m1.Matches(L"Hi"));
1699 EXPECT_TRUE(m1.Matches(L""));
1700 EXPECT_FALSE(m1.Matches(NULL));
1718 const Matcher<const wchar_t*> m1 = EndsWith(L"");
1719 EXPECT_TRUE(m1.Matches(L"Hi"));
1720 EXPECT_TRUE(m1.Matches(L""));
1721 EXPECT_FALSE(m1.Matches(NULL));
1815 Matcher<const ::wstring&> m1 = StrCaseEq(str1);
1816 EXPECT_TRUE(m1.Matches(str2));
1857 const Matcher< ::wstring> m1 = HasSubstr(L"foo");
1858 EXPECT_TRUE(m1.Matches(::wstring(L"I love food.")));
1859 EXPECT_FALSE(m1.Matches(::wstring(L"tofo")));
1868 const Matcher<wchar_t*> m1 = HasSubstr(L"foo");
1869 EXPECT_TRUE(m1.Matches(const_cast<wchar_t*>(L"I love food.")));
1870 EXPECT_FALSE(m1.Matches(const_cast<wchar_t*>(L"tofo")));
1871 EXPECT_FALSE(m1.Matches(NULL));
1888 const Matcher<const wchar_t*> m1 = StartsWith(::wstring(L""));
1889 EXPECT_TRUE(m1.Matches(L"Hi"));
1890 EXPECT_TRUE(m1.Matches(L""));
1891 EXPECT_FALSE(m1.Matches(NULL));
1909 const Matcher<const wchar_t*> m1 = EndsWith(L"");
1910 EXPECT_TRUE(m1.Matches(L"Hi"));
1911 EXPECT_TRUE(m1.Matches(L""));
1912 EXPECT_FALSE(m1.Matches(NULL));
2055 // Tests that AllOf(m1, ..., mn) matches any value that matches all of
2123 // Tests that AllOf(m1, ..., mn) describes itself properly.
2153 // Tests that AllOf(m1, ..., mn) describes its negation properly.
2253 // Tests that AnyOf(m1, ..., mn) matches any value that matches at
2314 // Tests that AnyOf(m1, ..., mn) describes itself properly.
2342 // Tests that AnyOf(m1, ..., mn) describes its negation properly.
2737 Matcher<RawType> m1 = matcher_maker(0.0);
2738 EXPECT_TRUE(m1.Matches(-0.0));
2739 EXPECT_TRUE(m1.Matches(close_to_positive_zero_));
2740 EXPECT_TRUE(m1.Matches(close_to_negative_zero_));
2741 EXPECT_FALSE(m1.Matches(1.0));
2826 Matcher<RawType> m1 = matcher_maker(0.0, 0.0);
2827 EXPECT_TRUE(m1.Matches(0.0));
2828 EXPECT_TRUE(m1.Matches(-0.0));
2829 EXPECT_FALSE(m1.Matches(ParentType::close_to_positive_zero_));
2830 EXPECT_FALSE(m1.Matches(ParentType::close_to_negative_zero_));
2831 EXPECT_FALSE(m1.Matches(1.0));
2927 Matcher<float> m1 = FloatEq(2.0f);
2928 EXPECT_EQ("is approximately 2", Describe(m1));
2929 EXPECT_EQ("isn't approximately 2", DescribeNegation(m1));
2941 Matcher<float> m1 = NanSensitiveFloatEq(2.0f);
2942 EXPECT_EQ("is approximately 2", Describe(m1));
2943 EXPECT_EQ("isn't approximately 2", DescribeNegation(m1));
2967 Matcher<float> m1 = FloatNear(2.0f, 0.5f);
2968 EXPECT_EQ("is approximately 2 (absolute error <= 0.5)", Describe(m1));
2970 "isn't approximately 2 (absolute error > 0.5)", DescribeNegation(m1));
2983 Matcher<float> m1 = NanSensitiveFloatNear(2.0f, 0.5f);
2984 EXPECT_EQ("is approximately 2 (absolute error <= 0.5)", Describe(m1));
2986 "isn't approximately 2 (absolute error > 0.5)", DescribeNegation(m1));
3042 Matcher<double> m1 = DoubleEq(2.0);
3043 EXPECT_EQ("is approximately 2", Describe(m1));
3044 EXPECT_EQ("isn't approximately 2", DescribeNegation(m1));
3056 Matcher<double> m1 = NanSensitiveDoubleEq(2.0);
3057 EXPECT_EQ("is approximately 2", Describe(m1));
3058 EXPECT_EQ("isn't approximately 2", DescribeNegation(m1));
3082 Matcher<double> m1 = DoubleNear(2.0, 0.5);
3083 EXPECT_EQ("is approximately 2 (absolute error <= 0.5)", Describe(m1));
3085 "isn't approximately 2 (absolute error > 0.5)", DescribeNegation(m1));
3111 Matcher<double> m1 = NanSensitiveDoubleNear(2.0, 0.5);
3112 EXPECT_EQ("is approximately 2 (absolute error <= 0.5)", Describe(m1));
3114 "isn't approximately 2 (absolute error > 0.5)", DescribeNegation(m1));
4144 Matcher<vector<int> > m1 = SizeIs(2);
4149 EXPECT_EQ("whose size 0 doesn't match", Explain(m1, container));
4156 EXPECT_EQ("whose size 2 matches", Explain(m1, container));
4611 Matcher<vector<int> > m1 = BeginEndDistanceIs(2);
4617 Explain(m1, container));
4629 Explain(m1, container));
5526 const Matcher<tuple<const double&, const int&> > m1 = IsHalfOf();
5527 EXPECT_THAT(lhs, Pointwise(m1, rhs));
5528 EXPECT_EQ("", Explain(Pointwise(m1, rhs), lhs));
5642 const Matcher<tuple<const double&, const int&> > m1 = IsHalfOf();
5643 EXPECT_THAT(lhs, UnorderedPointwise(m1, rhs));