aboutsummaryrefslogtreecommitdiffstats
path: root/searchlib/src/tests/attribute/imported_search_context/imported_search_context_test.cpp
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@oath.com>2018-05-22 21:29:12 +0200
committerHenning Baldersheim <balder@oath.com>2018-05-23 23:21:04 +0200
commit69aae49a30dc657dfa5a603701ffe4ad231ea92f (patch)
tree9f2e743a208b1d2751b350f9d7ee5e8e274cb2de /searchlib/src/tests/attribute/imported_search_context/imported_search_context_test.cpp
parentff2138aa963c5f7147779057465d97c3d22a7028 (diff)
Refactored to allow iteration over matching elements.
Diffstat (limited to 'searchlib/src/tests/attribute/imported_search_context/imported_search_context_test.cpp')
-rw-r--r--searchlib/src/tests/attribute/imported_search_context/imported_search_context_test.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/searchlib/src/tests/attribute/imported_search_context/imported_search_context_test.cpp b/searchlib/src/tests/attribute/imported_search_context/imported_search_context_test.cpp
index e8e16ffcc98..bb9d9960d08 100644
--- a/searchlib/src/tests/attribute/imported_search_context/imported_search_context_test.cpp
+++ b/searchlib/src/tests/attribute/imported_search_context/imported_search_context_test.cpp
@@ -303,22 +303,22 @@ TEST_F("Strict iterator handles seek outside of LID space", ArrayValueFixture) {
TEST_F("cmp() performs GID mapping and forwards to target attribute", SingleValueFixture) {
auto ctx = f.create_context(word_term("5678"));
- EXPECT_FALSE(ctx->cmp(DocId(2)));
- EXPECT_TRUE(ctx->cmp(DocId(3)));
- EXPECT_FALSE(ctx->cmp(DocId(4)));
- EXPECT_TRUE(ctx->cmp(DocId(5)));
+ EXPECT_FALSE(ctx->matches(DocId(2)));
+ EXPECT_TRUE(ctx->matches(DocId(3)));
+ EXPECT_FALSE(ctx->matches(DocId(4)));
+ EXPECT_TRUE(ctx->matches(DocId(5)));
}
TEST_F("cmp(weight) performs GID mapping and forwards to target attribute", WsetValueFixture) {
auto ctx = f.create_context(word_term("foo"));
int32_t weight = 0;
- EXPECT_FALSE(ctx->cmp(DocId(1), weight));
+ EXPECT_FALSE(ctx->matches(DocId(1), weight));
EXPECT_EQUAL(0, weight); // Unchanged
- EXPECT_TRUE(ctx->cmp(DocId(2), weight));
+ EXPECT_TRUE(ctx->matches(DocId(2), weight));
EXPECT_EQUAL(-5, weight);
- EXPECT_TRUE(ctx->cmp(DocId(6), weight));
+ EXPECT_TRUE(ctx->matches(DocId(6), weight));
EXPECT_EQUAL(42, weight);
}