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:
parent
2cd10a7405
commit
74b446f5fd
15 changed files with 151 additions and 64 deletions
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue