summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLester Solbakken <lesters@yahoo-inc.com>2017-08-18 12:28:54 +0000
committerLester Solbakken <lesters@yahoo-inc.com>2017-08-18 12:28:54 +0000
commitd059bd52d8bdd9db6d0dbcaff2ec29572dadc206 (patch)
tree356fba17bf2d8377a90a02dd1b22e618df704d05
parent20458bf9b43639a48123631fef8b4faf8a72565d (diff)
Simplify setup test
-rw-r--r--searchlib/src/tests/features/internal_max_reduce_prod_join_feature/internal_max_reduce_prod_join_feature_test.cpp18
1 files changed, 6 insertions, 12 deletions
diff --git a/searchlib/src/tests/features/internal_max_reduce_prod_join_feature/internal_max_reduce_prod_join_feature_test.cpp b/searchlib/src/tests/features/internal_max_reduce_prod_join_feature/internal_max_reduce_prod_join_feature_test.cpp
index 664a831a610..e9bf4fe5cbb 100644
--- a/searchlib/src/tests/features/internal_max_reduce_prod_join_feature/internal_max_reduce_prod_join_feature_test.cpp
+++ b/searchlib/src/tests/features/internal_max_reduce_prod_join_feature/internal_max_reduce_prod_join_feature_test.cpp
@@ -31,20 +31,14 @@ struct SetupFixture
: blueprint(),
indexEnv()
{
- addAttribute("double", DataType::DOUBLE);
- addArrayAttribute("longarray", DataType::INT64);
- addArrayAttribute("intarray", DataType::INT32);
- addArrayAttribute("doublearray", DataType::DOUBLE);
+ addAttribute("double", CollectionType::SINGLE, DataType::DOUBLE);
+ addAttribute("longarray", CollectionType::ARRAY, DataType::INT64);
+ addAttribute("intarray", CollectionType::ARRAY, DataType::INT32);
+ addAttribute("doublearray", CollectionType::ARRAY, DataType::DOUBLE);
}
- void addArrayAttribute(const vespalib::string& name, const DataType& dataType) {
- FieldInfo attrInfo(FieldType::ATTRIBUTE, CollectionType::ARRAY, name, 0);
- attrInfo.set_data_type(dataType);
- indexEnv.getFields().push_back(attrInfo);
- }
-
- void addAttribute(const vespalib::string& name, const DataType& dataType) {
- FieldInfo attrInfo(FieldType::ATTRIBUTE, CollectionType::SINGLE, name, 0);
+ void addAttribute(const vespalib::string& name, const CollectionType& collType, const DataType& dataType) {
+ FieldInfo attrInfo(FieldType::ATTRIBUTE, collType, name, 0);
attrInfo.set_data_type(dataType);
indexEnv.getFields().push_back(attrInfo);
}