Lines Matching defs:m2

374   Matcher<const string&> m2 = "hi";
375 EXPECT_TRUE(m2.Matches("hi"));
376 EXPECT_FALSE(m2.Matches("hello"));
386 Matcher<const string&> m2 = string("hi");
387 EXPECT_TRUE(m2.Matches("hi"));
388 EXPECT_FALSE(m2.Matches("hello"));
399 Matcher<const StringPiece&> m2 = "cats";
400 EXPECT_TRUE(m2.Matches("cats"));
401 EXPECT_FALSE(m2.Matches("dogs"));
411 Matcher<const StringPiece&> m2 = string("cats");
412 EXPECT_TRUE(m2.Matches("cats"));
413 EXPECT_FALSE(m2.Matches("dogs"));
423 Matcher<const StringPiece&> m2 = StringPiece("cats");
424 EXPECT_TRUE(m2.Matches("cats"));
425 EXPECT_FALSE(m2.Matches("dogs"));
472 Matcher<double> m2 = ReferencesBarOrIsZero();
473 EXPECT_TRUE(m2.Matches(0.0));
474 EXPECT_FALSE(m2.Matches(0.1));
475 EXPECT_EQ("g_bar or zero", Describe(m2));
518 const Matcher<char> m2 = PolymorphicIsEven();
519 EXPECT_TRUE(m2.Matches('\x42'));
520 EXPECT_FALSE(m2.Matches('\x43'));
521 EXPECT_EQ("is even", Describe(m2));
523 const Matcher<char> not_m2 = Not(m2);
526 EXPECT_EQ("% 2 == 0", Explain(m2, '\x42'));
557 Matcher<int> m2 = MatcherCast<int>(m1);
558 EXPECT_TRUE(m2.Matches(2));
559 EXPECT_FALSE(m2.Matches(3));
573 Matcher<int> m2 = MatcherCast<int>(m1);
574 EXPECT_TRUE(m2.Matches(0));
575 EXPECT_FALSE(m2.Matches(1));
581 Matcher<int> m2 = MatcherCast<int>(m1);
582 EXPECT_TRUE(m2.Matches(0));
583 EXPECT_FALSE(m2.Matches(1));
589 Matcher<const int&> m2 = MatcherCast<const int&>(m1);
590 EXPECT_TRUE(m2.Matches(0));
591 EXPECT_FALSE(m2.Matches(1));
597 Matcher<int&> m2 = MatcherCast<int&>(m1);
599 EXPECT_TRUE(m2.Matches(n));
601 EXPECT_FALSE(m2.Matches(n));
607 Matcher<int> m2 = MatcherCast<int>(m1);
608 EXPECT_TRUE(m2.Matches(0));
609 EXPECT_FALSE(m2.Matches(1));
677 Matcher<char> m2 = SafeMatcherCast<char>(Eq(32));
678 EXPECT_TRUE(m2.Matches(' '));
679 EXPECT_FALSE(m2.Matches('\n'));
687 Matcher<float> m2 = SafeMatcherCast<float>(m1);
688 EXPECT_TRUE(m2.Matches(1.0f));
689 EXPECT_FALSE(m2.Matches(2.0f));
701 Matcher<Derived*> m2 = SafeMatcherCast<Derived*>(m1);
702 EXPECT_TRUE(m2.Matches(&d));
703 EXPECT_FALSE(m2.Matches(&d2));
715 Matcher<int&> m2 = SafeMatcherCast<int&>(m1);
717 EXPECT_TRUE(m2.Matches(n));
718 EXPECT_FALSE(m2.Matches(n1));
724 Matcher<const int&> m2 = SafeMatcherCast<const int&>(m1);
725 EXPECT_TRUE(m2.Matches(0));
726 EXPECT_FALSE(m2.Matches(1));
732 Matcher<int&> m2 = SafeMatcherCast<int&>(m1);
734 EXPECT_TRUE(m2.Matches(n));
736 EXPECT_FALSE(m2.Matches(n));
742 Matcher<int> m2 = SafeMatcherCast<int>(m1);
743 EXPECT_TRUE(m2.Matches(0));
744 EXPECT_FALSE(m2.Matches(1));
792 Matcher<int&> m2 = A<int&>();
793 EXPECT_TRUE(m2.Matches(a));
794 EXPECT_TRUE(m2.Matches(b));
821 Matcher<int&> m2 = An<int&>();
822 EXPECT_TRUE(m2.Matches(a));
823 EXPECT_TRUE(m2.Matches(b));
842 Matcher<const bool&> m2 = _;
843 EXPECT_TRUE(m2.Matches(a));
844 EXPECT_TRUE(m2.Matches(b));
891 Matcher<char> m2 = Eq(1);
892 EXPECT_TRUE(m2.Matches('\1'));
893 EXPECT_FALSE(m2.Matches('a'));
902 Matcher<int> m2 = TypedEq<int>(6);
903 EXPECT_TRUE(m2.Matches(6));
904 EXPECT_FALSE(m2.Matches(7));
1010 Matcher<const char*> m2 = IsNull();
1012 EXPECT_TRUE(m2.Matches(p2));
1013 EXPECT_FALSE(m2.Matches("hi"));
1073 Matcher<const char*> m2 = NotNull();
1075 EXPECT_FALSE(m2.Matches(p2));
1076 EXPECT_TRUE(m2.Matches("hi"));
1177 Matcher<const string&> m2 = StrEq("Hello");
1178 EXPECT_TRUE(m2.Matches("Hello"));
1179 EXPECT_FALSE(m2.Matches("Hi"));
1189 Matcher<string> m2 = StrEq(str);
1190 EXPECT_EQ("is equal to \"012\\04500800\"", Describe(m2));
1202 Matcher<string> m2 = StrNe(string("Hello"));
1203 EXPECT_TRUE(m2.Matches("hello"));
1204 EXPECT_FALSE(m2.Matches("Hello"));
1219 Matcher<const string&> m2 = StrCaseEq("Hello");
1220 EXPECT_TRUE(m2.Matches("hello"));
1221 EXPECT_FALSE(m2.Matches("Hi"));
1236 Matcher<const string&> m2 = StrCaseEq(str1);
1238 EXPECT_FALSE(m2.Matches(str2));
1261 Matcher<string> m2 = StrCaseNe(string("Hello"));
1262 EXPECT_TRUE(m2.Matches(""));
1263 EXPECT_FALSE(m2.Matches("Hello"));
1277 const Matcher<const std::string&> m2 = HasSubstr("foo");
1278 EXPECT_TRUE(m2.Matches(std::string("I love food.")));
1279 EXPECT_FALSE(m2.Matches(std::string("tofo")));
1289 const Matcher<const char*> m2 = HasSubstr("foo");
1290 EXPECT_TRUE(m2.Matches("I love food."));
1291 EXPECT_FALSE(m2.Matches("tofo"));
1292 EXPECT_FALSE(m2.Matches(NULL));
1359 Matcher<const pair<const char*, int> > m2 = Pair("foo", 42);
1375 Matcher<const pair<int, int>&> m2 = Not(Pair(Not(13), 42));
1378 DescribeNegation(m2));
1468 const Matcher<const string&> m2 = StartsWith("Hi");
1469 EXPECT_TRUE(m2.Matches("Hi"));
1470 EXPECT_TRUE(m2.Matches("Hi Hi!"));
1471 EXPECT_TRUE(m2.Matches("High"));
1472 EXPECT_FALSE(m2.Matches("H"));
1473 EXPECT_FALSE(m2.Matches(" Hi"));
1489 const Matcher<const string&> m2 = EndsWith(string("Hi"));
1490 EXPECT_TRUE(m2.Matches("Hi"));
1491 EXPECT_TRUE(m2.Matches("Wow Hi Hi"));
1492 EXPECT_TRUE(m2.Matches("Super Hi"));
1493 EXPECT_FALSE(m2.Matches("i"));
1494 EXPECT_FALSE(m2.Matches("Hi "));
1510 const Matcher<const string&> m2 = MatchesRegex(new RE("a.*z"));
1511 EXPECT_TRUE(m2.Matches("azbz"));
1512 EXPECT_FALSE(m2.Matches("az1"));
1513 EXPECT_FALSE(m2.Matches("1az"));
1520 Matcher<const char*> m2 = MatchesRegex(new RE("a.*"));
1521 EXPECT_EQ("matches regular expression \"a.*\"", Describe(m2));
1532 const Matcher<const string&> m2 = ContainsRegex(new RE("a.*z"));
1533 EXPECT_TRUE(m2.Matches("azbz"));
1534 EXPECT_TRUE(m2.Matches("az1"));
1535 EXPECT_FALSE(m2.Matches("1a"));
1542 Matcher<const char*> m2 = ContainsRegex(new RE("a.*"));
1543 EXPECT_EQ("contains regular expression \"a.*\"", Describe(m2));
1554 Matcher<const ::std::wstring&> m2 = StrEq(L"Hello");
1555 EXPECT_TRUE(m2.Matches(L"Hello"));
1556 EXPECT_FALSE(m2.Matches(L"Hi"));
1576 Matcher< ::std::wstring> m2 = StrEq(L"\xD3\x576\x8D3\xC74D");
1578 Describe(m2));
1595 Matcher< ::std::wstring> m2 = StrNe(::std::wstring(L"Hello"));
1596 EXPECT_TRUE(m2.Matches(L"hello"));
1597 EXPECT_FALSE(m2.Matches(L"Hello"));
1612 Matcher<const ::std::wstring&> m2 = StrCaseEq(L"Hello");
1613 EXPECT_TRUE(m2.Matches(L"hello"));
1614 EXPECT_FALSE(m2.Matches(L"Hi"));
1629 Matcher<const ::std::wstring&> m2 = StrCaseEq(str1);
1631 EXPECT_FALSE(m2.Matches(str2));
1654 Matcher< ::std::wstring> m2 = StrCaseNe(::std::wstring(L"Hello"));
1655 EXPECT_TRUE(m2.Matches(L""));
1656 EXPECT_FALSE(m2.Matches(L"Hello"));
1670 const Matcher<const ::std::wstring&> m2 = HasSubstr(L"foo");
1671 EXPECT_TRUE(m2.Matches(::std::wstring(L"I love food.")));
1672 EXPECT_FALSE(m2.Matches(::std::wstring(L"tofo")));
1682 const Matcher<const wchar_t*> m2 = HasSubstr(L"foo");
1683 EXPECT_TRUE(m2.Matches(L"I love food."));
1684 EXPECT_FALSE(m2.Matches(L"tofo"));
1685 EXPECT_FALSE(m2.Matches(NULL));
1702 const Matcher<const ::std::wstring&> m2 = StartsWith(L"Hi");
1703 EXPECT_TRUE(m2.Matches(L"Hi"));
1704 EXPECT_TRUE(m2.Matches(L"Hi Hi!"));
1705 EXPECT_TRUE(m2.Matches(L"High"));
1706 EXPECT_FALSE(m2.Matches(L"H"));
1707 EXPECT_FALSE(m2.Matches(L" Hi"));
1723 const Matcher<const ::std::wstring&> m2 = EndsWith(::std::wstring(L"Hi"));
1724 EXPECT_TRUE(m2.Matches(L"Hi"));
1725 EXPECT_TRUE(m2.Matches(L"Wow Hi Hi"));
1726 EXPECT_TRUE(m2.Matches(L"Super Hi"));
1727 EXPECT_FALSE(m2.Matches(L"i"));
1728 EXPECT_FALSE(m2.Matches(L"Hi "));
1745 Matcher<const ::wstring&> m2 = StrEq(L"Hello");
1746 EXPECT_TRUE(m2.Matches(L"Hello"));
1747 EXPECT_FALSE(m2.Matches(L"Hi"));
1767 Matcher< ::wstring> m2 = StrEq(L"\xD3\x576\x8D3\xC74D");
1769 Describe(m2));
1786 Matcher< ::wstring> m2 = StrNe(::wstring(L"Hello"));
1787 EXPECT_TRUE(m2.Matches(L"hello"));
1788 EXPECT_FALSE(m2.Matches(L"Hello"));
1803 Matcher<const ::wstring&> m2 = StrCaseEq(L"Hello");
1804 EXPECT_TRUE(m2.Matches(L"hello"));
1805 EXPECT_FALSE(m2.Matches(L"Hi"));
1820 Matcher<const ::wstring&> m2 = StrCaseEq(str1);
1822 EXPECT_FALSE(m2.Matches(str2));
1845 Matcher< ::wstring> m2 = StrCaseNe(::wstring(L"Hello"));
1846 EXPECT_TRUE(m2.Matches(L""));
1847 EXPECT_FALSE(m2.Matches(L"Hello"));
1861 const Matcher<const ::wstring&> m2 = HasSubstr(L"foo");
1862 EXPECT_TRUE(m2.Matches(::wstring(L"I love food.")));
1863 EXPECT_FALSE(m2.Matches(::wstring(L"tofo")));
1873 const Matcher<const wchar_t*> m2 = HasSubstr(L"foo");
1874 EXPECT_TRUE(m2.Matches(L"I love food."));
1875 EXPECT_FALSE(m2.Matches(L"tofo"));
1876 EXPECT_FALSE(m2.Matches(NULL));
1893 const Matcher<const ::wstring&> m2 = StartsWith(L"Hi");
1894 EXPECT_TRUE(m2.Matches(L"Hi"));
1895 EXPECT_TRUE(m2.Matches(L"Hi Hi!"));
1896 EXPECT_TRUE(m2.Matches(L"High"));
1897 EXPECT_FALSE(m2.Matches(L"H"));
1898 EXPECT_FALSE(m2.Matches(L" Hi"));
1914 const Matcher<const ::wstring&> m2 = EndsWith(::wstring(L"Hi"));
1915 EXPECT_TRUE(m2.Matches(L"Hi"));
1916 EXPECT_TRUE(m2.Matches(L"Wow Hi Hi"));
1917 EXPECT_TRUE(m2.Matches(L"Super Hi"));
1918 EXPECT_FALSE(m2.Matches(L"i"));
1919 EXPECT_FALSE(m2.Matches(L"Hi "));
2041 Matcher<int&> m2 = Not(greater_than_5);
2192 Matcher<int&> m2 = AllOf(greater_than_5, less_than_10);
2193 Matcher<int&> m3 = AllOf(greater_than_5, m2);
2377 Matcher<int&> m2 = AnyOf(greater_than_5, less_than_10);
2378 Matcher<int&> m3 = AnyOf(greater_than_5, m2);
2743 Matcher<RawType> m2 = matcher_maker(close_to_positive_zero_);
2744 EXPECT_FALSE(m2.Matches(further_from_negative_zero_));
2833 Matcher<RawType> m2 = matcher_maker(0.0, 1.0);
2834 EXPECT_TRUE(m2.Matches(0.0));
2835 EXPECT_TRUE(m2.Matches(-0.0));
2836 EXPECT_TRUE(m2.Matches(1.0));
2837 EXPECT_TRUE(m2.Matches(-1.0));
2838 EXPECT_FALSE(m2.Matches(ParentType::close_to_one_));
2839 EXPECT_FALSE(m2.Matches(-ParentType::close_to_one_));
2931 Matcher<float> m2 = FloatEq(0.5f);
2932 EXPECT_EQ("is approximately 0.5", Describe(m2));
2933 EXPECT_EQ("isn't approximately 0.5", DescribeNegation(m2));
2945 Matcher<float> m2 = NanSensitiveFloatEq(0.5f);
2946 EXPECT_EQ("is approximately 0.5", Describe(m2));
2947 EXPECT_EQ("isn't approximately 0.5", DescribeNegation(m2));
2972 Matcher<float> m2 = FloatNear(0.5f, 0.5f);
2973 EXPECT_EQ("is approximately 0.5 (absolute error <= 0.5)", Describe(m2));
2975 "isn't approximately 0.5 (absolute error > 0.5)", DescribeNegation(m2));
2988 Matcher<float> m2 = NanSensitiveFloatNear(0.5f, 0.5f);
2989 EXPECT_EQ("is approximately 0.5 (absolute error <= 0.5)", Describe(m2));
2991 "isn't approximately 0.5 (absolute error > 0.5)", DescribeNegation(m2));
3046 Matcher<double> m2 = DoubleEq(0.5);
3047 EXPECT_EQ("is approximately 0.5", Describe(m2));
3048 EXPECT_EQ("isn't approximately 0.5", DescribeNegation(m2));
3060 Matcher<double> m2 = NanSensitiveDoubleEq(0.5);
3061 EXPECT_EQ("is approximately 0.5", Describe(m2));
3062 EXPECT_EQ("isn't approximately 0.5", DescribeNegation(m2));
3087 Matcher<double> m2 = DoubleNear(0.5, 0.5);
3088 EXPECT_EQ("is approximately 0.5 (absolute error <= 0.5)", Describe(m2));
3090 "isn't approximately 0.5 (absolute error > 0.5)", DescribeNegation(m2));
3116 Matcher<double> m2 = NanSensitiveDoubleNear(0.5, 0.5);
3117 EXPECT_EQ("is approximately 0.5 (absolute error <= 0.5)", Describe(m2));
3119 "isn't approximately 0.5 (absolute error > 0.5)", DescribeNegation(m2));
3344 const Matcher<long*> m2 = Pointee(GreaterThan(1)); // NOLINT
3347 Explain(m2, &n));
4145 Matcher<vector<int> > m2 = SizeIs(Lt(2u));
4150 EXPECT_EQ("whose size 0 matches", Explain(m2, container));
4157 EXPECT_EQ("whose size 2 doesn't match", Explain(m2, container));
4612 Matcher<vector<int> > m2 = BeginEndDistanceIs(Lt(2));
4619 Explain(m2, container));
4631 Explain(m2, container));
5354 Matcher<vector<int> > m2 = Not(m);
5355 EXPECT_EQ("contains some element that isn't equal to 1", Describe(m2));
5532 const Matcher<tuple<double, int> > m2 = IsHalfOf();
5533 EXPECT_THAT(lhs, Pointwise(m2, rhs));
5534 EXPECT_EQ("", Explain(Pointwise(m2, rhs), lhs));
5647 const Matcher<tuple<double, int> > m2 = IsHalfOf();
5648 EXPECT_THAT(lhs, UnorderedPointwise(m2, rhs));