Lines Matching +full:use +full:- +full:internal +full:- +full:divider

4 // Redistribution and use in source and binary forms, with or without
24 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 // Google Mock - a framework for writing C++ mock classes.
40 #include "test/gmock-matchers_test.h"
119 if (listener->stream() != nullptr) { in MatchAndExplain()
122 *listener->stream() << " == " << (x % 2); in MatchAndExplain()
140 // Tests default-constructing a matcher.
209 EXPECT_FALSE(m.MatchAndExplain(-9, &listener2)); in TEST_P()
213 // Tests that a C-string literal can be implicitly converted to a
238 // Tests that a C-string literal can be implicitly converted to a
241 Matcher<internal::StringView> m1 = "cats"; in TEST()
245 Matcher<const internal::StringView&> m2 = "cats"; in TEST()
253 Matcher<internal::StringView> m1 = std::string("cats"); in TEST()
257 Matcher<const internal::StringView&> m2 = std::string("cats"); in TEST()
265 Matcher<internal::StringView> m1 = internal::StringView("cats"); in TEST()
269 Matcher<const internal::StringView&> m2 = internal::StringView("cats"); in TEST()
325 // Verifies that the identity of a by-reference argument is preserved. in TEST()
349 if (listener->stream() != nullptr) { in MatchAndExplain()
352 *listener->stream() << " == " << (x % 2); in MatchAndExplain()
544 ConvertibleFromAny(const T& /*a_value*/) : value(-1) { in ConvertibleFromAny()
734 EXPECT_TRUE(m1.Matches(-15.32)); in TEST()
738 int b = -6; in TEST()
761 EXPECT_TRUE(m1.Matches(-1532)); in TEST()
765 int b = -6; in TEST()
780 EXPECT_TRUE(m1.Matches(-242)); in TEST()
798 // 2 C-strings with same content but different addresses. in TEST()
814 // -Wunused-private-field: dummy accessor for `c_`.
823 EXPECT_EQ("is equal to 1-byte object <61>", Describe(m)); in TEST()
878 EXPECT_FALSE(m1.Matches(-1)); in TEST()
892 EXPECT_FALSE(m1.Matches(-1.0)); in TEST()
933 EXPECT_TRUE(m1.Matches(-1)); in TEST()
982 helper.Call(MoveOnly(-1)); in TEST()
1046 // Tests that NotNull() matches any non-NULL pointer of any type. in TEST()
1121 // used wherever Ref(base) can be used (Ref(derived) is a sub-type in TEST()
1151 std::string FromStringLike(internal::StringLike<T> str) { in TEST()
1159 EXPECT_EQ("foo", FromStringLike(internal::StringView("foo"))); in TEST()
1180 Matcher<const internal::StringView&> m3 = in TEST()
1181 StrEq(internal::StringView("Hello")); in TEST()
1182 EXPECT_TRUE(m3.Matches(internal::StringView("Hello"))); in TEST()
1183 EXPECT_FALSE(m3.Matches(internal::StringView("hello"))); in TEST()
1184 EXPECT_FALSE(m3.Matches(internal::StringView())); in TEST()
1186 Matcher<const internal::StringView&> m_empty = StrEq(""); in TEST()
1187 EXPECT_TRUE(m_empty.Matches(internal::StringView(""))); in TEST()
1188 EXPECT_TRUE(m_empty.Matches(internal::StringView())); in TEST()
1189 EXPECT_FALSE(m_empty.Matches(internal::StringView("hello"))); in TEST()
1194 Matcher<std::string> m = StrEq("Hi-\'\"?\\\a\b\f\n\r\t\v\xD3"); in TEST()
1195 EXPECT_EQ("is equal to \"Hi-\'\\\"?\\\\\\a\\b\\f\\n\\r\\t\\v\\xD3\"", in TEST()
1218 Matcher<const internal::StringView> m3 = StrNe(internal::StringView("Hello")); in TEST()
1219 EXPECT_TRUE(m3.Matches(internal::StringView(""))); in TEST()
1220 EXPECT_TRUE(m3.Matches(internal::StringView())); in TEST()
1221 EXPECT_FALSE(m3.Matches(internal::StringView("Hello"))); in TEST()
1242 Matcher<const internal::StringView&> m3 = in TEST()
1243 StrCaseEq(internal::StringView("Hello")); in TEST()
1244 EXPECT_TRUE(m3.Matches(internal::StringView("Hello"))); in TEST()
1245 EXPECT_TRUE(m3.Matches(internal::StringView("hello"))); in TEST()
1246 EXPECT_FALSE(m3.Matches(internal::StringView("Hi"))); in TEST()
1247 EXPECT_FALSE(m3.Matches(internal::StringView())); in TEST()
1293 Matcher<const internal::StringView> m3 = in TEST()
1294 StrCaseNe(internal::StringView("Hello")); in TEST()
1295 EXPECT_TRUE(m3.Matches(internal::StringView("Hi"))); in TEST()
1296 EXPECT_TRUE(m3.Matches(internal::StringView())); in TEST()
1297 EXPECT_FALSE(m3.Matches(internal::StringView("Hello"))); in TEST()
1298 EXPECT_FALSE(m3.Matches(internal::StringView("hello"))); in TEST()
1307 // Tests that HasSubstr() works for matching string-typed values. in TEST()
1322 // Tests that HasSubstr() works for matching C-string-typed values. in TEST()
1341 // Tests that HasSubstr() works for matching StringView-typed values. in TEST()
1343 const Matcher<internal::StringView> m1 = in TEST()
1344 HasSubstr(internal::StringView("foo")); in TEST()
1345 EXPECT_TRUE(m1.Matches(internal::StringView("I love food."))); in TEST()
1346 EXPECT_FALSE(m1.Matches(internal::StringView("tofo"))); in TEST()
1347 EXPECT_FALSE(m1.Matches(internal::StringView())); in TEST()
1349 const Matcher<const internal::StringView&> m2 = HasSubstr("foo"); in TEST()
1350 EXPECT_TRUE(m2.Matches(internal::StringView("I love food."))); in TEST()
1351 EXPECT_FALSE(m2.Matches(internal::StringView("tofo"))); in TEST()
1352 EXPECT_FALSE(m2.Matches(internal::StringView())); in TEST()
1354 const Matcher<const internal::StringView&> m3 = HasSubstr(""); in TEST()
1355 EXPECT_TRUE(m3.Matches(internal::StringView("foo"))); in TEST()
1356 EXPECT_TRUE(m3.Matches(internal::StringView(""))); in TEST()
1357 EXPECT_TRUE(m3.Matches(internal::StringView())); in TEST()
1411 auto get(const PairWithGet& value) -> decltype(value.GetImpl(Tag<I>())) { in TEST()
1491 Explain(m, make_pair(-1, -2))); in TEST()
1496 Explain(m, make_pair(1, -2))); in TEST()
1501 Explain(m, make_pair(-1, 2))); in TEST()
1607 Explain(m, std::make_tuple(-1, -2, -3))); in TEST()
1609 Explain(m, std::make_tuple(1, -2, -3))); in TEST()
1611 Explain(m, std::make_tuple(1, 2, -3))); in TEST()
1759 const Matcher<internal::StringView> m_empty = in TEST()
1760 StartsWith(internal::StringView("")); in TEST()
1761 EXPECT_TRUE(m_empty.Matches(internal::StringView())); in TEST()
1762 EXPECT_TRUE(m_empty.Matches(internal::StringView(""))); in TEST()
1763 EXPECT_TRUE(m_empty.Matches(internal::StringView("not empty"))); in TEST()
1774 EXPECT_THAT(internal::StringView("talk to me goose"), in TEST()
1777 GTEST_SKIP() << "Not applicable without internal::StringView."; in TEST()
1797 const Matcher<const internal::StringView&> m4 = in TEST()
1798 EndsWith(internal::StringView("")); in TEST()
1801 EXPECT_TRUE(m4.Matches(internal::StringView())); in TEST()
1802 EXPECT_TRUE(m4.Matches(internal::StringView(""))); in TEST()
1818 EXPECT_TRUE(m1.Matches("+/-_IQ")); // \xfb\xff\xbf! in TEST()
1824 EXPECT_TRUE(m2.Matches("+/-_IQ")); // \xfb\xff\xbf! in TEST()
1827 const Matcher<const internal::StringView&> m3 = in TEST()
1832 EXPECT_TRUE(m3.Matches("+/-_IQ")); // \xfb\xff\xbf! in TEST()
1855 const Matcher<const internal::StringView&> m3 = MatchesRegex("a.*z"); in TEST()
1856 EXPECT_TRUE(m3.Matches(internal::StringView("az"))); in TEST()
1857 EXPECT_TRUE(m3.Matches(internal::StringView("abcz"))); in TEST()
1858 EXPECT_FALSE(m3.Matches(internal::StringView("1az"))); in TEST()
1859 EXPECT_FALSE(m3.Matches(internal::StringView())); in TEST()
1860 const Matcher<const internal::StringView&> m4 = in TEST()
1861 MatchesRegex(internal::StringView("")); in TEST()
1862 EXPECT_TRUE(m4.Matches(internal::StringView(""))); in TEST()
1863 EXPECT_TRUE(m4.Matches(internal::StringView())); in TEST()
1875 Matcher<const internal::StringView> m3 = MatchesRegex(new RE("0.*")); in TEST()
1894 const Matcher<const internal::StringView&> m3 = ContainsRegex(new RE("a.*z")); in TEST()
1895 EXPECT_TRUE(m3.Matches(internal::StringView("azbz"))); in TEST()
1896 EXPECT_TRUE(m3.Matches(internal::StringView("az1"))); in TEST()
1897 EXPECT_FALSE(m3.Matches(internal::StringView("1a"))); in TEST()
1898 EXPECT_FALSE(m3.Matches(internal::StringView())); in TEST()
1899 const Matcher<const internal::StringView&> m4 = in TEST()
1900 ContainsRegex(internal::StringView("")); in TEST()
1901 EXPECT_TRUE(m4.Matches(internal::StringView(""))); in TEST()
1902 EXPECT_TRUE(m4.Matches(internal::StringView())); in TEST()
1914 Matcher<const internal::StringView> m3 = ContainsRegex(new RE("0.*")); in TEST()
1945 Matcher<::std::wstring> m = StrEq(L"Hi-\'\"?\\\a\b\f\n\r\t\v"); in TEST()
1946 EXPECT_EQ("is equal to L\"Hi-\'\\\"?\\\\\\a\\b\\f\\n\\r\\t\\v\"", in TEST()
2036 // Tests that HasSubstr() works for matching wstring-typed values. in TEST()
2047 // Tests that HasSubstr() works for matching C-wide-string-typed values. in TEST()
2256 "when dynamic_cast to " + internal::GetTypeName<Derived*>() + ", "; in TEST()
2309 int divider() const { return divider_; } in TEST() function in testing::gmock_matchers_test::__anonbdf523750111::DivisibleByImpl
2363 EXPECT_EQ(42, impl.divider()); in TEST()
2366 EXPECT_EQ(0, m.mutable_impl().divider()); in TEST()
2373 EXPECT_EQ(42, impl.divider()); in TEST()