Lines Matching refs:m1

153   Matcher<int> m1 = 5;
154 EXPECT_TRUE(m1.Matches(5));
155 EXPECT_FALSE(m1.Matches(6));
160 Matcher<int*> m1 = nullptr;
161 EXPECT_TRUE(m1.Matches(nullptr));
163 EXPECT_FALSE(m1.Matches(&n));
174 Matcher<int> m1 = Undefined::kInt;
175 EXPECT_TRUE(m1.Matches(1));
176 EXPECT_FALSE(m1.Matches(2));
185 Matcher<bool> m1 = Eq(false);
186 EXPECT_TRUE(m1.Matches(false));
187 EXPECT_FALSE(m1.Matches(true));
190 m1 = Eq(true);
191 EXPECT_TRUE(m1.Matches(true));
192 EXPECT_FALSE(m1.Matches(false));
216 Matcher<std::string> m1 = "hi";
217 EXPECT_TRUE(m1.Matches("hi"));
218 EXPECT_FALSE(m1.Matches("hello"));
228 Matcher<std::string> m1 = std::string("hi");
229 EXPECT_TRUE(m1.Matches("hi"));
230 EXPECT_FALSE(m1.Matches("hello"));
241 Matcher<internal::StringView> m1 = "cats";
242 EXPECT_TRUE(m1.Matches("cats"));
243 EXPECT_FALSE(m1.Matches("dogs"));
253 Matcher<internal::StringView> m1 = std::string("cats");
254 EXPECT_TRUE(m1.Matches("cats"));
255 EXPECT_FALSE(m1.Matches("dogs"));
265 Matcher<internal::StringView> m1 = internal::StringView("cats");
266 EXPECT_TRUE(m1.Matches("cats"));
267 EXPECT_FALSE(m1.Matches("dogs"));
280 Matcher<std::string> m1 = Eq(std::ref(value));
281 EXPECT_TRUE(m1.Matches("cats"));
282 EXPECT_FALSE(m1.Matches("dogs"));
323 Matcher<const int&> m1 = ReferencesBarOrIsZero();
324 EXPECT_TRUE(m1.Matches(0));
326 EXPECT_TRUE(m1.Matches(g_bar));
327 EXPECT_FALSE(m1.Matches(1));
328 EXPECT_EQ("g_bar or zero", Describe(m1));
364 const Matcher<int> m1 = PolymorphicIsEven();
365 EXPECT_TRUE(m1.Matches(42));
366 EXPECT_FALSE(m1.Matches(43));
367 EXPECT_EQ("is even", Describe(m1));
369 const Matcher<int> not_m1 = Not(m1);
372 EXPECT_EQ("% 2 == 0", Explain(m1, 42));
419 Matcher<double> m1 = Eq(2.0);
420 Matcher<int> m2 = MatcherCast<int>(m1);
435 Matcher<const int&> m1 = Eq(0);
436 Matcher<int> m2 = MatcherCast<int>(m1);
443 Matcher<int&> m1 = Eq(0);
444 Matcher<int> m2 = MatcherCast<int>(m1);
451 Matcher<int> m1 = Eq(0);
452 Matcher<const int&> m2 = MatcherCast<const int&>(m1);
459 Matcher<int> m1 = Eq(0);
460 Matcher<int&> m2 = MatcherCast<int&>(m1);
469 Matcher<int> m1 = Eq(0);
470 Matcher<int> m2 = MatcherCast<int>(m1);
509 Matcher<NonImplicitlyConstructibleTypeWithOperatorEq> m1 =
511 EXPECT_TRUE(m1.Matches(NonImplicitlyConstructibleTypeWithOperatorEq()));
626 Matcher<double> m1 = DoubleEq(1.0);
627 Matcher<float> m2 = SafeMatcherCast<float>(m1);
640 Matcher<Base*> m1 = Eq(&d);
641 Matcher<Derived*> m2 = SafeMatcherCast<Derived*>(m1);
654 Matcher<const int&> m1 = Ref(n);
655 Matcher<int&> m2 = SafeMatcherCast<int&>(m1);
663 Matcher<std::unique_ptr<int>> m1 = IsNull();
665 SafeMatcherCast<const std::unique_ptr<int>&>(m1);
672 Matcher<int> m1 = Eq(0);
673 Matcher<int&> m2 = SafeMatcherCast<int&>(m1);
682 Matcher<int> m1 = Eq(0);
683 Matcher<int> m2 = SafeMatcherCast<int>(m1);
732 Matcher<double> m1 = A<double>();
733 EXPECT_TRUE(m1.Matches(91.43));
734 EXPECT_TRUE(m1.Matches(-15.32));
759 Matcher<int> m1 = An<int>();
760 EXPECT_TRUE(m1.Matches(9143));
761 EXPECT_TRUE(m1.Matches(-1532));
778 Matcher<int> m1 = _;
779 EXPECT_TRUE(m1.Matches(123));
780 EXPECT_TRUE(m1.Matches(-242));
802 Matcher<const char*> m1 = Eq(a1);
803 EXPECT_TRUE(m1.Matches(a1));
804 EXPECT_FALSE(m1.Matches(a2));
829 Matcher<int> m1 = Eq(1);
830 EXPECT_TRUE(m1.Matches(1));
831 EXPECT_FALSE(m1.Matches(2));
840 Matcher<char> m1 = TypedEq<char>('a');
841 EXPECT_TRUE(m1.Matches('a'));
842 EXPECT_FALSE(m1.Matches('b'));
875 Matcher<int> m1 = Ge(0);
876 EXPECT_TRUE(m1.Matches(1));
877 EXPECT_TRUE(m1.Matches(0));
878 EXPECT_FALSE(m1.Matches(-1));
889 Matcher<double> m1 = Gt(0);
890 EXPECT_TRUE(m1.Matches(1.0));
891 EXPECT_FALSE(m1.Matches(0.0));
892 EXPECT_FALSE(m1.Matches(-1.0));
903 Matcher<char> m1 = Le('b');
904 EXPECT_TRUE(m1.Matches('a'));
905 EXPECT_TRUE(m1.Matches('b'));
906 EXPECT_FALSE(m1.Matches('c'));
917 Matcher<const std::string&> m1 = Lt("Hello");
918 EXPECT_TRUE(m1.Matches("Abc"));
919 EXPECT_FALSE(m1.Matches("Hello"));
920 EXPECT_FALSE(m1.Matches("Hello, world!"));
931 Matcher<int> m1 = Ne(0);
932 EXPECT_TRUE(m1.Matches(1));
933 EXPECT_TRUE(m1.Matches(-1));
934 EXPECT_FALSE(m1.Matches(0));
1015 Matcher<int*> m1 = IsNull();
1018 EXPECT_TRUE(m1.Matches(p1));
1019 EXPECT_FALSE(m1.Matches(&n));
1048 Matcher<int*> m1 = NotNull();
1051 EXPECT_FALSE(m1.Matches(p1));
1052 EXPECT_TRUE(m1.Matches(&n));
1127 Matcher<const Base&> m1 = Ref(base);
1128 EXPECT_TRUE(m1.Matches(base));
1129 EXPECT_FALSE(m1.Matches(base2));
1130 EXPECT_FALSE(m1.Matches(derived));
1132 m1 = Ref(derived);
1133 EXPECT_TRUE(m1.Matches(derived));
1134 EXPECT_FALSE(m1.Matches(base));
1135 EXPECT_FALSE(m1.Matches(base2));
1258 Matcher<const std::string&> m1 = StrCaseEq(str1);
1259 EXPECT_TRUE(m1.Matches(str2));
1309 const Matcher<std::string> m1 = HasSubstr("foo");
1310 EXPECT_TRUE(m1.Matches(std::string("I love food.")));
1311 EXPECT_FALSE(m1.Matches(std::string("tofo")));
1324 const Matcher<char*> m1 = HasSubstr("foo");
1325 EXPECT_TRUE(m1.Matches(const_cast<char*>("I love food.")));
1326 EXPECT_FALSE(m1.Matches(const_cast<char*>("tofo")));
1327 EXPECT_FALSE(m1.Matches(nullptr));
1343 const Matcher<internal::StringView> m1 =
1345 EXPECT_TRUE(m1.Matches(internal::StringView("I love food.")));
1346 EXPECT_FALSE(m1.Matches(internal::StringView("tofo")));
1347 EXPECT_FALSE(m1.Matches(internal::StringView()));
1460 Matcher<const pair<const char*, int>&> m1 = Pair("foo", 42);
1469 Matcher<const pair<std::string, int>&> m1 = Pair("foo", 42);
1473 Describe(m1));
1477 DescribeNegation(m1));
1590 Matcher<const pair<std::string, int>&> m1 = FieldsAre("foo", 42);
1594 Describe(m1));
1598 DescribeNegation(m1));
1746 const Matcher<const char*> m1 = StartsWith(std::string(""));
1747 EXPECT_TRUE(m1.Matches("Hi"));
1748 EXPECT_TRUE(m1.Matches(""));
1749 EXPECT_FALSE(m1.Matches(nullptr));
1775 const Matcher<const char*> m1 = EndsWith("");
1776 EXPECT_TRUE(m1.Matches("Hi"));
1777 EXPECT_TRUE(m1.Matches(""));
1778 EXPECT_FALSE(m1.Matches(nullptr));
1805 const Matcher<const char*> m1 = WhenBase64Unescaped(EndsWith("!"));
1806 EXPECT_FALSE(m1.Matches("invalid base64"));
1807 EXPECT_FALSE(m1.Matches("aGVsbG8gd29ybGQ=")); // hello world
1808 EXPECT_TRUE(m1.Matches("aGVsbG8gd29ybGQh")); // hello world!
1809 EXPECT_TRUE(m1.Matches("+/-_IQ")); // \xfb\xff\xbf!
1835 const Matcher<const char*> m1 = MatchesRegex("a.*z");
1836 EXPECT_TRUE(m1.Matches("az"));
1837 EXPECT_TRUE(m1.Matches("abcz"));
1838 EXPECT_FALSE(m1.Matches(nullptr));
1859 Matcher<const std::string> m1 = MatchesRegex(std::string("Hi.*"));
1860 EXPECT_EQ("matches regular expression \"Hi.*\"", Describe(m1));
1874 const Matcher<const char*> m1 = ContainsRegex(std::string("a.*z"));
1875 EXPECT_TRUE(m1.Matches("az"));
1876 EXPECT_TRUE(m1.Matches("0abcz1"));
1877 EXPECT_FALSE(m1.Matches(nullptr));
1898 Matcher<const std::string> m1 = ContainsRegex("Hi.*");
1899 EXPECT_EQ("contains regular expression \"Hi.*\"", Describe(m1));
1987 Matcher<const ::std::wstring&> m1 = StrCaseEq(str1);
1988 EXPECT_TRUE(m1.Matches(str2));
2029 const Matcher<::std::wstring> m1 = HasSubstr(L"foo");
2030 EXPECT_TRUE(m1.Matches(::std::wstring(L"I love food.")));
2031 EXPECT_FALSE(m1.Matches(::std::wstring(L"tofo")));
2040 const Matcher<wchar_t*> m1 = HasSubstr(L"foo");
2041 EXPECT_TRUE(m1.Matches(const_cast<wchar_t*>(L"I love food.")));
2042 EXPECT_FALSE(m1.Matches(const_cast<wchar_t*>(L"tofo")));
2043 EXPECT_FALSE(m1.Matches(nullptr));
2060 const Matcher<const wchar_t*> m1 = StartsWith(::std::wstring(L""));
2061 EXPECT_TRUE(m1.Matches(L"Hi"));
2062 EXPECT_TRUE(m1.Matches(L""));
2063 EXPECT_FALSE(m1.Matches(nullptr));
2081 const Matcher<const wchar_t*> m1 = EndsWith(L"");
2082 EXPECT_TRUE(m1.Matches(L"Hi"));
2083 EXPECT_TRUE(m1.Matches(L""));
2084 EXPECT_FALSE(m1.Matches(nullptr));