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:
parent
1a501fcb48
commit
f061dabbad
5 changed files with 72 additions and 4 deletions
23
projects/ExtraTests/X10-FallbackStringifier.cpp
Normal file
23
projects/ExtraTests/X10-FallbackStringifier.cpp
Normal 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{});
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue