use u8 prefix in unit-udt.cpp
This commit is contained in:
parent
7e750ec1fa
commit
1c21c87e6f
1 changed files with 2 additions and 2 deletions
|
@ -240,14 +240,14 @@ TEST_CASE("basic usage", "[udt]")
|
||||||
|
|
||||||
CHECK(
|
CHECK(
|
||||||
json(book) ==
|
json(book) ==
|
||||||
R"({"name":"C++", "contacts" : [{"person" : {"age":23, "name":"theo", "country":"France"}, "address":"Paris"}, {"person" : {"age":42, "country":"中华人民共和国", "name":"王芳"}, "address":"Paris"}]})"_json);
|
u8R"({"name":"C++", "contacts" : [{"person" : {"age":23, "name":"theo", "country":"France"}, "address":"Paris"}, {"person" : {"age":42, "country":"中华人民共和国", "name":"王芳"}, "address":"Paris"}]})"_json);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SECTION("conversion from json via free-functions")
|
SECTION("conversion from json via free-functions")
|
||||||
{
|
{
|
||||||
const auto big_json =
|
const auto big_json =
|
||||||
R"({"name":"C++", "contacts" : [{"person" : {"age":23, "name":"theo", "country":"France"}, "address":"Paris"}, {"person" : {"age":42, "country":"中华人民共和国", "name":"王芳"}, "address":"Paris"}]})"_json;
|
u8R"({"name":"C++", "contacts" : [{"person" : {"age":23, "name":"theo", "country":"France"}, "address":"Paris"}, {"person" : {"age":42, "country":"中华人民共和国", "name":"王芳"}, "address":"Paris"}]})"_json;
|
||||||
const auto parsed_book = big_json.get<udt::contact_book>();
|
const auto parsed_book = big_json.get<udt::contact_book>();
|
||||||
const auto book_name = big_json["name"].get<udt::name>();
|
const auto book_name = big_json["name"].get<udt::name>();
|
||||||
const auto contacts = big_json["contacts"].get<std::vector<udt::contact>>();
|
const auto contacts = big_json["contacts"].get<std::vector<udt::contact>>();
|
||||||
|
|
Loading…
Reference in a new issue