summaryrefslogtreecommitdiffstats
path: root/searchcore/src/tests/proton/documentdb/documentdbconfig/documentdbconfig_test.cpp
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2022-09-06 14:32:17 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2022-09-06 14:32:17 +0000
commit88a5e95f8ce908e7f15c6c2b3f08a1fb1bd2fddd (patch)
treecb3df968a344c61aa4993751d1ebee939975ba63 /searchcore/src/tests/proton/documentdb/documentdbconfig/documentdbconfig_test.cpp
parentc2236fbba225babc5088cc9a06638b76b2183b69 (diff)
Unify access to assets needed during rank-setup.
Diffstat (limited to 'searchcore/src/tests/proton/documentdb/documentdbconfig/documentdbconfig_test.cpp')
-rw-r--r--searchcore/src/tests/proton/documentdb/documentdbconfig/documentdbconfig_test.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/searchcore/src/tests/proton/documentdb/documentdbconfig/documentdbconfig_test.cpp b/searchcore/src/tests/proton/documentdb/documentdbconfig/documentdbconfig_test.cpp
index 47e9568e086..fd47cc9b264 100644
--- a/searchcore/src/tests/proton/documentdb/documentdbconfig/documentdbconfig_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/documentdbconfig/documentdbconfig_test.cpp
@@ -8,7 +8,6 @@
#include <vespa/vespalib/testkit/testapp.h>
#include <vespa/config-summary.h>
#include <vespa/config-summarymap.h>
-#include <vespa/document/config/documenttypes_config_fwd.h>
#include <vespa/document/repo/configbuilder.h>
#include <vespa/document/repo/documenttyperepo.h>
#include <vespa/document/datatype/datatype.h>
@@ -73,13 +72,13 @@ public:
return *this;
}
MyConfigBuilder &addRankingExpression() {
- auto expr_list = RankingExpressions().add("my_expr", "my_file");
- _builder.rankingExpressions(make_shared<RankingExpressions>(expr_list));
+ _builder.rankingExpressions(make_shared<RankingExpressions>(std::move(RankingExpressions().add("my_expr", "my_file"))));
return *this;
}
MyConfigBuilder &addOnnxModel() {
- OnnxModels::Vector models = {{"my_model_name", "my_model_file"}};
- _builder.onnxModels(make_shared<OnnxModels>(models));
+ OnnxModels::Vector models;
+ models.emplace_back("my_model_name", "my_model_file");
+ _builder.onnxModels(make_shared<OnnxModels>(std::move(models)));
return *this;
}
MyConfigBuilder &addImportedField() {
@@ -175,7 +174,7 @@ struct DelayAttributeAspectFixture {
Schema::SP schema;
ConfigSP attrCfg;
ConfigSP noAttrCfg;
- DelayAttributeAspectFixture(bool hasDocField)
+ explicit DelayAttributeAspectFixture(bool hasDocField)
: schema(make_shared<Schema>()),
attrCfg(),
noAttrCfg()