mirror of
https://github.com/nlohmann/json.git
synced 2026-09-04 15:35:01 +00:00
🎨 use Clang-Format
This commit is contained in:
@@ -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__;
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user