Lines Matching +full:test +full:- +full:book
3 __| | __| | | | JSON for Modern C++ (test suite)
8 SPDX-License-Identifier: MIT
9 Copyright (c) 2013-2019 Niels Lohmann <http://nlohmann.me>.
32 // disable -Wnoexcept due to class Evil
34 DOCTEST_GCC_SUPPRESS_WARNING("-Wnoexcept")
215 // TODO(nlohmann) test exceptions in from_json()
216 c = it->second; in from_json()
259 const udt::contact_book book{{"C++"}, {cpp_programmer, {senior_programmer, addr}}}; variable
261 SECTION("conversion to json via free-functions")
272 json(book) ==
277 SECTION("conversion from json via free-functions")
302 CHECK(contacts == book.m_contacts);
304 CHECK(book == parsed_book);
340 CHECK(contacts == book.m_contacts);
342 CHECK(book == parsed_book);
383 opt.reset(new T(j.get<T>())); // NOLINT(cppcoreguidelines-owning-memory) in from_json()
414 …ohn Doe"}, udt::country::russia}); // NOLINT(cppcoreguidelines-owning-memory,modernize-make-shared)
505 // this is the overload needed for non-copyable types,
518 TEST_CASE("Non-copyable types" * doctest::test_suite("udt"))
527 …ohn Doe"}, udt::country::russia}); // NOLINT(cppcoreguidelines-owning-memory,modernize-make-unique)
549 // custom serializer - advanced usage
550 // pack structs that are pod-types (but not scalar types)
555 // use adl for non-pods, or scalar types
672 auto np = udt::non_pod{{"non-pod"}};
766 json j = "forty-two";
768 CHECK(cj == "forty-two");
811 TEST_CASE("an incomplete type does not trigger a compiler error in non-evaluated context" * doctest…
842 // silence Wunused-template warnings