summaryrefslogtreecommitdiffstats
path: root/searchcommon/src/tests/attribute/config/attribute_config_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'searchcommon/src/tests/attribute/config/attribute_config_test.cpp')
-rw-r--r--searchcommon/src/tests/attribute/config/attribute_config_test.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/searchcommon/src/tests/attribute/config/attribute_config_test.cpp b/searchcommon/src/tests/attribute/config/attribute_config_test.cpp
index d0a2f693473..99de79b8976 100644
--- a/searchcommon/src/tests/attribute/config/attribute_config_test.cpp
+++ b/searchcommon/src/tests/attribute/config/attribute_config_test.cpp
@@ -7,6 +7,7 @@ using search::attribute::Config;
using search::attribute::BasicType;
using search::attribute::CollectionType;
using vespalib::eval::ValueType;
+using search::GrowStrategy;
struct Fixture
@@ -100,5 +101,14 @@ TEST("test operator== on attribute config for tensor type")
EXPECT_TRUE(cfg1 != cfg3);
}
+TEST("Test GrowStrategy consistency") {
+ GrowStrategy g(1024, 0.5, 17, 0.4f);
+ EXPECT_EQUAL(1024u, g.getDocsInitialCapacity());
+ EXPECT_EQUAL(50u, g.getDocsGrowPercent());
+ EXPECT_EQUAL(0.5, g.getDocsGrowFactor());
+ EXPECT_EQUAL(17u, g.getDocsGrowDelta());
+ EXPECT_EQUAL(0.4f, g.getMultiValueAllocGrowFactor());
+}
+
TEST_MAIN() { TEST_RUN_ALL(); }