diff options
| author | Martin Hořeňovský | 2020-09-08 15:53:08 +0200 |
|---|---|---|
| committer | Martin Hořeňovský | 2020-09-09 13:02:50 +0200 |
| commit | 60dfec559fe32db97552fcfec4fecc73f1246d8d (patch) | |
| tree | 2a267d6f96784ef0edc591167d3d26c08598b52a /tests/ExtraTests/X91-AmalgamatedCatch.cpp | |
| parent | 8b89a60bf6dd777d18669e81db9886b8ce4242c6 (diff) | |
| download | catch3-60dfec559fe32db97552fcfec4fecc73f1246d8d.tar.gz | |
Provide 1 .hpp + 1 .cpp distribution of Catch2
This commits also adds a script that does the amalgamation of headers
and .cpp files into the distributable version, removes the old
`generateSingleHeader` script, and also adds a very simple compilation
test for the amalgamated distribution.
Diffstat (limited to 'tests/ExtraTests/X91-AmalgamatedCatch.cpp')
| -rw-r--r-- | tests/ExtraTests/X91-AmalgamatedCatch.cpp | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/ExtraTests/X91-AmalgamatedCatch.cpp b/tests/ExtraTests/X91-AmalgamatedCatch.cpp new file mode 100644 index 00000000..e3b31f9b --- /dev/null +++ b/tests/ExtraTests/X91-AmalgamatedCatch.cpp @@ -0,0 +1,31 @@ +/**\file + * + * This file serves as a simple compilation test against the amalgamated + * version of Catch2. + */ + +#include "catch_amalgamated.hpp" + +TEST_CASE("Just a dummy test") { + auto i = GENERATE(1, 2, 3); + SECTION("a") { + REQUIRE(1 != 4); + } + SECTION("b") { + CHECK(1 != 5); + } + REQUIRE_THAT(1, + Catch::Matchers::Predicate<int>([](int i) { + return i % 2 == 1; + })); +} + +TEMPLATE_TEST_CASE("Trivial template test case", "", char, short) { + STATIC_REQUIRE(sizeof(TestType) <= sizeof(int)); +} + +TEST_CASE("Benchmark test", "[!benchmark]") { + BENCHMARK("Allocation benchmark") { + return std::vector<int>(10); + }; +} |