aboutsummaryrefslogtreecommitdiffstats
path: root/googlemock/test/gmock_output_test_.cc
diff options
context:
space:
mode:
authorTanzinul Islam <t_17_7@hotmail.com>2018-05-05 19:53:33 +0100
committerTanzinul Islam <t_17_7@hotmail.com>2018-05-05 19:53:33 +0100
commit10f05a627c2da8d7de78da1b08f984ce8de398fb (patch)
tree4f799952ac6fa35647a653cc12caf42efd73e005 /googlemock/test/gmock_output_test_.cc
parent5c7c365d5f3e5467de350f2e81a31407a3f52505 (diff)
parent278aba369c41e90e9e77a6f51443beb3692919cf (diff)
downloadgoogletest-10f05a627c2da8d7de78da1b08f984ce8de398fb.tar.gz
googletest-10f05a627c2da8d7de78da1b08f984ce8de398fb.tar.bz2
googletest-10f05a627c2da8d7de78da1b08f984ce8de398fb.zip
Merge branch 'master' into fix_death_test_child_mingw_wer_issue1116
Diffstat (limited to 'googlemock/test/gmock_output_test_.cc')
-rw-r--r--googlemock/test/gmock_output_test_.cc15
1 files changed, 15 insertions, 0 deletions
diff --git a/googlemock/test/gmock_output_test_.cc b/googlemock/test/gmock_output_test_.cc
index d80e2b08..1b59eb3f 100644
--- a/googlemock/test/gmock_output_test_.cc
+++ b/googlemock/test/gmock_output_test_.cc
@@ -39,6 +39,12 @@
#include "gtest/gtest.h"
+// Silence C4100 (unreferenced formal parameter)
+#ifdef _MSC_VER
+# pragma warning(push)
+# pragma warning(disable:4100)
+#endif
+
using testing::_;
using testing::AnyNumber;
using testing::Ge;
@@ -273,6 +279,11 @@ MATCHER_P2(IsPair, first, second, "") {
return Value(arg.first, first) && Value(arg.second, second);
}
+TEST_F(GMockOutputTest, PrintsMatcher) {
+ const testing::Matcher<int> m1 = Ge(48);
+ EXPECT_THAT((std::pair<int, bool>(42, true)), IsPair(m1, true));
+}
+
void TestCatchesLeakedMocksInAdHocTests() {
MockFoo* foo = new MockFoo;
@@ -293,3 +304,7 @@ int main(int argc, char **argv) {
TestCatchesLeakedMocksInAdHocTests();
return RUN_ALL_TESTS();
}
+
+#ifdef _MSC_VER
+# pragma warning(pop)
+#endif