mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-06 21:37:36 +00:00
Fixed JSON parser not sorting vectors of tables/structs with key.
Change-Id: Iacc0c8513af80a736700e6cbaf513ebdf8e3ac89
This commit is contained in:
@@ -339,8 +339,9 @@ void AccessFlatBufferTest(const uint8_t *flatbuf, size_t length,
|
||||
// Example of accessing a vector of tables:
|
||||
auto vecoftables = monster->testarrayoftables();
|
||||
TEST_EQ(vecoftables->size(), 3U);
|
||||
for (auto it = vecoftables->begin(); it != vecoftables->end(); ++it)
|
||||
for (auto it = vecoftables->begin(); it != vecoftables->end(); ++it) {
|
||||
TEST_EQ(strlen(it->name()->c_str()) >= 4, true);
|
||||
}
|
||||
TEST_EQ_STR(vecoftables->Get(0)->name()->c_str(), "Barney");
|
||||
TEST_EQ(vecoftables->Get(0)->hp(), 1000);
|
||||
TEST_EQ_STR(vecoftables->Get(1)->name()->c_str(), "Fred");
|
||||
|
||||
Reference in New Issue
Block a user