summaryrefslogtreecommitdiffstats
path: root/searchlib/src/tests/fef
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@oath.com>2018-08-20 19:18:32 +0200
committerHenning Baldersheim <balder@oath.com>2018-08-20 19:18:32 +0200
commit4a91055b470d0eaab63371a05c165028e03537fb (patch)
tree39622981a0686be4e1f07f78cd5c21e2a5914fdb /searchlib/src/tests/fef
parent611ef51e515ae636b115f17052867f612c3ad12f (diff)
Add test for the controling properties.
Diffstat (limited to 'searchlib/src/tests/fef')
-rw-r--r--searchlib/src/tests/fef/properties/properties_test.cpp48
1 files changed, 48 insertions, 0 deletions
diff --git a/searchlib/src/tests/fef/properties/properties_test.cpp b/searchlib/src/tests/fef/properties/properties_test.cpp
index f319980a0c8..474764bde0b 100644
--- a/searchlib/src/tests/fef/properties/properties_test.cpp
+++ b/searchlib/src/tests/fef/properties/properties_test.cpp
@@ -422,6 +422,54 @@ TEST("test stuff") {
IsFilterField::set(p, "bar");
EXPECT_TRUE(IsFilterField::check(p, "bar"));
}
+ {
+ EXPECT_EQUAL(execute::onmatch::Attribute::NAME, vespalib::string("vespa.execute.onmatch.attribute"));
+ EXPECT_EQUAL(execute::onmatch::Attribute::DEFAULT_VALUE, "");
+ Properties p;
+ EXPECT_EQUAL(execute::onmatch::Attribute::lookup(p), "");
+ p.add("vespa.execute.onmatch.attribute", "foobar");
+ EXPECT_EQUAL(execute::onmatch::Attribute::lookup(p), "foobar");
+ }
+ {
+ EXPECT_EQUAL(execute::onmatch::Operation::NAME, vespalib::string("vespa.execute.onmatch.operation"));
+ EXPECT_EQUAL(execute::onmatch::Operation::DEFAULT_VALUE, "");
+ Properties p;
+ EXPECT_EQUAL(execute::onmatch::Operation::lookup(p), "");
+ p.add("vespa.execute.onmatch.operation", "++");
+ EXPECT_EQUAL(execute::onmatch::Operation::lookup(p), "++");
+ }
+ {
+ EXPECT_EQUAL(execute::onrerank::Attribute::NAME, vespalib::string("vespa.execute.onrerank.attribute"));
+ EXPECT_EQUAL(execute::onrerank::Attribute::DEFAULT_VALUE, "");
+ Properties p;
+ EXPECT_EQUAL(execute::onrerank::Attribute::lookup(p), "");
+ p.add("vespa.execute.onrerank.attribute", "foobar");
+ EXPECT_EQUAL(execute::onrerank::Attribute::lookup(p), "foobar");
+ }
+ {
+ EXPECT_EQUAL(execute::onrerank::Operation::NAME, vespalib::string("vespa.execute.onrerank.operation"));
+ EXPECT_EQUAL(execute::onrerank::Operation::DEFAULT_VALUE, "");
+ Properties p;
+ EXPECT_EQUAL(execute::onrerank::Operation::lookup(p), "");
+ p.add("vespa.execute.onrerank.operation", "++");
+ EXPECT_EQUAL(execute::onrerank::Operation::lookup(p), "++");
+ }
+ {
+ EXPECT_EQUAL(execute::onsummary::Attribute::NAME, vespalib::string("vespa.execute.onsummary.attribute"));
+ EXPECT_EQUAL(execute::onsummary::Attribute::DEFAULT_VALUE, "");
+ Properties p;
+ EXPECT_EQUAL(execute::onsummary::Attribute::lookup(p), "");
+ p.add("vespa.execute.onsummary.attribute", "foobar");
+ EXPECT_EQUAL(execute::onsummary::Attribute::lookup(p), "foobar");
+ }
+ {
+ EXPECT_EQUAL(execute::onsummary::Operation::NAME, vespalib::string("vespa.execute.onsummary.operation"));
+ EXPECT_EQUAL(execute::onsummary::Operation::DEFAULT_VALUE, "");
+ Properties p;
+ EXPECT_EQUAL(execute::onsummary::Operation::lookup(p), "");
+ p.add("vespa.execute.onsummary.operation", "++");
+ EXPECT_EQUAL(execute::onsummary::Operation::lookup(p), "++");
+ }
}
}