Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorMartin Hořeňovský2020-02-25 12:39:40 +0100
committerMartin Hořeňovský2020-02-26 16:07:54 +0100
commitd1ffaf55a1653575a5a24da738ee777cdb85626f (patch)
treeaa3988bec4f004e6c0d4d8fb11cde388e9515584 /tests
parent33b47f7309653329fdd160867acd1830d9959ab2 (diff)
downloadcatch3-d1ffaf55a1653575a5a24da738ee777cdb85626f.tar.gz
Fix warnings in ExtraTests and Examples
Diffstat (limited to 'tests')
-rw-r--r--tests/ExtraTests/X01-PrefixedMacros.cpp10
-rw-r--r--tests/ExtraTests/X11-DisableStringification.cpp6
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{} );