]>
Commit | Line | Data |
---|---|---|
11fdf7f2 TL |
1 | // Formatting library for C++ - assertion tests |
2 | // | |
3 | // Copyright (c) 2012 - present, Victor Zverovich | |
4 | // All rights reserved. | |
5 | // | |
6 | // For the license information refer to format.h. | |
7 | ||
8 | #include "fmt/core.h" | |
9 | #include "gtest.h" | |
10 | ||
11 | #if GTEST_HAS_DEATH_TEST | |
12 | # define EXPECT_DEBUG_DEATH_IF_SUPPORTED(statement, regex) \ | |
13 | EXPECT_DEBUG_DEATH(statement, regex) | |
14 | #else | |
15 | # define EXPECT_DEBUG_DEATH_IF_SUPPORTED(statement, regex) \ | |
16 | GTEST_UNSUPPORTED_DEATH_TEST_(statement, regex, ) | |
17 | #endif | |
18 | ||
19 | TEST(AssertTest, Fail) { | |
20 | EXPECT_DEBUG_DEATH_IF_SUPPORTED( | |
21 | FMT_ASSERT(false, "don't panic!"), "don't panic!"); | |
22 | } |