mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-29 16:53:30 +01:00
23 lines
382 B
C++
23 lines
382 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_test_macros.hpp>
|
|
|
|
struct foo {
|
|
explicit operator bool() const {
|
|
return true;
|
|
}
|
|
};
|
|
|
|
TEST_CASE("aa") {
|
|
REQUIRE(foo{});
|
|
}
|