Lines Matching refs:failure
1486 FAIL() << "Expected fatal failure.";
1490 ADD_FAILURE() << "Expected non-fatal failure.";
1499 static void AddFailure(FailureMode failure) {
1500 if (failure == FATAL_FAILURE) {
1540 static void AddFailureInOtherThread(FailureMode failure) {
1546 &failure);
1551 FailureMode* failure = static_cast<FailureMode*>(attr);
1552 AddFailure(*failure);
1579 // work even if the failure is generated in a called function rather than
1585 EXPECT_FATAL_FAILURE(AddFatalFailure(), "Expected fatal failure.");
1592 "Expected fatal failure.");
1614 // current function even though 'statement' generates a fatal failure.
1662 "Expected non-fatal failure.");
1669 "Expected non-fatal failure.");
1694 "Expected fatal failure.");
1699 AddFailureInOtherThread(NONFATAL_FAILURE), "Expected non-fatal failure.");
1789 // pr2 is for fatal failure.
1793 "Failure!");
1815 // r2 contains a SUCCESS, and a FAILURE.
1968 // that a non-fatal failure is added, a fatal failure is not added, and that the
1980 // should add a non-fatal failure and the property should not be recorded.
1986 // should add a non-fatal failure and the property should not be recorded.
1992 // should add a non-fatal failure and the property should not be recorded.
1998 // should add a non-fatal failure and the property should not be recorded.
2485 EXPECT_PRED1(IsEvenFunctor(), 2) << "This failure is UNEXPECTED!";
2488 // Failure cases.
2490 EXPECT_PRED1(IsEven, 5) << "This failure is expected.";
2491 }, "This failure is expected.");
2501 << "This failure is UNEXPECTED!";
2503 // Failure cases.
2508 ASSERT_PRED_FORMAT1(AssertIsEven, 5) << "This failure is expected.";
2509 }, "This failure is expected.");
2520 // A failure case.
2523 << "This failure is expected.";
2524 }, "This failure is expected.");
2534 ASSERT_PRED2(SumIsEven2, 2, 4) << "This failure is UNEXPECTED!";
2537 // Failure cases.
2541 EXPECT_PRED2(SumIsEven2, n1, n2) << "This failure is expected.";
2542 }, "This failure is expected.");
2552 "This failure is UNEXPECTED!";
2555 // Failure cases.
2565 << "This failure is expected.";
2566 }, "This failure is expected.");
2586 << "This failure is UNEXPECTED!";
2593 // A failure case.
2597 << "This failure is expected.";
2598 }, "This failure is expected.");
2603 // Another failure case.
2659 AssertionFailure(Message() << "Failure");
2664 AssertionFailure(Message() << "Failure");
2670 AssertionFailure(Message() << "Failure");
2677 AssertionFailure(Message() << "Failure");
3360 FAIL() << "Unexpected failure: Disabled test should not be run.";
3372 FAIL() << "Unexpected failure: Test in disabled test case should not be run.";
3378 FAIL() << "Unexpected failure: Test in disabled test case should not be run.";
3386 FAIL() << "Unexpected failure: All tests disabled in test case. "
3391 FAIL() << "Unexpected failure: All tests disabled in test case. "
3397 FAIL() << "Unexpected failure: Disabled test should not be run.";
3401 FAIL() << "Unexpected failure: Disabled test should not be run.";
3416 FAIL() << "Unexpected failure: Disabled typed test should not run.";
3426 FAIL() << "Unexpected failure: Disabled typed test should not run.";
3442 FAIL() << "Unexpected failure: "
3457 FAIL() << "Unexpected failure: "
3626 ADD_FAILURE() << "some non-fatal failure";
3629 FAIL() << "some fatal failure";
3639 ADD_FAILURE() << "other failure";
3651 "some non-fatal failure");
3654 "some non-fatal failure");
3668 EXPECT_PRED_FORMAT2(testing::IsSubstring, "some fatal failure",
3687 EXPECT_PRED_FORMAT2(testing::IsSubstring, "some fatal failure",
3691 EXPECT_PRED_FORMAT2(testing::IsSubstring, "other failure",
3810 // A failure.
3838 // A failure.
3855 // A failure.
4082 // success codes as well as failure message for each.
4130 EXPECT_HRESULT_SUCCEEDED(S_OK) << "unexpected failure";
4131 ASSERT_HRESULT_SUCCEEDED(S_OK) << "unexpected failure";
4132 EXPECT_HRESULT_FAILED(E_UNEXPECTED) << "unexpected failure";
4133 ASSERT_HRESULT_FAILED(E_UNEXPECTED) << "unexpected failure";
4136 EXPECT_HRESULT_SUCCEEDED(E_UNEXPECTED) << "expected failure",
4137 "expected failure");
4142 ASSERT_HRESULT_SUCCEEDED(E_UNEXPECTED) << "expected failure",
4143 "expected failure");
4147 EXPECT_HRESULT_FAILED(S_OK) << "expected failure",
4148 "expected failure");
4151 ASSERT_HRESULT_FAILED(S_OK) << "expected failure",
4152 "expected failure");
4373 // A failure.
4389 // A failure.
4406 // A failure.
4549 "This failure message is a std::string, and is expected.");
4604 ADD_FAILURE() << "Failure";
4612 "Failure");
4620 EXPECT_FATAL_FAILURE(FAIL() << "Intentional failure.",
4621 "Intentional failure.");
4633 // These tests fail *intentionally*, s.t. the failure messages can be
6142 TEST(NestedTestingNamespaceTest, Failure) {
6143 EXPECT_FATAL_FAILURE(FAIL() << "This failure is expected.",
6144 "This failure is expected.");
6168 EXPECT_NONFATAL_FAILURE(ADD_FAILURE() << "expected failure",
6169 "expected failure");
6170 EXPECT_FATAL_FAILURE(FAIL() << "expected failure",
6171 "expected failure");
6180 EXPECT_TRUE(true) << "unexpected failure";
6181 ASSERT_TRUE(true) << "unexpected failure";
6182 EXPECT_NONFATAL_FAILURE(EXPECT_TRUE(false) << "expected failure",
6183 "expected failure");
6184 EXPECT_FATAL_FAILURE(ASSERT_TRUE(false) << "expected failure",
6185 "expected failure");
6189 EXPECT_FALSE(false) << "unexpected failure";
6190 ASSERT_FALSE(false) << "unexpected failure";
6191 EXPECT_NONFATAL_FAILURE(EXPECT_FALSE(true) << "expected failure",
6192 "expected failure");
6193 EXPECT_FATAL_FAILURE(ASSERT_FALSE(true) << "expected failure",
6194 "expected failure");
6203 EXPECT_EQ(1, 1) << "unexpected failure";
6204 ASSERT_EQ(1, 1) << "unexpected failure";
6205 EXPECT_NONFATAL_FAILURE(EXPECT_EQ(1, 2) << "expected failure",
6206 "expected failure");
6207 EXPECT_FATAL_FAILURE(ASSERT_EQ(1, 2) << "expected failure",
6208 "expected failure");
6212 EXPECT_LT(1, 2) << "unexpected failure";
6213 ASSERT_LT(1, 2) << "unexpected failure";
6214 EXPECT_NONFATAL_FAILURE(EXPECT_LT(2, 1) << "expected failure",
6215 "expected failure");
6216 EXPECT_FATAL_FAILURE(ASSERT_LT(2, 1) << "expected failure",
6217 "expected failure");
6221 EXPECT_STREQ("foo", "foo") << "unexpected failure";
6222 ASSERT_STREQ("foo", "foo") << "unexpected failure";
6223 EXPECT_NONFATAL_FAILURE(EXPECT_STREQ("foo", "bar") << "expected failure",
6224 "expected failure");
6225 EXPECT_FATAL_FAILURE(ASSERT_STREQ("foo", "bar") << "expected failure",
6226 "expected failure");
6230 EXPECT_STRNE("foo", "bar") << "unexpected failure";
6231 ASSERT_STRNE("foo", "bar") << "unexpected failure";
6232 EXPECT_NONFATAL_FAILURE(EXPECT_STRNE("foo", "foo") << "expected failure",
6233 "expected failure");
6234 EXPECT_FATAL_FAILURE(ASSERT_STRNE("foo", "foo") << "expected failure",
6235 "expected failure");
6239 EXPECT_STRCASEEQ("foo", "FOO") << "unexpected failure";
6240 ASSERT_STRCASEEQ("foo", "FOO") << "unexpected failure";
6241 EXPECT_NONFATAL_FAILURE(EXPECT_STRCASEEQ("foo", "bar") << "expected failure",
6242 "expected failure");
6243 EXPECT_FATAL_FAILURE(ASSERT_STRCASEEQ("foo", "bar") << "expected failure",
6244 "expected failure");
6248 EXPECT_STRCASENE("foo", "bar") << "unexpected failure";
6249 ASSERT_STRCASENE("foo", "bar") << "unexpected failure";
6250 EXPECT_NONFATAL_FAILURE(EXPECT_STRCASENE("foo", "FOO") << "expected failure",
6251 "expected failure");
6252 EXPECT_FATAL_FAILURE(ASSERT_STRCASENE("bar", "BAR") << "expected failure",
6253 "expected failure");
6257 EXPECT_FLOAT_EQ(1.0, 1.0) << "unexpected failure";
6258 ASSERT_FLOAT_EQ(1.0, 1.0) << "unexpected failure";
6259 EXPECT_NONFATAL_FAILURE(EXPECT_FLOAT_EQ(0.0, 1.0) << "expected failure",
6260 "expected failure");
6261 EXPECT_FATAL_FAILURE(ASSERT_FLOAT_EQ(0.0, 1.0) << "expected failure",
6262 "expected failure");
6268 EXPECT_THROW(ThrowAnInteger(), int) << "unexpected failure";
6269 ASSERT_THROW(ThrowAnInteger(), int) << "unexpected failure";
6271 "expected failure", "expected failure");
6273 "expected failure", "expected failure");
6277 EXPECT_NO_THROW(ThrowNothing()) << "unexpected failure";
6278 ASSERT_NO_THROW(ThrowNothing()) << "unexpected failure";
6280 "expected failure", "expected failure");
6282 "expected failure", "expected failure");
6286 EXPECT_ANY_THROW(ThrowAnInteger()) << "unexpected failure";
6287 ASSERT_ANY_THROW(ThrowAnInteger()) << "unexpected failure";
6289 "expected failure", "expected failure");
6291 "expected failure", "expected failure");
6727 *GetUnitTestImpl()->listeners())) << "expected failure";},
6728 "expected failure");