summaryrefslogtreecommitdiffstats
path: root/searchcore/src/tests/proton/matching/querynodes_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'searchcore/src/tests/proton/matching/querynodes_test.cpp')
-rw-r--r--searchcore/src/tests/proton/matching/querynodes_test.cpp21
1 files changed, 11 insertions, 10 deletions
diff --git a/searchcore/src/tests/proton/matching/querynodes_test.cpp b/searchcore/src/tests/proton/matching/querynodes_test.cpp
index f8a419ba15b..7b6fdd1ae88 100644
--- a/searchcore/src/tests/proton/matching/querynodes_test.cpp
+++ b/searchcore/src/tests/proton/matching/querynodes_test.cpp
@@ -1,11 +1,7 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
// Unit tests for querynodes.
-#include <vespa/log/log.h>
-LOG_SETUP("querynodes_test");
-
#include <vespa/searchcore/proton/matching/querynodes.h>
-
#include <vespa/searchcore/proton/matching/fakesearchcontext.h>
#include <vespa/searchcore/proton/matching/blueprintbuilder.h>
#include <vespa/searchcore/proton/matching/matchdatareservevisitor.h>
@@ -33,11 +29,12 @@ LOG_SETUP("querynodes_test");
#include <vespa/searchlib/queryeval/fake_search.h>
#include <vespa/searchlib/queryeval/fake_requestcontext.h>
#include <vespa/vespalib/testkit/testapp.h>
-#include <cstdarg>
-#include <string>
-#include <vector>
+
#include <vespa/searchlib/attribute/singlenumericattribute.hpp>
+#include <vespa/log/log.h>
+LOG_SETUP("querynodes_test");
+
using search::fef::FieldInfo;
using search::fef::FieldType;
using search::fef::MatchData;
@@ -210,9 +207,8 @@ public:
};
typedef QueryBuilder<ProtonNodeTypes> QB;
-struct Phrase {
- void addToBuilder(QB& b) { b.addPhrase(2, view, id, weight); }
-};
+struct Phrase { void addToBuilder(QB& b) { b.addPhrase(2, view, id, weight); }};
+struct SameElement { void addToBuilder(QB& b) { b.addSameElement(2, view); }};
struct Near { void addToBuilder(QB& b) { b.addNear(2, distance); } };
struct ONear { void addToBuilder(QB& b) { b.addONear(2, distance); } };
struct Or { void addToBuilder(QB& b) { b.addOr(2); } };
@@ -466,6 +462,11 @@ TEST("requireThatPhrasesGetProperBlending") {
TEST_DO(checkProperBlending<Phrase>());
}
+TEST("requireThatSameElementGetProperBlending") {
+ //TODO SameEelement needs proper testing/implementation
+ //TEST_DO(checkProperBlending<SameElement>());
+}
+
TEST("requireThatNearGetProperBlending") {
TEST_DO(checkProperBlendingWithParent<Near>());
}