aboutsummaryrefslogtreecommitdiffstats
path: root/googlemock/test/gmock_ex_test.cc
diff options
context:
space:
mode:
authorJonathan Wendeborn <jonathan.wendeborn@bruker.com>2018-10-16 08:38:34 +0200
committerJonathan Wendeborn <jonathan.wendeborn@bruker.com>2018-10-16 08:38:34 +0200
commit96d16157721cda1fd6981e6ce70645acb44220da (patch)
treec68f2939aaf8904f06e7235dfa4607f167fbb758 /googlemock/test/gmock_ex_test.cc
parent386391b0144201e0cf5f66d8ba1cb60a1076f673 (diff)
parent8c82ba48e433005b9e25835b4a342ef4dcc0cfc0 (diff)
downloadgoogletest-96d16157721cda1fd6981e6ce70645acb44220da.tar.gz
googletest-96d16157721cda1fd6981e6ce70645acb44220da.tar.bz2
googletest-96d16157721cda1fd6981e6ce70645acb44220da.zip
Merge branch 'isnice' of https://github.com/BrukerJWD/googletest into isnice
Diffstat (limited to 'googlemock/test/gmock_ex_test.cc')
-rw-r--r--googlemock/test/gmock_ex_test.cc9
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