Lines Matching +full:test +full:- +full:book
6 // SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me>
7 // SPDX-License-Identifier: MIT
11 // disable -Wnoexcept due to class Evil
13 DOCTEST_GCC_SUPPRESS_WARNING("-Wnoexcept")
18 using namespace nlohmann::literals; // NOLINT(google-build-using-namespace)
196 // TODO(nlohmann) test exceptions in from_json()
197 c = it->second; in from_json()
240 const udt::contact_book book{{"C++"}, {cpp_programmer, {senior_programmer, addr}}}; variable
242 SECTION("conversion to json via free-functions")
253 json(book) ==
258 SECTION("conversion from json via free-functions")
283 CHECK(contacts == book.m_contacts);
285 CHECK(book == parsed_book);
321 CHECK(contacts == book.m_contacts);
323 CHECK(book == parsed_book);
364 opt.reset(new T(j.get<T>())); // NOLINT(cppcoreguidelines-owning-memory) in from_json()
395 …ohn Doe"}, udt::country::russia}); // NOLINT(cppcoreguidelines-owning-memory,modernize-make-shared)
486 // this is the overload needed for non-copyable types,
499 TEST_CASE("Non-copyable types" * doctest::test_suite("udt"))
508 …ohn Doe"}, udt::country::russia}); // NOLINT(cppcoreguidelines-owning-memory,modernize-make-unique)
530 // custom serializer - advanced usage
531 // pack structs that are pod-types (but not scalar types)
536 // use adl for non-pods, or scalar types
569 …o* bytes = static_cast<char*>(static_cast<void*>(&value)); // NOLINT(bugprone-casting-through-void) in from_json()
588 …ast< const unsigned char*>(static_cast<const void*>(&t)); // NOLINT(bugprone-casting-through-void) in to_json()
653 auto np = udt::non_pod{{"non-pod"}};
747 json const j = "forty-two";
749 CHECK(cj == "forty-two");
792 TEST_CASE("an incomplete type does not trigger a compiler error in non-evaluated context" * doctest…
823 // silence Wunused-template warnings