mirror of
https://codeberg.org/DawnMagnet/reflect-cpp
synced 2026-12-03 16:56:17 +08:00
Minor bugfix in write_and_read
This commit is contained in:
@@ -15,8 +15,8 @@ void write_and_read(const T& _struct, const std::string& _expected) {
|
||||
<< json_string1 << std::endl;
|
||||
return;
|
||||
}
|
||||
const auto struct2 = rfl::json::read<T>(json_string1);
|
||||
const auto json_string2 = rfl::json::write(_struct);
|
||||
const auto struct2 = rfl::json::read<T>(json_string1).value();
|
||||
const auto json_string2 = rfl::json::write(struct2);
|
||||
if (json_string2 != _expected) {
|
||||
std::cout << "Test failed on read. Expected:" << std::endl
|
||||
<< _expected << std::endl
|
||||
|
||||
Reference in New Issue
Block a user