diff options
| author | Martin Hořeňovský | 2020-02-25 12:39:40 +0100 |
|---|---|---|
| committer | Martin Hořeňovský | 2020-02-26 16:07:54 +0100 |
| commit | d1ffaf55a1653575a5a24da738ee777cdb85626f (patch) | |
| tree | aa3988bec4f004e6c0d4d8fb11cde388e9515584 /tests/ExtraTests | |
| parent | 33b47f7309653329fdd160867acd1830d9959ab2 (diff) | |
| download | catch3-d1ffaf55a1653575a5a24da738ee777cdb85626f.tar.gz | |
Fix warnings in ExtraTests and Examples
Diffstat (limited to 'tests/ExtraTests')
| -rw-r--r-- | tests/ExtraTests/X01-PrefixedMacros.cpp | 10 | ||||
| -rw-r--r-- | tests/ExtraTests/X11-DisableStringification.cpp | 6 |
2 files changed, 10 insertions, 6 deletions
diff --git a/tests/ExtraTests/X01-PrefixedMacros.cpp b/tests/ExtraTests/X01-PrefixedMacros.cpp index 683b86ed..89f128b7 100644 --- a/tests/ExtraTests/X01-PrefixedMacros.cpp +++ b/tests/ExtraTests/X01-PrefixedMacros.cpp @@ -11,11 +11,13 @@ #include <type_traits> #include <stdexcept> -[[noreturn]] -void this_throws() { - throw std::runtime_error("Some msg"); +namespace { + [[noreturn]] + void this_throws() { + throw std::runtime_error("Some msg"); + } + void this_doesnt_throw() {} } -void this_doesnt_throw() {} CATCH_TEST_CASE("PrefixedMacros") { using namespace Catch::Matchers; diff --git a/tests/ExtraTests/X11-DisableStringification.cpp b/tests/ExtraTests/X11-DisableStringification.cpp index 79d4f6b4..0d84771d 100644 --- a/tests/ExtraTests/X11-DisableStringification.cpp +++ b/tests/ExtraTests/X11-DisableStringification.cpp @@ -7,9 +7,11 @@ #include <catch2/catch_default_main.hpp> #include <catch2/catch_test_macros.hpp> -struct Hidden {}; +namespace { + struct Hidden {}; -bool operator==(Hidden, Hidden) { return true; } + bool operator==(Hidden, Hidden) { return true; } +} TEST_CASE("DisableStringification") { REQUIRE( Hidden{} == Hidden{} ); |