catch2/tests/ExtraTests/X10-FallbackStringifier.cpp
2020-01-21 15:03:07 +01:00

24 lines
423 B
C++

// X10-FallbackStringifier.cpp
// Test that defining fallbackStringifier compiles
#include <string>
// A catch-all stringifier
template <typename T>
std::string fallbackStringifier(T const&) {
return "{ !!! }";
}
#include <catch2/catch_default_main.hpp>
#include <catch2/catch_test_macros.hpp>
struct foo {
explicit operator bool() const {
return true;
}
};
TEST_CASE("aa") {
REQUIRE(foo{});
}