diff options
Diffstat (limited to 'vespalib/src/tests/datastore/array_store/array_store_test.cpp')
-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({})); |