Home | History | Annotate | Download | only in test

Lines Matching refs:m1

292   Matcher<int> m1 = 5;
293 EXPECT_TRUE(m1.Matches(5));
294 EXPECT_FALSE(m1.Matches(6));
299 Matcher<int*> m1 = NULL;
300 EXPECT_TRUE(m1.Matches(NULL));
302 EXPECT_FALSE(m1.Matches(&n));
308 Matcher<bool> m1 = Eq(false);
309 EXPECT_TRUE(m1.Matches(false));
310 EXPECT_FALSE(m1.Matches(true));
313 m1 = Eq(true);
314 EXPECT_TRUE(m1.Matches(true));
315 EXPECT_FALSE(m1.Matches(false));
340 Matcher<string> m1 = "hi";
341 EXPECT_TRUE(m1.Matches("hi"));
342 EXPECT_FALSE(m1.Matches("hello"));
352 Matcher<string> m1 = string("hi");
353 EXPECT_TRUE(m1.Matches("hi"));
354 EXPECT_FALSE(m1.Matches("hello"));
396 Matcher<const int&> m1 = ReferencesBarOrIsZero();
397 EXPECT_TRUE(m1.Matches(0));
399 EXPECT_TRUE(m1.Matches(g_bar));
400 EXPECT_FALSE(m1.Matches(1));
401 EXPECT_EQ("g_bar or zero", Describe(m1));
439 const Matcher<int> m1 = PolymorphicIsEven();
440 EXPECT_TRUE(m1.Matches(42));
441 EXPECT_FALSE(m1.Matches(43));
442 EXPECT_EQ("is even", Describe(m1));
444 const Matcher<int> not_m1 = Not(m1);
447 EXPECT_EQ("% 2 == 0", Explain(m1, 42));
488 Matcher<double> m1 = Eq(2.0);
489 Matcher<int> m2 = MatcherCast<int>(m1);
504 Matcher<const int&> m1 = Eq(0);
505 Matcher<int> m2 = MatcherCast<int>(m1);
512 Matcher<int&> m1 = Eq(0);
513 Matcher<int> m2 = MatcherCast<int>(m1);
520 Matcher<int> m1 = Eq(0);
521 Matcher<const int&> m2 = MatcherCast<const int&>(m1);
528 Matcher<int> m1 = Eq(0);
529 Matcher<int&> m2 = MatcherCast<int&>(m1);
538 Matcher<int> m1 = Eq(0);
539 m1);
558 Matcher<double> m1 = DoubleEq(1.0);
559 Matcher<float> m2 = SafeMatcherCast<float>(m1);
572 Matcher<Base*> m1 = Eq(&d);
573 Matcher<Derived*> m2 = SafeMatcherCast<Derived*>(m1);
586 Matcher<const int&> m1 = Ref(n);
587 Matcher<int&> m2 = SafeMatcherCast<int&>(m1);
595 Matcher<int> m1 = Eq(0);
596 Matcher<const int&> m2 = SafeMatcherCast<const int&>(m1);
603 Matcher<int> m1 = Eq(0);
604 Matcher<int&> m2 = SafeMatcherCast<int&>(m1);
613 Matcher<int> m1 = Eq(0);
614 Matcher<int> m2 = SafeMatcherCast<int>(m1);
622 Matcher<double> m1 = A<double>();
623 EXPECT_TRUE(m1.Matches(91.43));
624 EXPECT_TRUE(m1.Matches(-15.32));
642 Matcher<int> m1 = An<int>();
643 EXPECT_TRUE(m1.Matches(9143));
644 EXPECT_TRUE(m1.Matches(-1532));
663 Matcher<int> m1 = _;
664 EXPECT_TRUE(m1.Matches(123));
665 EXPECT_TRUE(m1.Matches(-242));
687 Matcher<const char*> m1 = Eq(a1);
688 EXPECT_TRUE(m1.Matches(a1));
689 EXPECT_FALSE(m1.Matches(a2));
711 Matcher<int> m1 = Eq(1);
712 EXPECT_TRUE(m1.Matches(1));
713 EXPECT_FALSE(m1.Matches(2));
722 Matcher<char> m1 = TypedEq<char>('a');
723 EXPECT_TRUE(m1.Matches('a'));
724 EXPECT_FALSE(m1.Matches('b'));
758 Matcher<int> m1 = Ge(0);
759 EXPECT_TRUE(m1.Matches(1));
760 EXPECT_TRUE(m1.Matches(0));
761 EXPECT_FALSE(m1.Matches(-1));
772 Matcher<double> m1 = Gt(0);
773 EXPECT_TRUE(m1.Matches(1.0));
774 EXPECT_FALSE(m1.Matches(0.0));
775 EXPECT_FALSE(m1.Matches(-1.0));
786 Matcher<char> m1 = Le('b');
787 EXPECT_TRUE(m1.Matches('a'));
788 EXPECT_TRUE(m1.Matches('b'));
789 EXPECT_FALSE(m1.Matches('c'));
800 Matcher<const string&> m1 = Lt("Hello");
801 EXPECT_TRUE(m1.Matches("Abc"));
802 EXPECT_FALSE(m1.Matches("Hello"));
803 EXPECT_FALSE(m1.Matches("Hello, world!"));
814 Matcher<int> m1 = Ne(0);
815 EXPECT_TRUE(m1.Matches(1));
816 EXPECT_TRUE(m1.Matches(-1));
817 EXPECT_FALSE(m1.Matches(0));
828 Matcher<int*> m1 = IsNull();
831 EXPECT_TRUE(m1.Matches(p1));
832 EXPECT_FALSE(m1.Matches(&n));
891 Matcher<int*> m1 = NotNull();
894 EXPECT_FALSE(m1.Matches(p1));
895 EXPECT_TRUE(m1.Matches(&n));
972 Matcher<const Base&> m1 = Ref(base);
973 EXPECT_TRUE(m1.Matches(base));
974 EXPECT_FALSE(m1.Matches(base2));
975 EXPECT_FALSE(m1.Matches(derived));
977 m1 = Ref(derived);
978 EXPECT_TRUE(m1.Matches(derived));
979 EXPECT_FALSE(m1.Matches(base));
980 EXPECT_FALSE(m1.Matches(base2));
1055 Matcher<const string&> m1 = StrCaseEq(str1);
1056 EXPECT_TRUE(m1.Matches(str2));
1097 const Matcher<string> m1 = HasSubstr("foo");
1098 EXPECT_TRUE(m1.Matches(string("I love food.")));
1099 EXPECT_FALSE(m1.Matches(string("tofo")));
1108 const Matcher<char*> m1 = HasSubstr("foo");
1109 EXPECT_TRUE(m1.Matches(const_cast<char*>("I love food.")));
1110 EXPECT_FALSE(m1.Matches(const_cast<char*>("tofo")));
1111 EXPECT_FALSE(m1.Matches(NULL));
1182 Matcher<const pair<const char*, int>&> m1 = Pair("foo", 42);
1191 Matcher<const pair<std::string, int>&> m1 = Pair("foo", 42);
1194 Describe(m1));
1197 DescribeNegation(m1));
1287 const Matcher<const char*> m1 = StartsWith(string(""));
1288 EXPECT_TRUE(m1.Matches("Hi"));
1289 EXPECT_TRUE(m1.Matches(""));
1290 EXPECT_FALSE(m1.Matches(NULL));
1308 const Matcher<const char*> m1 = EndsWith("");
1309 EXPECT_TRUE(m1.Matches("Hi"));
1310 EXPECT_TRUE(m1.Matches(""));
1311 EXPECT_FALSE(m1.Matches(NULL));
1329 const Matcher<const char*> m1 = MatchesRegex("a.*z");
1330 EXPECT_TRUE(m1.Matches("az"));
1331 EXPECT_TRUE(m1.Matches("abcz"));
1332 EXPECT_FALSE(m1.Matches(NULL));
1341 Matcher<const std::string> m1 = MatchesRegex(string("Hi.*"));
1342 EXPECT_EQ("matches regular expression \"Hi.*\"", Describe(m1));
1351 const Matcher<const char*> m1 = ContainsRegex(string("a.*z"));
1352 EXPECT_TRUE(m1.Matches("az"));
1353 EXPECT_TRUE(m1.Matches("0abcz1"));
1354 EXPECT_FALSE(m1.Matches(NULL));
1363 Matcher<const std::string> m1 = ContainsRegex("Hi.*");
1364 EXPECT_EQ("contains regular expression \"Hi.*\"", Describe(m1));
1448 Matcher<const ::std::wstring&> m1 = StrCaseEq(str1);
1449 EXPECT_TRUE(m1.Matches(str2));
1490 const Matcher< ::std::wstring> m1 = HasSubstr(L"foo");
1491 EXPECT_TRUE(m1.Matches(::std::wstring(L"I love food.")));
1492 EXPECT_FALSE(m1.Matches(::std::wstring(L"tofo")));
1501 const Matcher<wchar_t*> m1 = HasSubstr(L"foo");
1502 EXPECT_TRUE(m1.Matches(const_cast<wchar_t*>(L"I love food.")));
1503 EXPECT_FALSE(m1.Matches(const_cast<wchar_t*>(L"tofo")));
1504 EXPECT_FALSE(m1.Matches(NULL));
1521 const Matcher<const wchar_t*> m1 = StartsWith(::std::wstring(L""));
1522 EXPECT_TRUE(m1.Matches(L"Hi"));
1523 EXPECT_TRUE(m1.Matches(L""));
1524 EXPECT_FALSE(m1.Matches(NULL));
1542 const Matcher<const wchar_t*> m1 = EndsWith(L"");
1543 EXPECT_TRUE(m1.Matches(L"Hi"));
1544 EXPECT_TRUE(m1.Matches(L""));
1545 EXPECT_FALSE(m1.Matches(NULL));
1639 Matcher<const ::wstring&> m1 = StrCaseEq(str1);
1640 EXPECT_TRUE(m1.Matches(str2));
1681 const Matcher< ::wstring> m1 = HasSubstr(L"foo");
1682 EXPECT_TRUE(m1.Matches(::wstring(L"I love food.")));
1683 EXPECT_FALSE(m1.Matches(::wstring(L"tofo")));
1692 const Matcher<wchar_t*> m1 = HasSubstr(L"foo");
1693 EXPECT_TRUE(m1.Matches(const_cast<wchar_t*>(L"I love food.")));
1694 EXPECT_FALSE(m1.Matches(const_cast<wchar_t*>(L"tofo")));
1695 EXPECT_FALSE(m1.Matches(NULL));
1712 const Matcher<const wchar_t*> m1 = StartsWith(::wstring(L""));
1713 EXPECT_TRUE(m1.Matches(L"Hi"));
1714 EXPECT_TRUE(m1.Matches(L""));
1715 EXPECT_FALSE(m1.Matches(NULL));
1733 const Matcher<const wchar_t*> m1 = EndsWith(L"");
1734 EXPECT_TRUE(m1.Matches(L"Hi"));
1735 EXPECT_TRUE(m1.Matches(L""));
1736 EXPECT_FALSE(m1.Matches(NULL));
1879 // Tests that AllOf(m1, ..., mn) matches any value that matches all of
1925 // Tests that AllOf(m1, ..., mn) describes itself properly.
1955 // Tests that AllOf(m1, ..., mn) describes its negation properly.
2055 // Tests that AnyOf(m1, ..., mn) matches any value that matches at
2098 // Tests that AnyOf(m1, ..., mn) describes itself properly.
2126 // Tests that AnyOf(m1, ..., mn) describes its negation properly.
2515 Matcher<RawType> m1 = matcher_maker(0.0);
2516 EXPECT_TRUE(m1.Matches(-0.0));
2517 EXPECT_TRUE(m1.Matches(close_to_positive_zero_));
2518 EXPECT_TRUE(m1.Matches(close_to_negative_zero_));
2519 EXPECT_FALSE(m1.Matches(1.0));
2632 Matcher<float> m1 = FloatEq(2.0f);
2633 EXPECT_EQ("is approximately 2", Describe(m1));
2634 EXPECT_EQ("isn't approximately 2", DescribeNegation(m1));
2646 Matcher<float> m1 = NanSensitiveFloatEq(2.0f);
2647 EXPECT_EQ("is approximately 2", Describe(m1));
2648 EXPECT_EQ("isn't approximately 2", DescribeNegation(m1));
2687 Matcher<double> m1 = DoubleEq(2.0);
2688 EXPECT_EQ("is approximately 2", Describe(m1));
2689 EXPECT_EQ("isn't approximately 2", DescribeNegation(m1));
2701 Matcher<double> m1 = NanSensitiveDoubleEq(2.0);
2702 EXPECT_EQ("is approximately 2", Describe(m1));
2703 EXPECT_EQ("isn't approximately 2", DescribeNegation(m1));
4005 const Matcher<tuple<const double&, const int&> > m1 = IsHalfOf();
4006 EXPECT_THAT(lhs, Pointwise(m1, rhs));
4007 EXPECT_EQ("", Explain(Pointwise(m1, rhs), lhs));