Fix warnings in ExtraTests and Examples

This commit is contained in:
Martin Hořeňovský
2020-02-25 12:39:40 +01:00
parent 33b47f7309
commit d1ffaf55a1
8 changed files with 27 additions and 12 deletions

View File

@@ -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;

View File

@@ -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{} );