Debian Codegraph @

3rdparty/catch2/tests/ExtraTests/X91-AmalgamatedCatch.cpp

raw symbols SCIP
1
2 // Copyright Catch2 Authors
3 // Distributed under the Boost Software License, Version 1.0.
4 // (See accompanying file LICENSE.txt or copy at
5 // https://www.boost.org/LICENSE_1_0.txt)
6
7 // SPDX-License-Identifier: BSL-1.0
8
9 /**\file
10 * This file serves as a simple compilation test against the amalgamated
11 * version of Catch2.
12 */
13
14 #include "catch_amalgamated.hpp"
15
16 TEST_CASE("Just a dummy test") {
17 auto i = GENERATE(1, 2, 3);
18 SECTION("a") {
19 REQUIRE(1 != 4);
20 }
21 SECTION("b") {
22 CHECK(1 != 5);
23 }
24 REQUIRE_THAT(1,
25 Catch::Matchers::Predicate<int>([](int i) {
26 return i % 2 == 1;
27 }));
28 }
29
30 TEMPLATE_TEST_CASE("Trivial template test case", "", char, short) {
31 STATIC_REQUIRE(sizeof(TestType) <= sizeof(int));
32 }
33
34 TEST_CASE("Benchmark test", "[!benchmark]") {
35 BENCHMARK("Allocation benchmark") {
36 return std::vector<int>(10);
37 };
38 }