mirror of
https://codeberg.org/DawnMagnet/reflect-cpp
synced 2026-12-06 02:36:18 +08:00
More comprehensive test of the default values
This commit is contained in:
@@ -19,8 +19,16 @@ void test_default_values() {
|
||||
};
|
||||
|
||||
const auto bart = Person{.first_name = "Bart"};
|
||||
const auto lisa = Person{.first_name = "Lisa"};
|
||||
const auto maggie = Person{.first_name = "Maggie"};
|
||||
const auto homer =
|
||||
Person{.first_name = "Homer",
|
||||
.children = std::vector<Person>({bart, lisa, maggie})};
|
||||
|
||||
write_and_read(
|
||||
bart,
|
||||
"{\"firstName\":\"Bart\",\"lastName\":\"Simpson\",\"children\":[]}");
|
||||
homer,
|
||||
"{\"firstName\":\"Homer\",\"lastName\":\"Simpson\",\"children\":[{"
|
||||
"\"firstName\":\"Bart\",\"lastName\":\"Simpson\",\"children\":[]},{"
|
||||
"\"firstName\":\"Lisa\",\"lastName\":\"Simpson\",\"children\":[]},{"
|
||||
"\"firstName\":\"Maggie\",\"lastName\":\"Simpson\",\"children\":[]}]}");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user