Commit 13d82e32 authored by Victor Zverovich's avatar Victor Zverovich

Don't use internal GTest API

parent 2161a73f
...@@ -8,17 +8,12 @@ ...@@ -8,17 +8,12 @@
#include "fmt/core.h" #include "fmt/core.h"
#include "gtest.h" #include "gtest.h"
TEST(AssertTest, Fail) {
#if GTEST_HAS_DEATH_TEST #if GTEST_HAS_DEATH_TEST
# define EXPECT_DEBUG_DEATH_IF_SUPPORTED(statement, regex) \ EXPECT_DEBUG_DEATH(FMT_ASSERT(false, "don't panic!"), "don't panic!");
EXPECT_DEBUG_DEATH(statement, regex)
#else #else
# define EXPECT_DEBUG_DEATH_IF_SUPPORTED(statement, regex) \ fmt::print("warning: death tests are not supported\n");
GTEST_UNSUPPORTED_DEATH_TEST_(statement, regex, )
#endif #endif
TEST(AssertTest, Fail) {
EXPECT_DEBUG_DEATH_IF_SUPPORTED(FMT_ASSERT(false, "don't panic!"),
"don't panic!");
} }
bool test_condition = false; bool test_condition = false;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment