44 throw testing::AssertionException(result);
53void Fail(
const char* msg) {
54 printf(
"FAILURE: %s\n", msg);
59static void AssertFalse() {
70 Fail(
"A successful assertion wrongfully threw.");
77 Fail(
"A failed non-fatal assertion wrongfully threw.");
83 }
catch(
const testing::AssertionException& e) {
84 if (strstr(e.what(),
"Expected failure") != NULL)
88 "A failed assertion did throw an exception of the right type, "
89 "but the message is incorrect. Instead of containing \"Expected "
90 "failure\", it is:\n");
93 Fail(
"A failed assertion threw the wrong type of exception.");
95 Fail(
"A failed assertion should've thrown but didn't.");
111 printf(
"RUN_ALL_TESTS returned %d\n", result);
112 Fail(
"Expected failure instead.");
116 Fail(
"Should have continued with other tests, but did not.");
void Append(TestEventListener *listener)
static UnitTest * GetInstance()
TestEventListeners & listeners()
#define ASSERT_EQ(val1, val2)
#define EXPECT_EQ(val1, val2)
int RUN_ALL_TESTS() GTEST_MUST_USE_RESULT_
#define TEST(test_case_name, test_name)
int kTestForContinuingTest
void Fail(const char *msg)
GTEST_API_ void InitGoogleTest(int *argc, char **argv)