34 #include "gmock/gmock.h" 35 #include "gtest/gtest.h" 40 using testing::internal::GoogleTestFailureException;
52 #if GTEST_HAS_EXCEPTIONS 54 TEST(DefaultValueTest, ThrowsRuntimeErrorWhenNoDefaultValue) {
63 FAIL() <<
"GetSomething()'s return type has no default value, " 64 <<
"so Google Mock should have thrown.";
65 }
catch (
const GoogleTestFailureException& ) {
66 FAIL() <<
"Google Test does not try to catch an exception of type " 67 <<
"GoogleTestFailureException, which is used for reporting " 68 <<
"a failure to other testing frameworks. Google Mock should " 69 <<
"not throw a GoogleTestFailureException as it will kill the " 70 <<
"entire test program instead of just the current TEST.";
71 }
catch (
const std::exception& ex) {
#define MOCK_METHOD0(m,...)
#define EXPECT_THAT(value, matcher)
PolymorphicMatcher< internal::HasSubstrMatcher< internal::string > > HasSubstr(const internal::string &substring)
#define TEST(test_case_name, test_name)