2022-01-29 00:07:44 +01:00
|
|
|
|
|
|
|
// Copyright Catch2 Authors
|
|
|
|
// Distributed under the Boost Software License, Version 1.0.
|
2022-10-28 11:22:53 +02:00
|
|
|
// (See accompanying file LICENSE.txt or copy at
|
2022-01-29 00:07:44 +01:00
|
|
|
// https://www.boost.org/LICENSE_1_0.txt)
|
|
|
|
|
|
|
|
// SPDX-License-Identifier: BSL-1.0
|
|
|
|
|
2020-09-08 15:53:08 +02:00
|
|
|
/**\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") {
|
2024-03-01 11:15:27 +01:00
|
|
|
REQUIRE(i != 4);
|
2020-09-08 15:53:08 +02:00
|
|
|
}
|
|
|
|
SECTION("b") {
|
2024-03-01 11:15:27 +01:00
|
|
|
CHECK(i != 5);
|
2020-09-08 15:53:08 +02:00
|
|
|
}
|
|
|
|
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);
|
|
|
|
};
|
|
|
|
}
|