diff options
author | Gennadiy Civil <gennadiycivil@users.noreply.github.com> | 2018-08-16 11:13:12 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-16 11:13:12 -0400 |
commit | 21e518557ad7634bc4b1fd57effa7e49a1405bb5 (patch) | |
tree | 8484ccd28cc1bb4aa27c3b47b9a56cf9ee2ce66c /googlemock/test/gmock_ex_test.cc | |
parent | 3e2cb75446e0f56f226f0fb259e032bb4d014002 (diff) | |
parent | 490554aa0f3618e1e5dd217f11fe0c3f188ed615 (diff) | |
download | googletest-21e518557ad7634bc4b1fd57effa7e49a1405bb5.tar.gz googletest-21e518557ad7634bc4b1fd57effa7e49a1405bb5.tar.bz2 googletest-21e518557ad7634bc4b1fd57effa7e49a1405bb5.zip |
Merge branch 'master' into josh/fix_scoped_class2
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 |