Another desperate try to fix the CI (#4489)

* 🚨 fix warning

* 💚 update actions

* 🚨 fix warning

* 🚨 fix warning

* 🚨 fix warning

* 💚 update actions

* 💚 update actions

* 🚨 fix warning

* 🚨 fix warning

* 💚 update actions

* 🚨 fix warning

* 💚 update actions

* 💚 update actions

* 💚 update actions

* 🚨 fix warning

* 🚨 fix warning

* 🚨 fix warning

* 🚨 fix warning

* 💚 update actions

* 💚 update actions

* 🚨 fix warning

* 💚 update actions

* 💚 update actions

* 💚 update actions

* 💚 update actions

* 💚 update actions
This commit is contained in:
Niels Lohmann
2024-11-13 10:21:26 +01:00
committed by GitHub
parent 4a602df34e
commit 1825117e63
37 changed files with 362 additions and 231 deletions

View File

@@ -17,7 +17,7 @@
// build test with C++14
// JSON_HAS_CPP_14
TEST_CASE_TEMPLATE("element access 2", Json, nlohmann::json, nlohmann::ordered_json)
TEST_CASE_TEMPLATE("element access 2", Json, nlohmann::json, nlohmann::ordered_json) // NOLINT(readability-math-missing-parentheses)
{
SECTION("object")
{
@@ -83,7 +83,7 @@ TEST_CASE_TEMPLATE("element access 2", Json, nlohmann::json, nlohmann::ordered_j
SECTION("null")
{
Json j_nonobject(Json::value_t::null);
const Json j_nonobject_const(j_nonobject);
const Json j_nonobject_const(j_nonobject); // NOLINT(performance-unnecessary-copy-initialization)
CHECK_THROWS_WITH_AS(j_nonobject.at("foo"), "[json.exception.type_error.304] cannot use at() with null", typename Json::type_error&);
CHECK_THROWS_WITH_AS(j_nonobject_const.at("foo"), "[json.exception.type_error.304] cannot use at() with null", typename Json::type_error&);
@@ -96,7 +96,7 @@ TEST_CASE_TEMPLATE("element access 2", Json, nlohmann::json, nlohmann::ordered_j
SECTION("boolean")
{
Json j_nonobject(Json::value_t::boolean);
const Json j_nonobject_const(j_nonobject);
const Json j_nonobject_const(j_nonobject); // NOLINT(performance-unnecessary-copy-initialization)
CHECK_THROWS_WITH_AS(j_nonobject.at("foo"), "[json.exception.type_error.304] cannot use at() with boolean", typename Json::type_error&);
CHECK_THROWS_WITH_AS(j_nonobject_const.at("foo"), "[json.exception.type_error.304] cannot use at() with boolean", typename Json::type_error&);
@@ -109,7 +109,7 @@ TEST_CASE_TEMPLATE("element access 2", Json, nlohmann::json, nlohmann::ordered_j
SECTION("string")
{
Json j_nonobject(Json::value_t::string);
const Json j_nonobject_const(j_nonobject);
const Json j_nonobject_const(j_nonobject); // NOLINT(performance-unnecessary-copy-initialization)
CHECK_THROWS_WITH_AS(j_nonobject.at("foo"), "[json.exception.type_error.304] cannot use at() with string", typename Json::type_error&);
CHECK_THROWS_WITH_AS(j_nonobject_const.at("foo"), "[json.exception.type_error.304] cannot use at() with string", typename Json::type_error&);
@@ -122,7 +122,7 @@ TEST_CASE_TEMPLATE("element access 2", Json, nlohmann::json, nlohmann::ordered_j
SECTION("array")
{
Json j_nonobject(Json::value_t::array);
const Json j_nonobject_const(j_nonobject);
const Json j_nonobject_const(j_nonobject); // NOLINT(performance-unnecessary-copy-initialization)
CHECK_THROWS_WITH_AS(j_nonobject.at("foo"), "[json.exception.type_error.304] cannot use at() with array", typename Json::type_error&);
CHECK_THROWS_WITH_AS(j_nonobject_const.at("foo"), "[json.exception.type_error.304] cannot use at() with array", typename Json::type_error&);
@@ -135,7 +135,7 @@ TEST_CASE_TEMPLATE("element access 2", Json, nlohmann::json, nlohmann::ordered_j
SECTION("number (integer)")
{
Json j_nonobject(Json::value_t::number_integer);
const Json j_nonobject_const(j_nonobject);
const Json j_nonobject_const(j_nonobject); // NOLINT(performance-unnecessary-copy-initialization)
CHECK_THROWS_WITH_AS(j_nonobject.at("foo"), "[json.exception.type_error.304] cannot use at() with number", typename Json::type_error&);
CHECK_THROWS_WITH_AS(j_nonobject_const.at("foo"), "[json.exception.type_error.304] cannot use at() with number", typename Json::type_error&);
@@ -148,7 +148,7 @@ TEST_CASE_TEMPLATE("element access 2", Json, nlohmann::json, nlohmann::ordered_j
SECTION("number (unsigned)")
{
Json j_nonobject(Json::value_t::number_unsigned);
const Json j_nonobject_const(j_nonobject);
const Json j_nonobject_const(j_nonobject); // NOLINT(performance-unnecessary-copy-initialization)
CHECK_THROWS_WITH_AS(j_nonobject.at("foo"), "[json.exception.type_error.304] cannot use at() with number", typename Json::type_error&);
CHECK_THROWS_WITH_AS(j_nonobject_const.at("foo"), "[json.exception.type_error.304] cannot use at() with number", typename Json::type_error&);
@@ -161,7 +161,7 @@ TEST_CASE_TEMPLATE("element access 2", Json, nlohmann::json, nlohmann::ordered_j
SECTION("number (floating-point)")
{
Json j_nonobject(Json::value_t::number_float);
const Json j_nonobject_const(j_nonobject);
const Json j_nonobject_const(j_nonobject); // NOLINT(performance-unnecessary-copy-initialization)
CHECK_THROWS_WITH_AS(j_nonobject.at("foo"), "[json.exception.type_error.304] cannot use at() with number", typename Json::type_error&);
CHECK_THROWS_WITH_AS(j_nonobject_const.at("foo"), "[json.exception.type_error.304] cannot use at() with number", typename Json::type_error&);
@@ -1456,7 +1456,7 @@ TEST_CASE_TEMPLATE("element access 2", Json, nlohmann::json, nlohmann::ordered_j
}
#if !defined(JSON_NOEXCEPTION)
TEST_CASE_TEMPLATE("element access 2 (throwing tests)", Json, nlohmann::json, nlohmann::ordered_json)
TEST_CASE_TEMPLATE("element access 2 (throwing tests)", Json, nlohmann::json, nlohmann::ordered_json) // NOLINT(readability-math-missing-parentheses)
{
SECTION("object")
{
@@ -1492,7 +1492,7 @@ TEST_CASE_TEMPLATE("element access 2 (throwing tests)", Json, nlohmann::json, nl
#endif
// TODO(falbrechtskirchinger) merge with the other test case; clean up
TEST_CASE_TEMPLATE("element access 2 (additional value() tests)", Json, nlohmann::json, nlohmann::ordered_json)
TEST_CASE_TEMPLATE("element access 2 (additional value() tests)", Json, nlohmann::json, nlohmann::ordered_json) // NOLINT(readability-math-missing-parentheses)
{
using string_t = typename Json::string_t;
using number_integer_t = typename Json::number_integer_t;