diff options
| author | Martin Hořeňovský | 2018-08-28 09:44:47 +0200 |
|---|---|---|
| committer | Martin Hořeňovský | 2018-08-28 12:57:20 +0200 |
| commit | f061dabbada3f658e69d7dc7c990044a5dc08f19 (patch) | |
| tree | b86bcfd456e26cded403818db8faff9685388ffd /projects/ExtraTests/X10-FallbackStringifier.cpp | |
| parent | 1a501fcb48a018bd49d00b582d603906728e12d9 (diff) | |
| download | catch3-f061dabbada3f658e69d7dc7c990044a5dc08f19.tar.gz | |
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.
Diffstat (limited to 'projects/ExtraTests/X10-FallbackStringifier.cpp')
| -rw-r--r-- | projects/ExtraTests/X10-FallbackStringifier.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/projects/ExtraTests/X10-FallbackStringifier.cpp b/projects/ExtraTests/X10-FallbackStringifier.cpp new file mode 100644 index 00000000..0522d1af --- /dev/null +++ b/projects/ExtraTests/X10-FallbackStringifier.cpp @@ -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{}); +} |