summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDerek Bailey <derekbailey@google.com>2023-05-11 09:39:54 -0700
committerDerek Bailey <derekbailey@google.com>2023-05-11 09:39:54 -0700
commit66e9d9823a348bfb8c7ad4d55e8419fbcb85463d (patch)
tree6c0a66ae463ab52a83ebe8c2cfc93fd4dc9a30bc /tests
parent9fc153a8f88890972015492b1529bdd057ba16b6 (diff)
downloadflatbuffers-66e9d9823a348bfb8c7ad4d55e8419fbcb85463d.tar.gz
flatbuffers-66e9d9823a348bfb8c7ad4d55e8419fbcb85463d.tar.bz2
flatbuffers-66e9d9823a348bfb8c7ad4d55e8419fbcb85463d.zip
fixed other occurenace of big buffer
Diffstat (limited to 'tests')
-rw-r--r--tests/64bit/offset64_test.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/tests/64bit/offset64_test.cpp b/tests/64bit/offset64_test.cpp
index 49f37872..0d3f6e6c 100644
--- a/tests/64bit/offset64_test.cpp
+++ b/tests/64bit/offset64_test.cpp
@@ -16,6 +16,7 @@
#include "test_64bit_generated.h"
#include "test_assert.h"
+
namespace flatbuffers {
namespace tests {
@@ -62,9 +63,6 @@ void Offset64Test() {
// Finish the buffer.
builder.Finish(root_table_offset);
- // Ensure the buffer is big.
- TEST_ASSERT(builder.GetSize() > FLATBUFFERS_MAX_BUFFER_SIZE);
-
Verifier::Options options;
// Allow the verifier to verify 64-bit buffers.
options.max_size = FLATBUFFERS_MAX_64_BUFFER_SIZE;
@@ -269,15 +267,12 @@ void Offset64Evolution() {
FlatBufferBuilder64 builder;
std::vector<uint8_t> giant_data;
- giant_data.resize(1LL << 31);
+ giant_data.resize(1LL << 3);
giant_data[2] = 42;
builder.Finish(
v2::CreateRootTableDirect(builder, 1234, &data, &giant_data));
- // Ensure the buffer is bigger than the 32-bit size limit for V1.
- TEST_ASSERT(builder.GetSize() > FLATBUFFERS_MAX_BUFFER_SIZE);
-
// Use each version to get a view at the root table.
auto v1_root = v1::GetRootTable(builder.GetBufferPointer());
auto v2_root = v2::GetRootTable(builder.GetBufferPointer());