45 void Fail(
const char* msg) {
46 printf(
"FAILURE: %s\n", msg);
60 Fail(
"A successful assertion wrongfully threw.");
66 }
catch(
const std::runtime_error& e) {
67 if (strstr(e.what(),
"Expected failure") != NULL)
71 "A failed assertion did throw an exception of the right type, " 72 "but the message is incorrect. Instead of containing \"Expected " 73 "failure\", it is:\n");
76 Fail(
"A failed assertion threw the wrong type of exception.");
78 Fail(
"A failed assertion should've thrown but didn't.");
81 int main(
int argc,
char** argv) {
void Fail(const char *msg)
void TestFailureThrowsRuntimeError()
bool GTEST_FLAG(internal_skip_environment_and_ad_hoc_tests)
int main(int argc, char **argv)
#define EXPECT_EQ(expected, actual)
GTEST_API_ void InitGoogleTest(int *argc, char **argv)