mirror of
https://github.com/fmtlib/fmt.git
synced 2024-11-05 02:27:45 +00:00
ed138d794a
Patch by Ievgen Liubymkin (jackyf).
23 lines
625 B
C++
23 lines
625 B
C++
// Formatting library for C++ - assertion tests
|
|
//
|
|
// Copyright (c) 2012 - present, Victor Zverovich
|
|
// All rights reserved.
|
|
//
|
|
// For the license information refer to format.h.
|
|
|
|
#include "fmt/core.h"
|
|
#include "gtest.h"
|
|
|
|
#if GTEST_HAS_DEATH_TEST
|
|
# define EXPECT_DEBUG_DEATH_IF_SUPPORTED(statement, regex) \
|
|
EXPECT_DEBUG_DEATH(statement, regex)
|
|
#else
|
|
# define EXPECT_DEBUG_DEATH_IF_SUPPORTED(statement, regex) \
|
|
GTEST_UNSUPPORTED_DEATH_TEST(statement, regex, )
|
|
#endif
|
|
|
|
TEST(AssertTest, Fail) {
|
|
EXPECT_DEBUG_DEATH_IF_SUPPORTED(FMT_ASSERT(false, "don't panic!"),
|
|
"don't panic!");
|
|
}
|