aboutsummaryrefslogtreecommitdiffstats
path: root/test/gmock-port_test.cc
diff options
context:
space:
mode:
authorzhanyong.wan <zhanyong.wan@8415998a-534a-0410-bf83-d39667b30386>2009-09-16 07:02:02 +0000
committerzhanyong.wan <zhanyong.wan@8415998a-534a-0410-bf83-d39667b30386>2009-09-16 07:02:02 +0000
commitf5e1ce5b9237edbc2e524ae9ebcb2452dc842937 (patch)
treef02cea51a3eb519f36631db3e1826fd35624979d /test/gmock-port_test.cc
parentc53b3dca1b9ad6a6480b13744753916146b891d3 (diff)
downloadgoogletest-f5e1ce5b9237edbc2e524ae9ebcb2452dc842937.tar.gz
googletest-f5e1ce5b9237edbc2e524ae9ebcb2452dc842937.tar.bz2
googletest-f5e1ce5b9237edbc2e524ae9ebcb2452dc842937.zip
Adds new matcher Pair(). Replaces GMOCK_CHECK_ with GTEST_CHECK_ (by Vlad Losev).
Diffstat (limited to 'test/gmock-port_test.cc')
-rw-r--r--test/gmock-port_test.cc59
1 files changed, 1 insertions, 58 deletions
diff --git a/test/gmock-port_test.cc b/test/gmock-port_test.cc
index 7335405c..9a64ec33 100644
--- a/test/gmock-port_test.cc
+++ b/test/gmock-port_test.cc
@@ -36,61 +36,4 @@
#include <gmock/internal/gmock-port.h>
#include <gtest/gtest.h>
-TEST(GmockCheckSyntaxTest, BehavesLikeASingleStatement) {
- if (false)
- GMOCK_CHECK_(false) << "This should never be executed; "
- "It's a compilation test only.";
-
- if (true)
- GMOCK_CHECK_(true);
- else
- ;
-
- if (false)
- ;
- else
- GMOCK_CHECK_(true) << "";
-}
-
-TEST(GmockCheckSyntaxTest, WorksWithSwitch) {
- switch (0) {
- case 1:
- break;
- default:
- GMOCK_CHECK_(true);
- }
-
- switch(0)
- case 0:
- GMOCK_CHECK_(true) << "Check failed in switch case";
-}
-
-TEST(GmockCheckDeathTest, DiesWithCorrectOutputOnFailure) {
- const bool a_false_condition = false;
- // MSVC and gcc use different formats to print source file locations.
- // Google Mock's failure messages use the same format as used by the
- // compiler, in order for the IDE to recognize them. Therefore we look
- // for different patterns here depending on the compiler.
- const char regex[] =
-#ifdef _MSC_VER
- "gmock-port_test\\.cc\\(\\d+\\):"
-#else
- "gmock-port_test\\.cc:[0-9]+"
-#endif // _MSC_VER
- ".*a_false_condition.*Extra info";
-
- EXPECT_DEATH_IF_SUPPORTED(GMOCK_CHECK_(a_false_condition) << "Extra info",
- regex);
-}
-
-#if GTEST_HAS_DEATH_TEST
-
-TEST(GmockCheckDeathTest, LivesSilentlyOnSuccess) {
- EXPECT_EXIT({
- GMOCK_CHECK_(true) << "Extra info";
- ::std::cerr << "Success\n";
- exit(0); },
- ::testing::ExitedWithCode(0), "Success");
-}
-
-#endif // GTEST_HAS_DEATH_TEST
+// This file intentionally contains no test at this moment.