add a switch to enable implicit conversions (defaults to true)

wrap implicit conversions tests around the JSON_USE_IMPLICIT_CONVERSIONS
macro
This commit is contained in:
Théo DELRIEU 2020-07-16 11:11:35 +02:00
parent 2cd10a7405
commit 74b446f5fd
No known key found for this signature in database
GPG key ID: 7D6E00D1DF01DEAF
15 changed files with 151 additions and 64 deletions

View file

@ -312,6 +312,7 @@ TEST_CASE("basic usage" * doctest::test_suite("udt"))
CHECK(name.m_val == "new name");
}
#if JSON_USE_IMPLICIT_CONVERSIONS
SECTION("implicit conversions")
{
const udt::contact_book parsed_book = big_json;
@ -335,6 +336,7 @@ TEST_CASE("basic usage" * doctest::test_suite("udt"))
CHECK(book_name == udt::name{"C++"});
CHECK(book == parsed_book);
}
#endif
}
}