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.
This commit is contained in:
Martin Hořeňovský 2018-08-28 09:44:47 +02:00
parent 1a501fcb48
commit f061dabbad
5 changed files with 72 additions and 4 deletions

View file

@ -0,0 +1,23 @@
// 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{});
}