Home | History | Annotate | Download | only in test

Lines Matching refs:failure

1263   FAIL() << "Expected fatal failure.";
1267 ADD_FAILURE() << "Expected non-fatal failure.";
1276 static void AddFailure(FailureMode failure) {
1277 if (failure == FATAL_FAILURE) {
1317 static void AddFailureInOtherThread(FailureMode failure) {
1318 ThreadWithParam<FailureMode> thread(&AddFailure, failure, NULL);
1345 // work even if the failure is generated in a called function rather than
1351 EXPECT_FATAL_FAILURE(AddFatalFailure(), "Expected fatal failure.");
1356 EXPECT_FATAL_FAILURE(AddFatalFailure(), ::string("Expected fatal failure."));
1362 ::std::string("Expected fatal failure."));
1369 "Expected fatal failure.");
1391 // current function even though 'statement' generates a fatal failure.
1439 "Expected non-fatal failure.");
1445 ::string("Expected non-fatal failure."));
1451 ::std::string("Expected non-fatal failure."));
1458 "Expected non-fatal failure.");
1483 "Expected fatal failure.");
1488 AddFailureInOtherThread(NONFATAL_FAILURE), "Expected non-fatal failure.");
1529 // pr2 is for fatal failure.
1533 "Failure!");
1555 // r2 contains a SUCCESS, and a FAILURE.
1700 // that a non-fatal failure is added, a fatal failure is not added, and that the
1712 // should add a non-fatal failure and the property should not be recorded.
1718 // should add a non-fatal failure and the property should not be recorded.
1724 // should add a non-fatal failure and the property should not be recorded.
1730 // should add a non-fatal failure and the property should not be recorded.
2246 EXPECT_PRED1(IsEvenFunctor(), 2) << "This failure is UNEXPECTED!";
2249 // Failure cases.
2251 EXPECT_PRED1(IsEven, 5) << "This failure is expected.";
2252 }, "This failure is expected.");
2262 << "This failure is UNEXPECTED!";
2264 // Failure cases.
2269 ASSERT_PRED_FORMAT1(AssertIsEven, 5) << "This failure is expected.";
2270 }, "This failure is expected.");
2281 // A failure case.
2284 << "This failure is expected.";
2285 }, "This failure is expected.");
2295 ASSERT_PRED2(SumIsEven2, 2, 4) << "This failure is UNEXPECTED!";
2298 // Failure cases.
2302 EXPECT_PRED2(SumIsEven2, n1, n2) << "This failure is expected.";
2303 }, "This failure is expected.");
2313 "This failure is UNEXPECTED!";
2316 // Failure cases.
2326 << "This failure is expected.";
2327 }, "This failure is expected.");
2347 << "This failure is UNEXPECTED!";
2354 // A failure case.
2358 << "This failure is expected.";
2359 }, "This failure is expected.");
2364 // Another failure case.
2416 AssertionFailure(Message() << "Failure");
2421 AssertionFailure(Message() << "Failure");
2427 AssertionFailure(Message() << "Failure");
2434 AssertionFailure(Message() << "Failure");
3121 FAIL() << "Unexpected failure: Disabled test should not be run.";
3133 FAIL() << "Unexpected failure: Test in disabled test case should not be run.";
3139 FAIL() << "Unexpected failure: Test in disabled test case should not be run.";
3147 FAIL() << "Unexpected failure: All tests disabled in test case. "
3152 FAIL() << "Unexpected failure: All tests disabled in test case. "
3158 FAIL() << "Unexpected failure: Disabled test should not be run.";
3162 FAIL() << "Unexpected failure: Disabled test should not be run.";
3177 FAIL() << "Unexpected failure: Disabled typed test should not run.";
3187 FAIL() << "Unexpected failure: Disabled typed test should not run.";
3203 FAIL() << "Unexpected failure: "
3218 FAIL() << "Unexpected failure: "
3387 ADD_FAILURE() << "some non-fatal failure";
3390 FAIL() << "some fatal failure";
3400 ADD_FAILURE() << "other failure";
3412 "some non-fatal failure");
3415 "some non-fatal failure");
3429 EXPECT_PRED_FORMAT2(testing::IsSubstring, "some fatal failure",
3448 EXPECT_PRED_FORMAT2(testing::IsSubstring, "some fatal failure",
3452 EXPECT_PRED_FORMAT2(testing::IsSubstring, "other failure",
3605 // A failure.
3630 // A failure.
3647 // A failure.
3911 // success codes as well as failure message for each.
3961 EXPECT_HRESULT_SUCCEEDED(S_OK) << "unexpected failure";
3962 ASSERT_HRESULT_SUCCEEDED(S_OK) << "unexpected failure";
3963 failure";
3964 ASSERT_HRESULT_FAILED(E_UNEXPECTED) << "unexpected failure";
3967 EXPECT_HRESULT_SUCCEEDED(E_UNEXPECTED) << "expected failure",
3968 "expected failure");
3974 ASSERT_HRESULT_SUCCEEDED(E_UNEXPECTED) << "expected failure",
3975 "expected failure");
3979 EXPECT_HRESULT_FAILED(S_OK) << "expected failure",
3980 "expected failure");
3983 ASSERT_HRESULT_FAILED(S_OK) << "expected failure",
3984 "expected failure");
4233 // A failure.
4249 // A failure.
4266 // A failure.
4408 "This failure message is a std::string, and is expected.");
4461 ADD_FAILURE() << "Failure";
4469 "Failure");
4475 // Verifies that ADD_FAILURE_AT does generate a nonfatal failure and
4476 // the failure message contains the user-streamed part.
4482 // Unfortunately, we cannot verify that the failure message contains
4492 EXPECT_FATAL_FAILURE(FAIL() << "Intentional failure.",
4493 "Intentional failure.");
4505 // These tests fail *intentionally*, s.t. the failure messages can be
6233 TEST(NestedTestingNamespaceTest, Failure) {
6234 EXPECT_FATAL_FAILURE(FAIL() << "This failure is expected.",
6235 "This failure is expected.");
6259 EXPECT_NONFATAL_FAILURE(ADD_FAILURE() << "expected failure",
6260 "expected failure");
6261 EXPECT_FATAL_FAILURE(FAIL() << "expected failure",
6262 "expected failure");
6271 EXPECT_TRUE(true) << "unexpected failure";
6272 ASSERT_TRUE(true) << "unexpected failure";
6273 EXPECT_NONFATAL_FAILURE(EXPECT_TRUE(false) << "expected failure",
6274 "expected failure");
6275 EXPECT_FATAL_FAILURE(ASSERT_TRUE(false) << "expected failure",
6276 "expected failure");
6280 EXPECT_FALSE(false) << "unexpected failure";
6281 ASSERT_FALSE(false) << "unexpected failure";
6282 EXPECT_NONFATAL_FAILURE(EXPECT_FALSE(true) << "expected failure",
6283 "expected failure");
6284 EXPECT_FATAL_FAILURE(ASSERT_FALSE(true) << "expected failure",
6285 "expected failure");
6294 EXPECT_EQ(1, 1) << "unexpected failure";
6295 ASSERT_EQ(1, 1) << "unexpected failure";
6296 EXPECT_NONFATAL_FAILURE(EXPECT_EQ(1, 2) << "expected failure",
6297 "expected failure");
6298 EXPECT_FATAL_FAILURE(ASSERT_EQ(1, 2) << "expected failure",
6299 "expected failure");
6303 EXPECT_LT(1, 2) << "unexpected failure";
6304 ASSERT_LT(1, 2) << "unexpected failure";
6305 EXPECT_NONFATAL_FAILURE(EXPECT_LT(2, 1) << "expected failure",
6306 "expected failure");
6307 EXPECT_FATAL_FAILURE(ASSERT_LT(2, 1) << "expected failure",
6308 "expected failure");
6312 EXPECT_STREQ("foo", "foo") << "unexpected failure";
6313 ASSERT_STREQ("foo", "foo") << "unexpected failure";
6314 EXPECT_NONFATAL_FAILURE(EXPECT_STREQ("foo", "bar") << "expected failure",
6315 "expected failure");
6316 EXPECT_FATAL_FAILURE(ASSERT_STREQ("foo", "bar") << "expected failure",
6317 "expected failure");
6321 EXPECT_STRNE("foo", "bar") << "unexpected failure";
6322 ASSERT_STRNE("foo", "bar") << "unexpected failure";
6323 EXPECT_NONFATAL_FAILURE(EXPECT_STRNE("foo", "foo") << "expected failure",
6324 "expected failure");
6325 EXPECT_FATAL_FAILURE(ASSERT_STRNE("foo", "foo") << "expected failure",
6326 "expected failure");
6330 EXPECT_STRCASEEQ("foo", "FOO") << "unexpected failure";
6331 ASSERT_STRCASEEQ("foo", "FOO") << "unexpected failure";
6332 EXPECT_NONFATAL_FAILURE(EXPECT_STRCASEEQ("foo", "bar") << "expected failure",
6333 "expected failure");
6334 EXPECT_FATAL_FAILURE(ASSERT_STRCASEEQ("foo", "bar") << "expected failure",
6335 "expected failure");
6339 EXPECT_STRCASENE("foo", "bar") << "unexpected failure";
6340 ASSERT_STRCASENE("foo", "bar") << "unexpected failure";
6341 EXPECT_NONFATAL_FAILURE(EXPECT_STRCASENE("foo", "FOO") << "expected failure",
6342 "expected failure");
6343 EXPECT_FATAL_FAILURE(ASSERT_STRCASENE("bar", "BAR") << "expected failure",
6344 "expected failure");
6348 EXPECT_FLOAT_EQ(1.0, 1.0) << "unexpected failure";
6349 ASSERT_FLOAT_EQ(1.0, 1.0) << "unexpected failure";
6350 EXPECT_NONFATAL_FAILURE(EXPECT_FLOAT_EQ(0.0, 1.0) << "expected failure",
6351 "expected failure");
6352 EXPECT_FATAL_FAILURE(ASSERT_FLOAT_EQ(0.0, 1.0) << "expected failure",
6353 "expected failure");
6359 EXPECT_THROW(ThrowAnInteger(), int) << "unexpected failure";
6360 ASSERT_THROW(ThrowAnInteger(), int) << "unexpected failure";
6362 "expected failure", "expected failure");
6364 "expected failure", "expected failure");
6368 EXPECT_NO_THROW(ThrowNothing()) << "unexpected failure";
6369 ASSERT_NO_THROW(ThrowNothing()) << "unexpected failure";
6371 "expected failure", "expected failure");
6373 "expected failure", "expected failure");
6377 EXPECT_ANY_THROW(ThrowAnInteger()) << "unexpected failure";
6378 ASSERT_ANY_THROW(ThrowAnInteger()) << "unexpected failure";
6380 "expected failure", "expected failure");
6382 "expected failure", "expected failure");
6811 *GetUnitTestImpl()->listeners())) << "expected failure";},
6812 "expected failure");
6942 EXPECT_FATAL_FAILURE(GTEST_FAIL() << "An expected failure",
6943 "An expected failure");
6948 EXPECT_FATAL_FAILURE(GTEST_ASSERT_EQ(0, 1) << "An expected failure",
6949 "An expected failure");
6950 EXPECT_FATAL_FAILURE(GTEST_ASSERT_EQ(1, 0) << "An expected failure",
6951 "An expected failure");
6955 EXPECT_FATAL_FAILURE(GTEST_ASSERT_NE(0, 0) << "An expected failure",
6956 "An expected failure");
6960 EXPECT_FATAL_FAILURE(GTEST_ASSERT_LE(1, 0) << "An expected failure",
6961 "An expected failure");
6964 EXPECT_FATAL_FAILURE(GTEST_ASSERT_LT(0, 0) << "An expected failure",
6965 "An expected failure");
6966 EXPECT_FATAL_FAILURE(GTEST_ASSERT_LT(1, 0) << "An expected failure",
6967 "An expected failure");
6971 EXPECT_FATAL_FAILURE(GTEST_ASSERT_GE(0, 1) << "An expected failure",
6972 "An expected failure");
6975 EXPECT_FATAL_FAILURE(GTEST_ASSERT_GT(0, 1) << "An expected failure",
6976 "An expected failure");
6977 EXPECT_FATAL_FAILURE(GTEST_ASSERT_GT(1, 1) << "An expected failure",
6978 "An expected failure");