diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2020-12-19 23:10:31 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2021-01-10 22:35:28 +0000 |
commit | 8f1440ee4f7a41925d88138da80f27d418e3e5f2 (patch) | |
tree | b7b5c7002d9b7bf34bed5355f8bef645696b97f7 /vespalib/src/tests/datastore/array_store | |
parent | dfd9a1b244725de2f594053cdb11c7ef0f3cb9ae (diff) |
Have the BufferType::_emptyEntry be static.
Use an array of buffer types in the array class.
Diffstat (limited to 'vespalib/src/tests/datastore/array_store')
-rw-r--r-- | vespalib/src/tests/datastore/array_store/array_store_test.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/vespalib/src/tests/datastore/array_store/array_store_test.cpp b/vespalib/src/tests/datastore/array_store/array_store_test.cpp index ea7c746e58f..8ed4ab3767b 100644 --- a/vespalib/src/tests/datastore/array_store/array_store_test.cpp +++ b/vespalib/src/tests/datastore/array_store/array_store_test.cpp @@ -145,6 +145,15 @@ TEST("require that we test with trivial and non-trivial types") EXPECT_FALSE(vespalib::can_skip_destruction<StringFixture::value_type>::value); } +TEST_F("control static sizes", NumberFixture(3)) { + EXPECT_EQUAL(424u, sizeof(f.store)); + EXPECT_EQUAL(328u, sizeof(NumberFixture::ArrayStoreType::DataStoreType)); + EXPECT_EQUAL(64u, sizeof(NumberFixture::ArrayStoreType::SmallArrayType)); + MemoryUsage usage = f.store.getMemoryUsage(); + EXPECT_EQUAL(960u, usage.allocatedBytes()); + EXPECT_EQUAL(32u, usage.usedBytes()); +} + TEST_F("require that we can add and get small arrays of trivial type", NumberFixture(3)) { TEST_DO(f.assertAdd({})); |