mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-26 23:36:11 +01:00
24 lines
396 B
C++
24 lines
396 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 "{ !!! }";
|
||
|
}
|
||
|
|
||
|
#define CATCH_CONFIG_MAIN
|
||
|
#include <catch2/catch.hpp>
|
||
|
|
||
|
struct foo {
|
||
|
explicit operator bool() const {
|
||
|
return true;
|
||
|
}
|
||
|
};
|
||
|
|
||
|
TEST_CASE("aa") {
|
||
|
REQUIRE(foo{});
|
||
|
}
|