From 1a90c9463aa5691b4a1fd5b746fedfbecebe57ff Mon Sep 17 00:00:00 2001 From: Florian Albrechtskirchinger Date: Fri, 22 Apr 2022 14:21:16 +0200 Subject: [PATCH] Disable regression test for #3070 on GCC <8.4 (#3451) --- test/src/unit-regression2.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/src/unit-regression2.cpp b/test/src/unit-regression2.cpp index 3ab9a2a2c..e034593ed 100644 --- a/test/src/unit-regression2.cpp +++ b/test/src/unit-regression2.cpp @@ -48,6 +48,7 @@ using ordered_json = nlohmann::ordered_json; #endif #if JSON_HAS_EXPERIMENTAL_FILESYSTEM +// JSON_HAS_CPP_17 (magic keyword; do not remove) #include namespace nlohmann::detail { @@ -61,7 +62,6 @@ namespace std_fs = std::filesystem; } // namespace nlohmann::detail #endif - #ifdef JSON_HAS_CPP_20 #include #endif @@ -793,8 +793,8 @@ TEST_CASE("regression tests 2") const auto j_path = j.get(); CHECK(j_path == text_path); -#ifndef _MSC_VER - // works everywhere but on MSVC +#if !defined(_MSC_VER) && !(defined(__GNUC__) && __GNUC__ == 8 && __GNUC_MINOR__ < 4) + // works everywhere but on MSVC and GCC <8.4 CHECK_THROWS_WITH_AS(nlohmann::detail::std_fs::path(json(1)), "[json.exception.type_error.302] type must be string, but is number", json::type_error); #endif }