fixed a bunch of warnings from the Makefile from the root of the repo
This commit is contained in:
parent
82af0ecdc1
commit
5d511a6e96
6 changed files with 48 additions and 16 deletions
11
test/thirdparty/doctest/doctest.h
vendored
11
test/thirdparty/doctest/doctest.h
vendored
|
@ -160,6 +160,7 @@ DOCTEST_GCC_SUPPRESS_WARNING("-Wnon-virtual-dtor")
|
|||
DOCTEST_GCC_SUPPRESS_WARNING("-Winline")
|
||||
DOCTEST_GCC_SUPPRESS_WARNING("-Wunused-local-typedefs")
|
||||
DOCTEST_GCC_SUPPRESS_WARNING("-Wuseless-cast")
|
||||
DOCTEST_GCC_SUPPRESS_WARNING("-Wnoexcept")
|
||||
|
||||
DOCTEST_MSVC_SUPPRESS_WARNING_PUSH
|
||||
DOCTEST_MSVC_SUPPRESS_WARNING(4616) // invalid compiler warning
|
||||
|
@ -1599,7 +1600,7 @@ namespace detail {
|
|||
|
||||
~ContextScope();
|
||||
|
||||
void stringify(std::ostream* s) const;
|
||||
void stringify(std::ostream* s) const override;
|
||||
};
|
||||
|
||||
struct DOCTEST_INTERFACE MessageBuilder : public MessageData
|
||||
|
@ -2722,6 +2723,9 @@ DOCTEST_GCC_SUPPRESS_WARNING("-Wold-style-cast")
|
|||
DOCTEST_GCC_SUPPRESS_WARNING("-Wunused-local-typedefs")
|
||||
DOCTEST_GCC_SUPPRESS_WARNING("-Wuseless-cast")
|
||||
DOCTEST_GCC_SUPPRESS_WARNING("-Wunused-function")
|
||||
DOCTEST_GCC_SUPPRESS_WARNING("-Wmultiple-inheritance")
|
||||
DOCTEST_GCC_SUPPRESS_WARNING("-Wnoexcept")
|
||||
DOCTEST_GCC_SUPPRESS_WARNING("-Wsuggest-attribute")
|
||||
|
||||
DOCTEST_MSVC_SUPPRESS_WARNING_PUSH
|
||||
DOCTEST_MSVC_SUPPRESS_WARNING(4616) // invalid compiler warning
|
||||
|
@ -3836,6 +3840,7 @@ namespace {
|
|||
if(curr->translate(res))
|
||||
return res;
|
||||
// clang-format off
|
||||
DOCTEST_GCC_SUPPRESS_WARNING_WITH_PUSH("-Wcatch-value")
|
||||
try {
|
||||
throw;
|
||||
} catch(std::exception& ex) {
|
||||
|
@ -3847,6 +3852,7 @@ namespace {
|
|||
} catch(...) {
|
||||
return "unknown exception";
|
||||
}
|
||||
DOCTEST_GCC_SUPPRESS_WARNING_POP
|
||||
// clang-format on
|
||||
#else // DOCTEST_CONFIG_NO_EXCEPTIONS
|
||||
return "";
|
||||
|
@ -4872,6 +4878,7 @@ namespace {
|
|||
.writeAttribute("name", in.m_name)
|
||||
.writeAttribute("filename", skipPathFromFilename(in.m_file))
|
||||
.writeAttribute("line", line(in.m_line));
|
||||
xml.ensureTagClosed();
|
||||
}
|
||||
|
||||
void subcase_end() override { xml.endElement(); }
|
||||
|
@ -5997,4 +6004,4 @@ DOCTEST_MSVC_SUPPRESS_WARNING_POP
|
|||
DOCTEST_GCC_SUPPRESS_WARNING_POP
|
||||
|
||||
#endif // DOCTEST_LIBRARY_IMPLEMENTATION
|
||||
#endif // DOCTEST_CONFIG_IMPLEMENT
|
||||
#endif // DOCTEST_CONFIG_IMPLEMENT
|
||||
|
|
23
test/thirdparty/doctest/doctest_compatibility.h
vendored
23
test/thirdparty/doctest/doctest_compatibility.h
vendored
|
@ -25,6 +25,29 @@
|
|||
#define CHECK_THROWS_WITH_STD_STR(expr, str) \
|
||||
CHECK_THROWS_WITH_STD_STR_IMPL(expr, str, DOCTEST_ANONYMOUS(DOCTEST_STD_STRING_))
|
||||
|
||||
#undef CHECK_THROWS
|
||||
#undef CHECK_THROWS_AS
|
||||
#undef CHECK_THROWS_WITH
|
||||
#undef CHECK_NOTHROW
|
||||
|
||||
#undef REQUIRE_THROWS
|
||||
#undef REQUIRE_THROWS_AS
|
||||
#undef REQUIRE_THROWS_WITH
|
||||
#undef REQUIRE_NOTHROW
|
||||
|
||||
// doctest allows multiple statements in these macros (even blocks of code) but json
|
||||
// tests rely on passing single function/constructor calls which have a [[nodiscard]]
|
||||
// attribute so here we static_cast to void - just like Catch does
|
||||
#define CHECK_THROWS(expr) DOCTEST_CHECK_THROWS(static_cast<void>(expr))
|
||||
#define CHECK_THROWS_AS(expr, e) DOCTEST_CHECK_THROWS_AS(static_cast<void>(expr), e)
|
||||
#define CHECK_THROWS_WITH(expr, e) DOCTEST_CHECK_THROWS_WITH(static_cast<void>(expr), e)
|
||||
#define CHECK_NOTHROW(expr) DOCTEST_CHECK_NOTHROW(static_cast<void>(expr))
|
||||
|
||||
#define REQUIRE_THROWS(expr) DOCTEST_REQUIRE_THROWS(static_cast<void>(expr))
|
||||
#define REQUIRE_THROWS_AS(expr, e) DOCTEST_REQUIRE_THROWS_AS(static_cast<void>(expr), e)
|
||||
#define REQUIRE_THROWS_WITH(expr, e) DOCTEST_REQUIRE_THROWS_WITH(static_cast<void>(expr), e)
|
||||
#define REQUIRE_NOTHROW(expr) DOCTEST_REQUIRE_NOTHROW(static_cast<void>(expr))
|
||||
|
||||
// included here because for some tests in the json repository private is defined as
|
||||
// public and if no STL header is included before that then in the json include when STL
|
||||
// stuff is included the MSVC STL complains (errors) that C++ keywords are being redefined
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue