aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore/src/tests/proton/verify_ranksetup
diff options
context:
space:
mode:
authorHåvard Pettersen <havardpe@oath.com>2021-11-05 10:51:51 +0000
committerHåvard Pettersen <havardpe@oath.com>2021-11-05 10:51:51 +0000
commit26a634083c685cbfe4c67ffe0f7cc80cfd85f32e (patch)
treea46f7ce3999c71ff51e134633ff3a10f9adc31d5 /searchcore/src/tests/proton/verify_ranksetup
parent6b48d8014e6284f67a5291f18fdbd233771dcd53 (diff)
verify that match features must be valid
Diffstat (limited to 'searchcore/src/tests/proton/verify_ranksetup')
-rw-r--r--searchcore/src/tests/proton/verify_ranksetup/verify_ranksetup_test.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/searchcore/src/tests/proton/verify_ranksetup/verify_ranksetup_test.cpp b/searchcore/src/tests/proton/verify_ranksetup/verify_ranksetup_test.cpp
index c332d84c4ed..c6c65f45e4b 100644
--- a/searchcore/src/tests/proton/verify_ranksetup/verify_ranksetup_test.cpp
+++ b/searchcore/src/tests/proton/verify_ranksetup/verify_ranksetup_test.cpp
@@ -108,6 +108,9 @@ struct Setup {
void second_phase(const std::string &feature) {
property(rank::SecondPhase::NAME, feature);
}
+ void match_feature(const std::string &feature) {
+ property(match::Feature::NAME, feature);
+ }
void summary_feature(const std::string &feature) {
property(summary::Feature::NAME, feature);
}
@@ -317,6 +320,11 @@ TEST_F("require that second phase can break validation", SimpleSetup()) {
EXPECT_TRUE(!f.verify());
}
+TEST_F("require that match features can break validation", SimpleSetup()) {
+ f.match_feature(invalid_feature);
+ EXPECT_TRUE(!f.verify());
+}
+
TEST_F("require that summary features can break validation", SimpleSetup()) {
f.summary_feature(invalid_feature);
EXPECT_TRUE(!f.verify());