mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-03 12:21:23 +00:00
Added functionality to obtain a buffer pointer from a root.
Change-Id: Ia63e41d0304e8668ea4ce09a4c31dd999eb96994 Tested: on Linux. Bug: 32218623
This commit is contained in:
@@ -270,6 +270,9 @@ void AccessFlatBufferTest(const uint8_t *flatbuf, size_t length,
|
||||
// Checking for presence of fields:
|
||||
TEST_EQ(flatbuffers::IsFieldPresent(monster, Monster::VT_HP), true);
|
||||
TEST_EQ(flatbuffers::IsFieldPresent(monster, Monster::VT_MANA), false);
|
||||
|
||||
// Obtaining a buffer from a root:
|
||||
TEST_EQ(GetBufferStartFromRootPointer(monster), flatbuf);
|
||||
}
|
||||
|
||||
// Change a FlatBuffer in-place, after it has been constructed.
|
||||
|
||||
Reference in New Issue
Block a user