Googletest export

Add GTEST_FAIL_AT, an equivalent to ADD_FAILURE_AT but that
spawns a fatal failure rather than a non-fatal, eg. the equivalent
of an ASSERT* failure rather than an EXPECT* failure.

PiperOrigin-RevId: 244746609
This commit is contained in:
Abseil Team
2019-04-22 18:23:35 -04:00
committed by Matt Calabrese
parent a53e931dcd
commit 84d986531e
4 changed files with 37 additions and 6 deletions

View File

@@ -461,7 +461,11 @@ TEST_F(FatalFailureInSetUpTest, FailureInSetUp) {
}
TEST(AddFailureAtTest, MessageContainsSpecifiedFileAndLineNumber) {
ADD_FAILURE_AT("foo.cc", 42) << "Expected failure in foo.cc";
ADD_FAILURE_AT("foo.cc", 42) << "Expected nonfatal failure in foo.cc";
}
TEST(GtestFailAtTest, MessageContainsSpecifiedFileAndLineNumber) {
GTEST_FAIL_AT("foo.cc", 42) << "Expected fatal failure in foo.cc";
}
#if GTEST_IS_THREADSAFE