Home | History | Annotate | Download | only in test

Lines Matching defs:m2

344   Matcher<const string&> m2 = "hi";
345 EXPECT_TRUE(m2.Matches("hi"));
346 EXPECT_FALSE(m2.Matches("hello"));
356 Matcher<const string&> m2 = string("hi");
357 EXPECT_TRUE(m2.Matches("hi"));
358 EXPECT_FALSE(m2.Matches("hello"));
404 Matcher<double> m2 = ReferencesBarOrIsZero();
405 EXPECT_TRUE(m2.Matches(0.0));
406 EXPECT_FALSE(m2.Matches(0.1));
407 EXPECT_EQ("g_bar or zero", Describe(m2));
450 const Matcher<char> m2 = PolymorphicIsEven();
451 EXPECT_TRUE(m2.Matches('\x42'));
452 EXPECT_FALSE(m2.Matches('\x43'));
453 EXPECT_EQ("is even", Describe(m2));
455 const Matcher<char> not_m2 = Not(m2);
458 EXPECT_EQ("% 2 == 0", Explain(m2, '\x42'));
489 Matcher<int> m2 = MatcherCast<int>(m1);
490 EXPECT_TRUE(m2.Matches(2));
491 EXPECT_FALSE(m2.Matches(3));
505 Matcher<int> m2 = MatcherCast<int>(m1);
506 EXPECT_TRUE(m2.Matches(0));
507 EXPECT_FALSE(m2.Matches(1));
513 Matcher<int> m2 = MatcherCast<int>(m1);
514 EXPECT_TRUE(m2.Matches(0));
515 EXPECT_FALSE(m2.Matches(1));
521 Matcher<const int&> m2 = MatcherCast<const int&>(m1);
522 EXPECT_TRUE(m2.Matches(0));
523 EXPECT_FALSE(m2.Matches(1));
529 Matcher<int&> m2 = MatcherCast<int&>(m1);
531 EXPECT_TRUE(m2.Matches(n));
533 EXPECT_FALSE(m2.Matches(n));
539 m2 = MatcherCast<int>(m1);
540 EXPECT_TRUE(m2.Matches(0));
541 EXPECT_FALSE(m2.Matches(1));
549 Matcher<char> m2 = SafeMatcherCast<char>(Eq(32));
550 EXPECT_TRUE(m2.Matches(' '));
551 EXPECT_FALSE(m2.Matches('\n'));
559 Matcher<float> m2 = SafeMatcherCast<float>(m1);
560 EXPECT_TRUE(m2.Matches(1.0f));
561 EXPECT_FALSE(m2.Matches(2.0f));
573 Matcher<Derived*> m2 = SafeMatcherCast<Derived*>(m1);
574 EXPECT_TRUE(m2.Matches(&d));
575 EXPECT_FALSE(m2.Matches(&d2));
587 Matcher<int&> m2 = SafeMatcherCast<int&>(m1);
589 EXPECT_TRUE(m2.Matches(n));
590 EXPECT_FALSE(m2.Matches(n1));
596 Matcher<const int&> m2 = SafeMatcherCast<const int&>(m1);
597 EXPECT_TRUE(m2.Matches(0));
598 EXPECT_FALSE(m2.Matches(1));
604 Matcher<int&> m2 = SafeMatcherCast<int&>(m1);
606 EXPECT_TRUE(m2.Matches(n));
608 EXPECT_FALSE(m2.Matches(n));
614 Matcher<int> m2 = SafeMatcherCast<int>(m1);
615 EXPECT_TRUE(m2.Matches(0));
616 EXPECT_FALSE(m2.Matches(1));
629 Matcher<int&> m2 = A<int&>();
630 EXPECT_TRUE(m2.Matches(a));
631 EXPECT_TRUE(m2.Matches(b));
649 Matcher<int&> m2 = An<int&>();
650 EXPECT_TRUE(m2.Matches(a));
651 EXPECT_TRUE(m2.Matches(b));
670 Matcher<const bool&> m2 = _;
671 EXPECT_TRUE(m2.Matches(a));
672 EXPECT_TRUE(m2.Matches(b));
715 Matcher<char> m2 = Eq(1);
716 EXPECT_TRUE(m2.Matches('\1'));
717 EXPECT_FALSE(m2.Matches('a'));
726 Matcher<int> m2 = TypedEq<int>(6);
727 EXPECT_TRUE(m2.Matches(6));
728 EXPECT_FALSE(m2.Matches(7));
834 Matcher<const char*> m2 = IsNull();
836 EXPECT_TRUE(m2.Matches(p2));
837 EXPECT_FALSE(m2.Matches("hi"));
897 Matcher<const char*> m2 = NotNull();
899 EXPECT_FALSE(m2.Matches(p2));
900 EXPECT_TRUE(m2.Matches("hi"));
1001 Matcher<const string&> m2 = StrEq("Hello");
1002 EXPECT_TRUE(m2.Matches("Hello"));
1003 EXPECT_FALSE(m2.Matches("Hi"));
1013 Matcher<string> m2 = StrEq(str);
1014 EXPECT_EQ("is equal to \"012\\04500800\"", Describe(m2));
1026 Matcher<string> m2 = StrNe(string("Hello"));
1027 EXPECT_TRUE(m2.Matches("hello"));
1028 EXPECT_FALSE(m2.Matches("Hello"));
1043 Matcher<const string&> m2 = StrCaseEq("Hello");
1044 EXPECT_TRUE(m2.Matches("hello"));
1045 EXPECT_FALSE(m2.Matches("Hi"));
1060 Matcher<const string&> m2 = StrCaseEq(str1);
1062 EXPECT_FALSE(m2.Matches(str2));
1085 Matcher<string> m2 = StrCaseNe(string("Hello"));
1086 EXPECT_TRUE(m2.Matches(""));
1087 EXPECT_FALSE(m2.Matches("Hello"));
1101 const Matcher<const std::string&> m2 = HasSubstr("foo");
1102 EXPECT_TRUE(m2.Matches(std::string("I love food.")));
1103 EXPECT_FALSE(m2.Matches(std::string("tofo")));
1113 const Matcher<const char*> m2 = HasSubstr("foo");
1114 EXPECT_TRUE(m2.Matches("I love food."));
1115 EXPECT_FALSE(m2.Matches("tofo"));
1116 EXPECT_FALSE(m2.Matches(NULL));
1183 Matcher<const pair<const char*, int> > m2 = Pair("foo", 42);
1199 Matcher<const pair<int, int>&> m2 = Not(Pair(Not(13), 42));
1202 DescribeNegation(m2));
1292 const Matcher<const string&> m2 = StartsWith("Hi");
1293 EXPECT_TRUE(m2.Matches("Hi"));
1294 EXPECT_TRUE(m2.Matches("Hi Hi!"));
1295 EXPECT_TRUE(m2.Matches("High"));
1296 EXPECT_FALSE(m2.Matches("H"));
1297 EXPECT_FALSE(m2.Matches(" Hi"));
1313 const Matcher<const string&> m2 = EndsWith(string("Hi"));
1314 EXPECT_TRUE(m2.Matches("Hi"));
1315 EXPECT_TRUE(m2.Matches("Wow Hi Hi"));
1316 EXPECT_TRUE(m2.Matches("Super Hi"));
1317 EXPECT_FALSE(m2.Matches("i"));
1318 EXPECT_FALSE(m2.Matches("Hi "));
1334 const Matcher<const string&> m2 = MatchesRegex(new RE("a.*z"));
1335 EXPECT_TRUE(m2.Matches("azbz"));
1336 EXPECT_FALSE(m2.Matches("az1"));
1337 EXPECT_FALSE(m2.Matches("1az"));
1344 Matcher<const char*> m2 = MatchesRegex(new RE("a.*"));
1345 EXPECT_EQ("matches regular expression \"a.*\"", Describe(m2));
1356 const Matcher<const string&> m2 = ContainsRegex(new RE("a.*z"));
1357 EXPECT_TRUE(m2.Matches("azbz"));
1358 EXPECT_TRUE(m2.Matches("az1"));
1359 EXPECT_FALSE(m2.Matches("1a"));
1366 Matcher<const char*> m2 = ContainsRegex(new RE("a.*"));
1367 EXPECT_EQ("contains regular expression \"a.*\"", Describe(m2));
1378 Matcher<const ::std::wstring&> m2 = StrEq(L"Hello");
1379 EXPECT_TRUE(m2.Matches(L"Hello"));
1380 EXPECT_FALSE(m2.Matches(L"Hi"));
1400 Matcher< ::std::wstring> m2 = StrEq(L"\xD3\x576\x8D3\xC74D");
1402 Describe(m2));
1419 Matcher< ::std::wstring> m2 = StrNe(::std::wstring(L"Hello"));
1420 EXPECT_TRUE(m2.Matches(L"hello"));
1421 EXPECT_FALSE(m2.Matches(L"Hello"));
1436 Matcher<const ::std::wstring&> m2 = StrCaseEq(L"Hello");
1437 EXPECT_TRUE(m2.Matches(L"hello"));
1438 EXPECT_FALSE(m2.Matches(L"Hi"));
1453 Matcher<const ::std::wstring&> m2 = StrCaseEq(str1);
1455 EXPECT_FALSE(m2.Matches(str2));
1478 Matcher< ::std::wstring> m2 = StrCaseNe(::std::wstring(L"Hello"));
1479 EXPECT_TRUE(m2.Matches(L""));
1480 EXPECT_FALSE(m2.Matches(L"Hello"));
1494 const Matcher<const ::std::wstring&> m2 = HasSubstr(L"foo");
1495 EXPECT_TRUE(m2.Matches(::std::wstring(L"I love food.")));
1496 EXPECT_FALSE(m2.Matches(::std::wstring(L"tofo")));
1506 const Matcher<const wchar_t*> m2 = HasSubstr(L"foo");
1507 EXPECT_TRUE(m2.Matches(L"I love food."));
1508 EXPECT_FALSE(m2.Matches(L"tofo"));
1509 EXPECT_FALSE(m2.Matches(NULL));
1526 const Matcher<const ::std::wstring&> m2 = StartsWith(L"Hi");
1527 EXPECT_TRUE(m2.Matches(L"Hi"));
1528 EXPECT_TRUE(m2.Matches(L"Hi Hi!"));
1529 EXPECT_TRUE(m2.Matches(L"High"));
1530 EXPECT_FALSE(m2.Matches(L"H"));
1531 EXPECT_FALSE(m2.Matches(L" Hi"));
1547 const Matcher<const ::std::wstring&> m2 = EndsWith(::std::wstring(L"Hi"));
1548 EXPECT_TRUE(m2.Matches(L"Hi"));
1549 EXPECT_TRUE(m2.Matches(L"Wow Hi Hi"));
1550 EXPECT_TRUE(m2.Matches(L"Super Hi"));
1551 EXPECT_FALSE(m2.Matches(L"i"));
1552 EXPECT_FALSE(m2.Matches(L"Hi "));
1569 Matcher<const ::wstring&> m2 = StrEq(L"Hello");
1570 EXPECT_TRUE(m2.Matches(L"Hello"));
1571 EXPECT_FALSE(m2.Matches(L"Hi"));
1591 Matcher< ::wstring> m2 = StrEq(L"\xD3\x576\x8D3\xC74D");
1593 Describe(m2));
1610 Matcher< ::wstring> m2 = StrNe(::wstring(L"Hello"));
1611 EXPECT_TRUE(m2.Matches(L"hello"));
1612 EXPECT_FALSE(m2.Matches(L"Hello"));
1627 Matcher<const ::wstring&> m2 = StrCaseEq(L"Hello");
1628 EXPECT_TRUE(m2.Matches(L"hello"));
1629 EXPECT_FALSE(m2.Matches(L"Hi"));
1644 Matcher<const ::wstring&> m2 = StrCaseEq(str1);
1646 EXPECT_FALSE(m2.Matches(str2));
1669 Matcher< ::wstring> m2 = StrCaseNe(::wstring(L"Hello"));
1670 EXPECT_TRUE(m2.Matches(L""));
1671 EXPECT_FALSE(m2.Matches(L"Hello"));
1685 const Matcher<const ::wstring&> m2 = HasSubstr(L"foo");
1686 EXPECT_TRUE(m2.Matches(::wstring(L"I love food.")));
1687 EXPECT_FALSE(m2.Matches(::wstring(L"tofo")));
1697 const Matcher<const wchar_t*> m2 = HasSubstr(L"foo");
1698 EXPECT_TRUE(m2.Matches(L"I love food."));
1699 EXPECT_FALSE(m2.Matches(L"tofo"));
1700 EXPECT_FALSE(m2.Matches(NULL));
1717 const Matcher<const ::wstring&> m2 = StartsWith(L"Hi");
1718 EXPECT_TRUE(m2.Matches(L"Hi"));
1719 EXPECT_TRUE(m2.Matches(L"Hi Hi!"));
1720 EXPECT_TRUE(m2.Matches(L"High"));
1721 EXPECT_FALSE(m2.Matches(L"H"));
1722 EXPECT_FALSE(m2.Matches(L" Hi"));
1738 const Matcher<const ::wstring&> m2 = EndsWith(::wstring(L"Hi"));
1739 EXPECT_TRUE(m2.Matches(L"Hi"));
1740 EXPECT_TRUE(m2.Matches(L"Wow Hi Hi"));
1741 EXPECT_TRUE(m2.Matches(L"Super Hi"));
1742 EXPECT_FALSE(m2.Matches(L"i"));
1743 EXPECT_FALSE(m2.Matches(L"Hi "));
1865 Matcher<int&> m2 = Not(greater_than_5);
1994 Matcher<int&> m2 = AllOf(greater_than_5, less_than_10);
1995 Matcher<int&> m3 = AllOf(greater_than_5, m2);
2161 Matcher<int&> m2 = AnyOf(greater_than_5, less_than_10);
2162 Matcher<int&> m3 = AnyOf(greater_than_5, m2);
2521 Matcher<RawType> m2 = matcher_maker(close_to_positive_zero_);
2522 EXPECT_FALSE(m2.Matches(further_from_negative_zero_));
2636 Matcher<float> m2 = FloatEq(0.5f);
2637 EXPECT_EQ("is approximately 0.5", Describe(m2));
2638 EXPECT_EQ("isn't approximately 0.5", DescribeNegation(m2));
2650 Matcher<float> m2 = NanSensitiveFloatEq(0.5f);
2651 EXPECT_EQ("is approximately 0.5", Describe(m2));
2652 EXPECT_EQ("isn't approximately 0.5", DescribeNegation(m2));
2691 Matcher<double> m2 = DoubleEq(0.5);
2692 EXPECT_EQ("is approximately 0.5", Describe(m2));
2693 EXPECT_EQ("isn't approximately 0.5", DescribeNegation(m2));
2705 Matcher<double> m2 = NanSensitiveDoubleEq(0.5);
2706 EXPECT_EQ("is approximately 0.5", Describe(m2));
2707 EXPECT_EQ("isn't approximately 0.5", DescribeNegation(m2));
2784 const Matcher<long*> m2 = Pointee(GreaterThan(1)); // NOLINT
2787 Explain(m2, &n));
3843 Matcher<vector<int> > m2 = Not(m);
3844 EXPECT_EQ("contains some element that isn't equal to 1", Describe(m2));
4011 const Matcher<tuple<double, int> > m2 = IsHalfOf();
4012 EXPECT_THAT(lhs, Pointwise(m2, rhs));
4013 EXPECT_EQ("", Explain(Pointwise(m2, rhs), lhs));