| 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 |
* Checks that when `STATIC_CHECK` is deferred to runtime and fails, it |
| 11 |
* does not abort the test case. |
| 12 |
*/ |
| 13 |
|
| 14 |
#include <catch2/catch_test_macros.hpp> |
| 15 |
|
| 16 |
TEST_CASE("Deferred static checks") { |
| 17 |
STATIC_CHECK(1 == 2); |
| 18 |
STATIC_CHECK_FALSE(1 != 2); |
| 19 |
// This last assertion must be executed too |
| 20 |
CHECK(1 == 2); |
| 21 |
} |