diff options
author | Conor Burgess <Burgess.Conor@gmail.com> | 2018-08-17 17:15:32 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-17 17:15:32 +0100 |
commit | 687964c84f798ce331fc60f6b8f212410ef46b3c (patch) | |
tree | 20ed743afd555c46b91361cf864c76643f1d89b2 /googlemock/test/gmock_ex_test.cc | |
parent | f11a8f9131584cf4009eca8af8a66e920c1b7391 (diff) | |
parent | 02a8ca87735601466d8c564344f9be493da84708 (diff) | |
download | googletest-687964c84f798ce331fc60f6b8f212410ef46b3c.tar.gz googletest-687964c84f798ce331fc60f6b8f212410ef46b3c.tar.bz2 googletest-687964c84f798ce331fc60f6b8f212410ef46b3c.zip |
Merge branch 'master' into fix-argc
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 |