Do not allow the reading of floats as integers and vice versa (#387)

This commit is contained in:
Dr. Patrick Urbanke (劉自成)
2025-03-16 16:25:45 +08:00
committed by GitHub
parent c9482719f6
commit c929d3fe0d
17 changed files with 98 additions and 45 deletions
+1 -1
View File
@@ -39,7 +39,7 @@ TEST(avro, test_tutorial_example) {
const auto serialized1 = rfl::avro::write(person, schema.value());
const auto res = rfl::avro::read<Person>(serialized1, schema.value());
EXPECT_TRUE(res && true) << "Test failed on read. Error: "
<< res.error().value().what();
<< res.error().what();
const auto serialized2 = rfl::avro::write(res.value(), schema.value());
EXPECT_EQ(serialized1, serialized2);
}