diff options
author | Henning Baldersheim <balder@oath.com> | 2018-11-28 07:52:10 +0100 |
---|---|---|
committer | Henning Baldersheim <balder@oath.com> | 2018-11-28 09:30:07 +0100 |
commit | b88e32a2e58febd84a6524552d88e49c9e06e4b0 (patch) | |
tree | 565ec7644b430603220e2d0d4dfe730148b61e8b /searchlib/src/tests/queryeval | |
parent | 6ea5ec1c12a3e5591892ed25a8d71b089f91b0ec (diff) |
Use explicit EntryRef constructor to avoid unintended conversion
Conflicts:
searchlib/src/vespa/searchlib/attribute/multienumattribute.hpp
Diffstat (limited to 'searchlib/src/tests/queryeval')
-rw-r--r-- | searchlib/src/tests/queryeval/predicate/predicate_blueprint_test.cpp | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/searchlib/src/tests/queryeval/predicate/predicate_blueprint_test.cpp b/searchlib/src/tests/queryeval/predicate/predicate_blueprint_test.cpp index d790a6dd17d..c76873a50cd 100644 --- a/searchlib/src/tests/queryeval/predicate/predicate_blueprint_test.cpp +++ b/searchlib/src/tests/queryeval/predicate/predicate_blueprint_test.cpp @@ -1,12 +1,10 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. // Unit tests for predicate_blueprint. -#include <vespa/log/log.h> -LOG_SETUP("predicate_blueprint_test"); - #include <vespa/searchlib/attribute/attributeguard.h> #include <vespa/searchlib/attribute/predicate_attribute.h> #include <vespa/searchlib/predicate/predicate_tree_annotator.h> +#include <vespa/searchlib/predicate/predicate_index.h> #include <vespa/searchlib/fef/termfieldmatchdataarray.h> #include <vespa/searchlib/query/tree/predicate_query_term.h> #include <vespa/searchlib/query/tree/simplequery.h> @@ -16,6 +14,9 @@ LOG_SETUP("predicate_blueprint_test"); #include <vespa/searchlib/predicate/predicate_hash.h> #include <vespa/vespalib/testkit/testapp.h> +#include <vespa/log/log.h> +LOG_SETUP("predicate_blueprint_test"); + using namespace search; using namespace search::predicate; using search::fef::TermFieldMatchDataArray; @@ -123,8 +124,7 @@ TEST_F("require that blueprint with 'bounds' posting list entry estimates " TEST_F("require that blueprint with zstar-compressed estimates non-empty.", Fixture) { PredicateTreeAnnotations annotations(1); - annotations.interval_map[PredicateIndex::z_star_compressed_hash] = - std::vector<Interval>{{0xfffe0000}}; + annotations.interval_map[Constants::z_star_compressed_hash] =std::vector<Interval>{{0xfffe0000}}; f.indexDocument(doc_id, annotations); PredicateBlueprint blueprint(f.field, f.guard(), f.query); EXPECT_FALSE(blueprint.getState().estimate().empty); @@ -133,8 +133,7 @@ TEST_F("require that blueprint with zstar-compressed estimates non-empty.", TEST_F("require that blueprint can create search", Fixture) { PredicateTreeAnnotations annotations(1); - annotations.interval_map[PredicateHash::hash64("key=value")] = - std::vector<Interval>{{interval}}; + annotations.interval_map[PredicateHash::hash64("key=value")] =std::vector<Interval>{{interval}}; f.indexDocument(doc_id, annotations); PredicateBlueprint blueprint(f.field, f.guard(), f.query); @@ -181,8 +180,7 @@ TEST_F("require that blueprint can create more advanced search", Fixture) { TEST_F("require that blueprint can create NOT search", Fixture) { PredicateTreeAnnotations annotations(1); - annotations.interval_map[PredicateIndex::z_star_hash] = - std::vector<Interval>{{0x00010000}, {0xffff0001}}; + annotations.interval_map[Constants::z_star_hash] =std::vector<Interval>{{0x00010000}, {0xffff0001}}; f.indexDocument(doc_id, annotations); PredicateBlueprint blueprint(f.field, f.guard(), f.query); @@ -198,8 +196,7 @@ TEST_F("require that blueprint can create NOT search", Fixture) { TEST_F("require that blueprint can create compressed NOT search", Fixture) { PredicateTreeAnnotations annotations(1); - annotations.interval_map[PredicateIndex::z_star_compressed_hash] = - std::vector<Interval>{{0xfffe0000}}; + annotations.interval_map[Constants::z_star_compressed_hash] =std::vector<Interval>{{0xfffe0000}}; f.indexDocument(doc_id, annotations); PredicateBlueprint blueprint(f.field, f.guard(), f.query); |