Fixed test that was incompatible with 64bit offsets.

Change-Id: I35984d0ab3e849bec6cdaa364a39f66f2c37b4d0
Tested: on Linux.
This commit is contained in:
Wouter van Oortmerssen 2014-09-10 16:00:01 -07:00
parent e14bc1d9ac
commit 32f2c1c3b9
1 changed files with 2 additions and 1 deletions

View File

@ -505,7 +505,8 @@ void ScientificTest() {
auto root = flatbuffers::GetRoot<float>(parser.builder_.GetBufferPointer());
// root will point to the table, which is a 32bit vtable offset followed
// by a float:
TEST_EQ(fabs(root[1] - 3.14159) < 0.001, true);
TEST_EQ(sizeof(flatbuffers::soffset_t) == 4 && // Test assumes 32bit offsets
fabs(root[1] - 3.14159) < 0.001, true);
}
void EnumStringsTest() {