• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //     __ _____ _____ _____
2 //  __|  |   __|     |   | |  JSON for Modern C++ (supporting code)
3 // |  |  |__   |  |  | | | |  version 3.11.2
4 // |_____|_____|_____|_|___|  https://github.com/nlohmann/json
5 //
6 // SPDX-FileCopyrightText: 2013-2022 Niels Lohmann <https://nlohmann.me>
7 // SPDX-License-Identifier: MIT
8 
9 #include "doctest_compatibility.h"
10 
11 #include <nlohmann/json_v3_10_5.hpp>
12 using nlohmann::json;
13 using nlohmann::ordered_json;
14 
15 TEST_CASE("use library v3.10.5 without inline namespace")
16 {
17     json j;
18     j[ordered_json::json_pointer("/root")] = json::object();
19     // In v3.10.5 mixing json_pointers of different basic_json types
20     // results in implicit string conversion
21     CHECK(j.dump() == "{\"/root\":{}}");
22 }
23