mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-14 00:25:26 +00:00
Reworked reflection.h to be more general.
e.g. support generic reading/writing from structs/vectors etc. Change-Id: I2eb6e24db088a72da444d5c8df7e506e53d5bc2d Tested: on Linux. Bug: 22660837
This commit is contained in:
@@ -324,7 +324,7 @@ void ReflectionTest(uint8_t *flatbuf, size_t length) {
|
||||
TEST_EQ(hp_int64, 80);
|
||||
auto hp_double = flatbuffers::GetAnyFieldF(root, hp_field);
|
||||
TEST_EQ(hp_double, 80.0);
|
||||
auto hp_string = flatbuffers::GetAnyFieldS(root, hp_field, schema);
|
||||
auto hp_string = flatbuffers::GetAnyFieldS(root, hp_field, &schema);
|
||||
TEST_EQ_STR(hp_string.c_str(), "80");
|
||||
|
||||
// We can also modify it.
|
||||
|
||||
Reference in New Issue
Block a user