From f00f8f59a5f06c9aa5e4fc76835c7f9ddb999ab9 Mon Sep 17 00:00:00 2001 From: Arne Juul Date: Wed, 3 Feb 2021 13:18:28 +0000 Subject: use GenSpec in dense_single_reduce_function_test --- .../dense_single_reduce_function_test.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'eval') diff --git a/eval/src/tests/instruction/dense_single_reduce_function/dense_single_reduce_function_test.cpp b/eval/src/tests/instruction/dense_single_reduce_function/dense_single_reduce_function_test.cpp index c6da0b94de3..2d7b32359bc 100644 --- a/eval/src/tests/instruction/dense_single_reduce_function/dense_single_reduce_function_test.cpp +++ b/eval/src/tests/instruction/dense_single_reduce_function/dense_single_reduce_function_test.cpp @@ -4,7 +4,7 @@ #include #include #include -#include +#include #include #include @@ -19,15 +19,15 @@ const ValueBuilderFactory &prod_factory = FastValueBuilderFactory::get(); EvalFixture::ParamRepo make_params() { return EvalFixture::ParamRepo() - .add_dense({{"a", 2}, {"b", 3}, {"c", 4}, {"d", 5}}) - .add_dense({{"a", 9}, {"b", 9}, {"c", 9}, {"d", 9}}) - .add_cube("a", 2, "b", 1, "c", 1) - .add_cube("a", 1, "b", 2, "c", 1) - .add_cube("a", 1, "b", 1, "c", 2) - .add_cube("a", 1, "b", 1, "c", 1) - .add_vector("a", 10) - .add("xy_mapped", spec({x({"a", "b"}),y({"x", "y"})}, N())) - .add("xyz_mixed", spec({x({"a", "b"}),y({"x", "y"}),z(3)}, N())); + .add_variants("a2b3c4d5", GenSpec().idx("a", 2).idx("b", 3).idx("c", 4).idx("d", 5)) + .add_variants("a9b9c9d9", GenSpec().idx("a", 9).idx("b", 9).idx("c", 9).idx("d", 9)) + .add_variants("a2b1c1", GenSpec().idx("a", 2).idx("b", 1).idx("c", 1)) + .add_variants("a1b2c1", GenSpec().idx("a", 1).idx("b", 2).idx("c", 1)) + .add_variants("a1b1c2", GenSpec().idx("a", 1).idx("b", 1).idx("c", 2)) + .add_variants("a1b1c1", GenSpec().idx("a", 1).idx("b", 1).idx("c", 1)) + .add_variants("a10", GenSpec().idx("a", 10)) + .add("xy_mapped", GenSpec().map("x", {"a", "b"}).map("y", {"x", "y"}).gen()) + .add("xyz_mixed", GenSpec().map("x", {"a", "b"}).map("y", {"x", "y"}).idx("z", 3).gen()); } EvalFixture::ParamRepo param_repo = make_params(); @@ -124,7 +124,7 @@ TEST("require that non-simple aggregators cannot be decomposed into multiple red } vespalib::string make_expr(const vespalib::string &arg, const vespalib::string &dim, bool float_cells, Aggr aggr) { - return make_string("reduce(%s%s,%s,%s)", arg.c_str(), float_cells ? "f" : "", AggrNames::name_of(aggr)->c_str(), dim.c_str()); + return make_string("reduce(%s%s,%s,%s)", arg.c_str(), float_cells ? "_f" : "", AggrNames::name_of(aggr)->c_str(), dim.c_str()); } void verify_optimized_multi(const vespalib::string &arg, const vespalib::string &dim, size_t outer_size, size_t reduce_size, size_t inner_size) { -- cgit v1.2.3