Lines Matching refs:StringView
238 // Matcher<StringView> or Matcher<const StringView&>.
240 Matcher<internal::StringView> m1 = "cats";
244 Matcher<const internal::StringView&> m2 = "cats";
250 // Matcher<StringView> or Matcher<const StringView&>.
252 Matcher<internal::StringView> m1 = std::string("cats");
256 Matcher<const internal::StringView&> m2 = std::string("cats");
261 // Tests that a StringView object can be implicitly converted to a
262 // Matcher<StringView> or Matcher<const StringView&>.
264 Matcher<internal::StringView> m1 = internal::StringView("cats");
268 Matcher<const internal::StringView&> m2 = internal::StringView("cats");
1158 EXPECT_EQ("foo", FromStringLike(internal::StringView("foo")));
1179 Matcher<const internal::StringView&> m3 =
1180 StrEq(internal::StringView("Hello"));
1181 EXPECT_TRUE(m3.Matches(internal::StringView("Hello")));
1182 EXPECT_FALSE(m3.Matches(internal::StringView("hello")));
1183 EXPECT_FALSE(m3.Matches(internal::StringView()));
1185 Matcher<const internal::StringView&> m_empty = StrEq("");
1186 EXPECT_TRUE(m_empty.Matches(internal::StringView("")));
1187 EXPECT_TRUE(m_empty.Matches(internal::StringView()));
1188 EXPECT_FALSE(m_empty.Matches(internal::StringView("hello")));
1217 Matcher<const internal::StringView> m3 = StrNe(internal::StringView("Hello"));
1218 EXPECT_TRUE(m3.Matches(internal::StringView("")));
1219 EXPECT_TRUE(m3.Matches(internal::StringView()));
1220 EXPECT_FALSE(m3.Matches(internal::StringView("Hello")));
1241 Matcher<const internal::StringView&> m3 =
1242 StrCaseEq(internal::StringView("Hello"));
1243 EXPECT_TRUE(m3.Matches(internal::StringView("Hello")));
1244 EXPECT_TRUE(m3.Matches(internal::StringView("hello")));
1245 EXPECT_FALSE(m3.Matches(internal::StringView("Hi")));
1246 EXPECT_FALSE(m3.Matches(internal::StringView()));
1292 Matcher<const internal::StringView> m3 =
1293 StrCaseNe(internal::StringView("Hello"));
1294 EXPECT_TRUE(m3.Matches(internal::StringView("Hi")));
1295 EXPECT_TRUE(m3.Matches(internal::StringView()));
1296 EXPECT_FALSE(m3.Matches(internal::StringView("Hello")));
1297 EXPECT_FALSE(m3.Matches(internal::StringView("hello")));
1340 // Tests that HasSubstr() works for matching StringView-typed values.
1342 const Matcher<internal::StringView> m1 =
1343 HasSubstr(internal::StringView("foo"));
1344 EXPECT_TRUE(m1.Matches(internal::StringView("I love food.")));
1345 EXPECT_FALSE(m1.Matches(internal::StringView("tofo")));
1346 EXPECT_FALSE(m1.Matches(internal::StringView()));
1348 const Matcher<const internal::StringView&> m2 = HasSubstr("foo");
1349 EXPECT_TRUE(m2.Matches(internal::StringView("I love food.")));
1350 EXPECT_FALSE(m2.Matches(internal::StringView("tofo")));
1351 EXPECT_FALSE(m2.Matches(internal::StringView()));
1353 const Matcher<const internal::StringView&> m3 = HasSubstr("");
1354 EXPECT_TRUE(m3.Matches(internal::StringView("foo")));
1355 EXPECT_TRUE(m3.Matches(internal::StringView("")));
1356 EXPECT_TRUE(m3.Matches(internal::StringView()));
1758 const Matcher<internal::StringView> m_empty =
1759 StartsWith(internal::StringView(""));
1760 EXPECT_TRUE(m_empty.Matches(internal::StringView()));
1761 EXPECT_TRUE(m_empty.Matches(internal::StringView("")));
1762 EXPECT_TRUE(m_empty.Matches(internal::StringView("not empty")));
1787 const Matcher<const internal::StringView&> m4 =
1788 EndsWith(internal::StringView(""));
1791 EXPECT_TRUE(m4.Matches(internal::StringView()));
1792 EXPECT_TRUE(m4.Matches(internal::StringView("")));
1815 const Matcher<const internal::StringView&> m3 =
1842 const Matcher<const internal::StringView&> m3 = MatchesRegex("a.*z");
1843 EXPECT_TRUE(m3.Matches(internal::StringView("az")));
1844 EXPECT_TRUE(m3.Matches(internal::StringView("abcz")));
1845 EXPECT_FALSE(m3.Matches(internal::StringView("1az")));
1846 EXPECT_FALSE(m3.Matches(internal::StringView()));
1847 const Matcher<const internal::StringView&> m4 =
1848 MatchesRegex(internal::StringView(""));
1849 EXPECT_TRUE(m4.Matches(internal::StringView("")));
1850 EXPECT_TRUE(m4.Matches(internal::StringView()));
1862 Matcher<const internal::StringView> m3 = MatchesRegex(new RE("0.*"));
1881 const Matcher<const internal::StringView&> m3 = ContainsRegex(new RE("a.*z"));
1882 EXPECT_TRUE(m3.Matches(internal::StringView("azbz")));
1883 EXPECT_TRUE(m3.Matches(internal::StringView("az1")));
1884 EXPECT_FALSE(m3.Matches(internal::StringView("1a")));
1885 EXPECT_FALSE(m3.Matches(internal::StringView()));
1886 const Matcher<const internal::StringView&> m4 =
1887 ContainsRegex(internal::StringView(""));
1888 EXPECT_TRUE(m4.Matches(internal::StringView("")));
1889 EXPECT_TRUE(m4.Matches(internal::StringView()));
1901 Matcher<const internal::StringView> m3 = ContainsRegex(new RE("0.*"));