catch2/projects/ExtraTests/X10-FallbackStringifier.cpp
Martin Hořeňovský f061dabbad Add ExtraTests infrastructure
This means
* a new cmake option, `CATCH_BUILD_EXTRA_TESTS`, that conditionally
includes the ExtraTests subfolder
* building and running them on some of the Travis build images
* An example configuration test

In the future these should be extended to cover most of the
configuration options in Catch2, but this is a start.
2018-08-28 12:57:20 +02:00

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{});
}