Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
yangql
googletest
Commits
0acdf796
Commit
0acdf796
authored
Jul 12, 2018
by
Adrian Moran
Browse files
Avoid full test in no exceptions are enabled.
Signed-off-by:
Adrian Moran
<
amoran@ikerlan.es
>
parent
a5190506
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
5 deletions
+2
-5
googlemock/test/gmock_ex_test.cc
googlemock/test/gmock_ex_test.cc
+2
-5
No files found.
googlemock/test/gmock_ex_test.cc
View file @
0acdf796
...
@@ -31,15 +31,14 @@
...
@@ -31,15 +31,14 @@
// Tests Google Mock's functionality that depends on exceptions.
// Tests Google Mock's functionality that depends on exceptions.
#if GTEST_HAS_EXCEPTIONS
#include "gmock/gmock.h"
#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include "gtest/gtest.h"
namespace
{
namespace
{
using
testing
::
HasSubstr
;
using
testing
::
HasSubstr
;
#if GTEST_HAS_EXCEPTIONS
using
testing
::
internal
::
GoogleTestFailureException
;
using
testing
::
internal
::
GoogleTestFailureException
;
#endif
// A type that cannot be default constructed.
// A type that cannot be default constructed.
class
NonDefaultConstructible
{
class
NonDefaultConstructible
{
...
@@ -54,7 +53,6 @@ class MockFoo {
...
@@ -54,7 +53,6 @@ class MockFoo {
MOCK_METHOD0
(
GetNonDefaultConstructible
,
NonDefaultConstructible
());
MOCK_METHOD0
(
GetNonDefaultConstructible
,
NonDefaultConstructible
());
};
};
#if GTEST_HAS_EXCEPTIONS
TEST
(
DefaultValueTest
,
ThrowsRuntimeErrorWhenNoDefaultValue
)
{
TEST
(
DefaultValueTest
,
ThrowsRuntimeErrorWhenNoDefaultValue
)
{
MockFoo
mock
;
MockFoo
mock
;
...
@@ -78,6 +76,5 @@ TEST(DefaultValueTest, ThrowsRuntimeErrorWhenNoDefaultValue) {
...
@@ -78,6 +76,5 @@ TEST(DefaultValueTest, ThrowsRuntimeErrorWhenNoDefaultValue) {
}
}
}
}
#endif
}
// unnamed namespace
}
// unnamed namespace
#endif
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment