Tests: Ignore some compiler warnings

Co-authored-by: James Moore <james.moore@veracityuk.com>
This commit is contained in:
Thomas Braun 2020-09-01 13:37:36 +02:00
parent 5d053f36d6
commit e2889e3138
15 changed files with 62 additions and 0 deletions

View File

@ -29,6 +29,10 @@ SOFTWARE.
#include "doctest_compatibility.h"
#if DOCTEST_CLANG && DOCTEST_CLANG >= DOCTEST_COMPILER(3, 6, 0)
DOCTEST_CLANG_SUPPRESS_WARNING("-Wkeyword-macro")
#endif // clang 3.6.x
#define JSON_TESTS_PRIVATE
#include <nlohmann/json.hpp>
using nlohmann::json;
@ -95,6 +99,8 @@ struct my_allocator : std::allocator<T>
{
if (next_deallocate_fails)
{
(void)p; // Ignored unused
(void)n; // ignored unused
next_deallocate_fails = false;
throw std::bad_alloc();
}

View File

@ -29,6 +29,10 @@ SOFTWARE.
#include "doctest_compatibility.h"
#if DOCTEST_CLANG && DOCTEST_CLANG >= DOCTEST_COMPILER(3, 6, 0)
DOCTEST_CLANG_SUPPRESS_WARNING("-Wkeyword-macro")
#endif // clang 3.6.x
#define JSON_TESTS_PRIVATE
#include <nlohmann/json.hpp>
using nlohmann::json;

View File

@ -29,6 +29,10 @@ SOFTWARE.
#include "doctest_compatibility.h"
#if DOCTEST_CLANG && DOCTEST_CLANG >= DOCTEST_COMPILER(3, 6, 0)
DOCTEST_CLANG_SUPPRESS_WARNING("-Wkeyword-macro")
#endif // clang 3.6.x
#define JSON_TESTS_PRIVATE
#include <nlohmann/json.hpp>
using nlohmann::json;

View File

@ -29,6 +29,10 @@ SOFTWARE.
#include "doctest_compatibility.h"
#if DOCTEST_CLANG && DOCTEST_CLANG >= DOCTEST_COMPILER(3, 6, 0)
DOCTEST_CLANG_SUPPRESS_WARNING("-Wkeyword-macro")
#endif // clang 3.6.x
#define JSON_TESTS_PRIVATE
#include <nlohmann/json.hpp>
using nlohmann::json;

View File

@ -29,6 +29,10 @@ SOFTWARE.
#include "doctest_compatibility.h"
#if DOCTEST_CLANG && DOCTEST_CLANG >= DOCTEST_COMPILER(3, 6, 0)
DOCTEST_CLANG_SUPPRESS_WARNING("-Wkeyword-macro")
#endif // clang 3.6.x
#define JSON_TESTS_PRIVATE
#include <nlohmann/json.hpp>
using nlohmann::json;

View File

@ -28,8 +28,13 @@ SOFTWARE.
*/
#include "doctest_compatibility.h"
DOCTEST_GCC_SUPPRESS_WARNING("-Wfloat-equal")
#if DOCTEST_CLANG && DOCTEST_CLANG >= DOCTEST_COMPILER(3, 6, 0)
DOCTEST_CLANG_SUPPRESS_WARNING("-Wkeyword-macro")
#endif // clang 3.6.x
#define JSON_TESTS_PRIVATE
#include <nlohmann/json.hpp>
using nlohmann::json;

View File

@ -29,6 +29,10 @@ SOFTWARE.
#include "doctest_compatibility.h"
#if DOCTEST_CLANG && DOCTEST_CLANG >= DOCTEST_COMPILER(3, 6, 0)
DOCTEST_CLANG_SUPPRESS_WARNING("-Wkeyword-macro")
#endif // clang 3.6.x
#define JSON_TESTS_PRIVATE
#include <nlohmann/json.hpp>
using nlohmann::json;

View File

@ -29,6 +29,10 @@ SOFTWARE.
#include "doctest_compatibility.h"
#if DOCTEST_CLANG && DOCTEST_CLANG >= DOCTEST_COMPILER(3, 6, 0)
DOCTEST_CLANG_SUPPRESS_WARNING("-Wkeyword-macro")
#endif // clang 3.6.x
#define JSON_TESTS_PRIVATE
#include <nlohmann/json.hpp>
using nlohmann::json;

View File

@ -29,6 +29,10 @@ SOFTWARE.
#include "doctest_compatibility.h"
#if DOCTEST_CLANG && DOCTEST_CLANG >= DOCTEST_COMPILER(3, 6, 0)
DOCTEST_CLANG_SUPPRESS_WARNING("-Wkeyword-macro")
#endif // clang 3.6.x
#define JSON_TESTS_PRIVATE
#include <nlohmann/json.hpp>
using nlohmann::json;

View File

@ -29,6 +29,12 @@ SOFTWARE.
#include "doctest_compatibility.h"
DOCTEST_MSVC_SUPPRESS_WARNING(4127)
#if DOCTEST_CLANG && DOCTEST_CLANG >= DOCTEST_COMPILER(3, 6, 0)
DOCTEST_CLANG_SUPPRESS_WARNING("-Wkeyword-macro")
#endif // clang 3.6.x
#define JSON_TESTS_PRIVATE
#include <nlohmann/json.hpp>
using nlohmann::json;

View File

@ -31,6 +31,8 @@ SOFTWARE.
#include <nlohmann/json.hpp>
DOCTEST_CLANG_SUPPRESS_WARNING("-Wunneeded-internal-declaration")
using nlohmann::json;
namespace

View File

@ -30,6 +30,10 @@ SOFTWARE.
#include "doctest_compatibility.h"
DOCTEST_GCC_SUPPRESS_WARNING("-Wfloat-equal")
#if DOCTEST_CLANG && DOCTEST_CLANG >= DOCTEST_COMPILER(3, 6, 0)
DOCTEST_CLANG_SUPPRESS_WARNING("-Wkeyword-macro")
#endif // clang 3.6.x
// for some reason including this after the json header leads to linker errors with VS 2017...
#include <locale>

View File

@ -33,6 +33,11 @@ SOFTWARE.
#include "doctest_compatibility.h"
#if (DOCTEST_GCC >= DOCTEST_COMPILER(4, 8, 0)) && \
(DOCTEST_GCC < DOCTEST_COMPILER(5, 0, 0))
DOCTEST_GCC_SUPPRESS_WARNING("-Wmissing-field-initializers")
#endif // gcc 4.8.x and 4.9.x
#include <nlohmann/json.hpp>
using nlohmann::detail::dtoa_impl::reinterpret_bits;

View File

@ -29,6 +29,10 @@ SOFTWARE.
#include "doctest_compatibility.h"
#if DOCTEST_CLANG && DOCTEST_CLANG >= DOCTEST_COMPILER(3, 6, 0)
DOCTEST_CLANG_SUPPRESS_WARNING("-Wkeyword-macro")
#endif // clang 3.6.x
// for some reason including this after the json header leads to linker errors with VS 2017...
#include <locale>

View File

@ -29,6 +29,8 @@ SOFTWARE.
#include "doctest_compatibility.h"
DOCTEST_GCC_SUPPRESS_WARNING("-Wunused-local-typedefs")
#include <nlohmann/json.hpp>
using nlohmann::json;