From 91c06cae20d966836adefdbb9f88784ca611d7c0 Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Sat, 26 Sep 2026 13:58:17 +0200 Subject: [PATCH] Keep the MessagePack string test type and its alias in one block astyle indented the alias oddly when it had an #ifdef of its own after the binary alias; declare it right after the string type, in the same block. Signed-off-by: Niels Lohmann --- tests/src/unit-msgpack.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/tests/src/unit-msgpack.cpp b/tests/src/unit-msgpack.cpp index 21a21f3ca..37e0f33b6 100644 --- a/tests/src/unit-msgpack.cpp +++ b/tests/src/unit-msgpack.cpp @@ -2191,17 +2191,15 @@ class beyond_uint32_string_t : public std::string return beyond_uint32_size(); } }; + +using beyond_uint32_string_json = nlohmann::basic_json < + std::map, std::vector, beyond_uint32_string_t, bool, std::int64_t, std::uint64_t, + double, std::allocator, nlohmann::adl_serializer, std::vector, void >; #endif using beyond_uint32_binary_json = nlohmann::basic_json < std::map, std::vector, std::string, bool, std::int64_t, std::uint64_t, double, std::allocator, nlohmann::adl_serializer, beyond_uint32_binary_t, void >; - -#ifdef JSON_TEST_BEYOND_UINT32_STRING -using beyond_uint32_string_json = nlohmann::basic_json < - std::map, std::vector, beyond_uint32_string_t, bool, std::int64_t, std::uint64_t, - double, std::allocator, nlohmann::adl_serializer, std::vector, void >; -#endif } // namespace TEST_CASE("MessagePack lengths beyond UINT32_MAX cannot be serialized")