mirror of
https://github.com/nlohmann/json.git
synced 2026-04-24 00:39:25 +00:00
Fix CI, again (#4083)
This commit is contained in:
@@ -14,7 +14,6 @@ using nlohmann::json;
|
||||
#include <climits> // SIZE_MAX
|
||||
#include <limits> // numeric_limits
|
||||
|
||||
|
||||
template <typename OfType, typename T, bool MinInRange, bool MaxInRange>
|
||||
struct trait_test_arg
|
||||
{
|
||||
@@ -88,7 +87,6 @@ TEST_CASE_TEMPLATE_DEFINE("value_in_range_of trait", T, value_in_range_of_test)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
TEST_CASE("32bit")
|
||||
{
|
||||
REQUIRE(SIZE_MAX == 0xffffffff);
|
||||
|
||||
@@ -319,7 +319,6 @@ TEST_CASE("algorithms")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
SECTION("copy")
|
||||
{
|
||||
SECTION("copy without if")
|
||||
@@ -336,7 +335,6 @@ TEST_CASE("algorithms")
|
||||
json dest_arr;
|
||||
const json source_arr = {0, 3, 6, 9, 12, 15, 20};
|
||||
|
||||
|
||||
std::copy_if(source_arr.begin(), source_arr.end(), std::back_inserter(dest_arr), [](const json & _value)
|
||||
{
|
||||
return _value.get<int>() % 3 == 0;
|
||||
@@ -364,6 +362,4 @@ TEST_CASE("algorithms")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
|
||||
/* forward declarations */
|
||||
class alt_string;
|
||||
bool operator<(const char* op1, const alt_string& op2) noexcept;
|
||||
@@ -180,7 +179,6 @@ using alt_json = nlohmann::basic_json <
|
||||
std::allocator,
|
||||
nlohmann::adl_serializer >;
|
||||
|
||||
|
||||
bool operator<(const char* op1, const alt_string& op2) noexcept
|
||||
{
|
||||
return op1 < op2.str_impl;
|
||||
|
||||
@@ -339,13 +339,13 @@ TEST_CASE("BJData")
|
||||
std::vector<int32_t> const numbers
|
||||
{
|
||||
-32769,
|
||||
-100000,
|
||||
-1000000,
|
||||
-10000000,
|
||||
-100000000,
|
||||
-1000000000,
|
||||
-2147483647 - 1, // https://stackoverflow.com/a/29356002/266378
|
||||
};
|
||||
-100000,
|
||||
-1000000,
|
||||
-10000000,
|
||||
-100000000,
|
||||
-1000000000,
|
||||
-2147483647 - 1, // https://stackoverflow.com/a/29356002/266378
|
||||
};
|
||||
for (const auto i : numbers)
|
||||
{
|
||||
CAPTURE(i)
|
||||
@@ -1499,7 +1499,6 @@ TEST_CASE("BJData")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
SECTION("binary")
|
||||
{
|
||||
SECTION("N = 0..127")
|
||||
|
||||
@@ -919,7 +919,6 @@ TEST_CASE("BSON numerical data")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
SECTION("signed std::int32_t: INT32_MIN .. INT32_MAX")
|
||||
{
|
||||
std::vector<int32_t> const numbers
|
||||
|
||||
@@ -241,13 +241,13 @@ TEST_CASE("CBOR")
|
||||
const std::vector<int64_t> numbers
|
||||
{
|
||||
-65537,
|
||||
-100000,
|
||||
-1000000,
|
||||
-10000000,
|
||||
-100000000,
|
||||
-1000000000,
|
||||
-4294967296,
|
||||
};
|
||||
-100000,
|
||||
-1000000,
|
||||
-10000000,
|
||||
-100000000,
|
||||
-1000000000,
|
||||
-4294967296,
|
||||
};
|
||||
for (const auto i : numbers)
|
||||
{
|
||||
CAPTURE(i)
|
||||
|
||||
@@ -172,7 +172,6 @@ TEST_CASE("constructors")
|
||||
CHECK(j == j_reference);
|
||||
}
|
||||
|
||||
|
||||
SECTION("std::multimap<json::string_t, json>")
|
||||
{
|
||||
std::multimap<json::string_t, json> const o {{"a", json(1)}, {"b", json(1u)}, {"c", json(2.2)}, {"d", json(false)}, {"e", json("string")}, {"f", json()}};
|
||||
|
||||
@@ -229,7 +229,6 @@ using json_with_visitor_t = nlohmann::basic_json <
|
||||
visitor_adaptor
|
||||
>;
|
||||
|
||||
|
||||
template <class Fnc>
|
||||
void visitor_adaptor::visit(const Fnc& fnc) const
|
||||
{
|
||||
|
||||
@@ -72,7 +72,6 @@ TEST_CASE_TEMPLATE("element access 2", Json, nlohmann::json, nlohmann::ordered_j
|
||||
CHECK_THROWS_WITH_AS(j.at("foo"), "[json.exception.out_of_range.403] key 'foo' not found", typename Json::out_of_range&);
|
||||
CHECK_THROWS_WITH_AS(j_const.at("foo"), "[json.exception.out_of_range.403] key 'foo' not found", typename Json::out_of_range&);
|
||||
|
||||
|
||||
#ifdef JSON_HAS_CPP_17
|
||||
CHECK_THROWS_WITH_AS(j.at(std::string_view("foo")), "[json.exception.out_of_range.403] key 'foo' not found", typename Json::out_of_range&);
|
||||
CHECK_THROWS_WITH_AS(j_const.at(std::string_view("foo")), "[json.exception.out_of_range.403] key 'foo' not found", typename Json::out_of_range&);
|
||||
|
||||
@@ -873,7 +873,6 @@ TEST_CASE("iterators 2")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#if JSON_HAS_RANGES
|
||||
// JSON_HAS_CPP_20 (do not remove; see note at top of file)
|
||||
SECTION("ranges")
|
||||
|
||||
@@ -479,11 +479,11 @@ TEST_CASE("MessagePack")
|
||||
std::vector<int32_t> const numbers
|
||||
{
|
||||
-32769,
|
||||
-65536,
|
||||
-77777,
|
||||
-1048576,
|
||||
-2147483648LL,
|
||||
};
|
||||
-65536,
|
||||
-77777,
|
||||
-1048576,
|
||||
-2147483648LL,
|
||||
};
|
||||
for (auto i : numbers)
|
||||
{
|
||||
CAPTURE(i)
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
using nlohmann::json;
|
||||
using nlohmann::ordered_json;
|
||||
|
||||
|
||||
TEST_CASE("ordered_json")
|
||||
{
|
||||
json j;
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
#include <nlohmann/json.hpp>
|
||||
using nlohmann::ordered_map;
|
||||
|
||||
|
||||
TEST_CASE("ordered_map")
|
||||
{
|
||||
SECTION("constructor")
|
||||
|
||||
@@ -1203,7 +1203,6 @@ TEST_CASE("regression tests 1")
|
||||
CHECK(j["a"] >= 3);
|
||||
CHECK(j["a"] > 3);
|
||||
|
||||
|
||||
CHECK(!(j["a"] <= 4));
|
||||
CHECK(!(j["a"] < 4));
|
||||
CHECK(!(j["a"] >= 6));
|
||||
|
||||
Reference in New Issue
Block a user