diff options
author | Abseil Team <absl-team@google.com> | 2019-04-22 22:23:35 (GMT) |
---|---|---|
committer | Matt Calabrese <calabrese@x.team> | 2019-04-24 13:34:40 (GMT) |
commit | 84d986531e8df9fb6ea4a7bae8fb130c05b3782c (patch) | |
tree | 0b8757a3724c3550765e5efbe34fc40354aa9f75 /googletest/include/gtest | |
parent | a53e931dcd00c2556ee181d832e699c9f3c29036 (diff) | |
download | googletest-84d986531e8df9fb6ea4a7bae8fb130c05b3782c.zip googletest-84d986531e8df9fb6ea4a7bae8fb130c05b3782c.tar.gz googletest-84d986531e8df9fb6ea4a7bae8fb130c05b3782c.tar.bz2 |
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
Diffstat (limited to 'googletest/include/gtest')
-rw-r--r-- | googletest/include/gtest/gtest.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/googletest/include/gtest/gtest.h b/googletest/include/gtest/gtest.h index 76f4098..7382442 100644 --- a/googletest/include/gtest/gtest.h +++ b/googletest/include/gtest/gtest.h @@ -1900,6 +1900,11 @@ class TestWithParam : public Test, public WithParamInterface<T> { // Generates a fatal failure with a generic message. #define GTEST_FAIL() GTEST_FATAL_FAILURE_("Failed") +// Like GTEST_FAIL(), but at the given source file location. +#define GTEST_FAIL_AT(file, line) \ + GTEST_MESSAGE_AT_(file, line, "Failed", \ + ::testing::TestPartResult::kFatalFailure) + // Define this macro to 1 to omit the definition of FAIL(), which is a // generic name and clashes with some other libraries. #if !GTEST_DONT_DEFINE_FAIL |