projects
/
platform
/
upstream
/
flatbuffers.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e14bc1d
)
Fixed test that was incompatible with 64bit offsets.
author
Wouter van Oortmerssen
<wvo@google.com>
Wed, 10 Sep 2014 23:00:01 +0000
(16:00 -0700)
committer
Wouter van Oortmerssen
<wvo@google.com>
Mon, 15 Sep 2014 23:13:49 +0000
(16:13 -0700)
Change-Id: I35984d0ab3e849bec6cdaa364a39f66f2c37b4d0
Tested: on Linux.
tests/test.cpp
patch
|
blob
|
history
diff --git
a/tests/test.cpp
b/tests/test.cpp
index
118ecb6
..
3d11410
100644
(file)
--- a/
tests/test.cpp
+++ b/
tests/test.cpp
@@
-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() {