json/tests/abi/diag/diag_off.cpp
Florian Albrechtskirchinger 9a66df2f60
Add unit tests
2022-07-29 14:26:37 +02:00

23 lines
418 B
C++

#undef JSON_DIAGNOSTICS
#define JSON_DIAGNOSTICS 0
#include <nlohmann/json.hpp>
#include "diag.hpp"
std::size_t json_sizeof_diag_off()
{
return sizeof(nlohmann::json);
}
std::size_t json_sizeof_diag_off_explicit()
{
return sizeof(::NLOHMANN_JSON_NAMESPACE::json);
}
void json_at_diag_off()
{
using nlohmann::json;
json j = json{{"foo", json::object()}};
j.at(json::json_pointer("/foo/bar"));
}