diff --git a/tests/test.cpp b/tests/test.cpp index 118ecb6cb..3d11410ed 100644 --- a/tests/test.cpp +++ b/tests/test.cpp @@ -505,7 +505,8 @@ void ScientificTest() { auto root = flatbuffers::GetRoot(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() {