Make sure we can replace flattened fields

This commit is contained in:
Patrick Urbanke
2023-10-07 21:41:36 +02:00
parent fed24baea5
commit f2a698ae34
+3 -2
View File
@@ -30,9 +30,10 @@ void test_replace_flatten() {
.salary = 60000.0};
auto employee2 =
rfl::replace(std::move(employee), rfl::make_field<"salary">(70000.0));
rfl::replace(std::move(employee), rfl::make_field<"salary">(70000.0),
rfl::make_field<"age">(46));
write_and_read(
employee2,
R"({"firstName":"Homer","lastName":"Simpson","age":45,"employer":"Mr. Burns","salary":70000.0})");
R"({"firstName":"Homer","lastName":"Simpson","age":46,"employer":"Mr. Burns","salary":70000.0})");
}