diff options
author | BrukerJWD <jonathan.wendeborn@bruker.com> | 2018-10-16 08:37:56 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-16 08:37:56 +0200 |
commit | 8c82ba48e433005b9e25835b4a342ef4dcc0cfc0 (patch) | |
tree | e1ae94f37108a8f506cd4d11eec0e058c2c39980 /googlemock/test/gmock_ex_test.cc | |
parent | 6bbf911a8dc0c42ad05135f26a07f4893eb83916 (diff) | |
parent | a651a4d44e65b749467fa3dddf93819a22f0cc4a (diff) | |
download | googletest-8c82ba48e433005b9e25835b4a342ef4dcc0cfc0.tar.gz googletest-8c82ba48e433005b9e25835b4a342ef4dcc0cfc0.tar.bz2 googletest-8c82ba48e433005b9e25835b4a342ef4dcc0cfc0.zip |
Merge branch 'master' into isnice
Diffstat (limited to 'googlemock/test/gmock_ex_test.cc')
-rw-r--r-- | googlemock/test/gmock_ex_test.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/googlemock/test/gmock_ex_test.cc b/googlemock/test/gmock_ex_test.cc index 3afed86a..72eb43f7 100644 --- a/googlemock/test/gmock_ex_test.cc +++ b/googlemock/test/gmock_ex_test.cc @@ -26,17 +26,18 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // Tests Google Mock's functionality that depends on exceptions. #include "gmock/gmock.h" #include "gtest/gtest.h" +#if GTEST_HAS_EXCEPTIONS namespace { using testing::HasSubstr; + using testing::internal::GoogleTestFailureException; // A type that cannot be default constructed. @@ -52,8 +53,6 @@ class MockFoo { MOCK_METHOD0(GetNonDefaultConstructible, NonDefaultConstructible()); }; -#if GTEST_HAS_EXCEPTIONS - TEST(DefaultValueTest, ThrowsRuntimeErrorWhenNoDefaultValue) { MockFoo mock; try { @@ -76,6 +75,6 @@ TEST(DefaultValueTest, ThrowsRuntimeErrorWhenNoDefaultValue) { } } -#endif } // unnamed namespace +#endif |