🎨 use Clang-Format

This commit is contained in:
Niels Lohmann
2023-11-29 18:01:57 +01:00
parent 9cca280a4d
commit 311ad0b877
123 changed files with 17729 additions and 15754 deletions
+1 -1
View File
@@ -18,7 +18,7 @@
#define STRINGIZE(x) STRINGIZE_EX(x)
template<typename T>
std::string namespace_name(std::string ns, T* /*unused*/ = nullptr) // NOLINT(performance-unnecessary-value-param)
std::string namespace_name(std::string ns, T* /*unused*/ = nullptr) // NOLINT(performance-unnecessary-value-param)
{
#if DOCTEST_MSVC && !DOCTEST_CLANG
ns = __FUNCSIG__;
+1 -1
View File
@@ -11,7 +11,7 @@
#include "config.hpp"
// define custom namespace
#define NLOHMANN_JSON_NAMESPACE nlohmann // this line may be omitted
#define NLOHMANN_JSON_NAMESPACE nlohmann // this line may be omitted
#define NLOHMANN_JSON_NAMESPACE_BEGIN namespace nlohmann {
#define NLOHMANN_JSON_NAMESPACE_END }
#include <nlohmann/json_fwd.hpp>
+4 -4
View File
@@ -20,13 +20,13 @@ TEST_CASE("default namespace")
{
std::string expected = "nlohmann::json_abi";
#if JSON_DIAGNOSTICS
#if JSON_DIAGNOSTICS
expected += "_diag";
#endif
#endif
#if JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON
#if JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON
expected += "_ldvcmp";
#endif
#endif
expected += "_v" STRINGIZE(NLOHMANN_JSON_VERSION_MAJOR);
expected += "_" STRINGIZE(NLOHMANN_JSON_VERSION_MINOR);
+4 -4
View File
@@ -21,13 +21,13 @@ TEST_CASE("default namespace without version component")
{
std::string expected = "nlohmann::json_abi";
#if JSON_DIAGNOSTICS
#if JSON_DIAGNOSTICS
expected += "_diag";
#endif
#endif
#if JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON
#if JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON
expected += "_ldvcmp";
#endif
#endif
expected += "::basic_json";