summaryrefslogtreecommitdiffstats
path: root/googlemock/test/gmock_ex_test.cc
diff options
context:
space:
mode:
authorAdrian Moran <amoran@ikerlan.es>2018-07-12 13:10:08 (GMT)
committerAdrian Moran <amoran@ikerlan.es>2018-07-12 13:10:08 (GMT)
commit0acdf796420e4562ef7399b8610d23eda3256a5a (patch)
tree8601b3d127682e8b168ec8e1851ed7670e1fbf8c /googlemock/test/gmock_ex_test.cc
parenta5190506e74633100260f82bdbeba1781607e85e (diff)
downloadgoogletest-0acdf796420e4562ef7399b8610d23eda3256a5a.zip
googletest-0acdf796420e4562ef7399b8610d23eda3256a5a.tar.gz
googletest-0acdf796420e4562ef7399b8610d23eda3256a5a.tar.bz2
Avoid full test in no exceptions are enabled.
Signed-off-by: Adrian Moran <amoran@ikerlan.es>
Diffstat (limited to 'googlemock/test/gmock_ex_test.cc')
-rw-r--r--googlemock/test/gmock_ex_test.cc7
1 files changed, 2 insertions, 5 deletions
diff --git a/googlemock/test/gmock_ex_test.cc b/googlemock/test/gmock_ex_test.cc
index 8c83890..5a299da 100644
--- a/googlemock/test/gmock_ex_test.cc
+++ b/googlemock/test/gmock_ex_test.cc
@@ -31,15 +31,14 @@
// Tests Google Mock's functionality that depends on exceptions.
+#if GTEST_HAS_EXCEPTIONS
#include "gmock/gmock.h"
#include "gtest/gtest.h"
namespace {
using testing::HasSubstr;
-#if GTEST_HAS_EXCEPTIONS
using testing::internal::GoogleTestFailureException;
-#endif
// A type that cannot be default constructed.
class NonDefaultConstructible {
@@ -54,7 +53,6 @@ class MockFoo {
MOCK_METHOD0(GetNonDefaultConstructible, NonDefaultConstructible());
};
-#if GTEST_HAS_EXCEPTIONS
TEST(DefaultValueTest, ThrowsRuntimeErrorWhenNoDefaultValue) {
MockFoo mock;
@@ -78,6 +76,5 @@ TEST(DefaultValueTest, ThrowsRuntimeErrorWhenNoDefaultValue) {
}
}
-#endif
-
} // unnamed namespace
+#endif