diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2021-10-27 06:54:37 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2021-10-27 09:37:13 +0000 |
commit | e7d5df01a80af0734fbe31a3a765e45abeb8dc13 (patch) | |
tree | 4864b8b0dbd186aa8e9df82914648f9ad2db9d2b /searchcore/src/tests/proton | |
parent | 69e163ab82de73f5c294cfd2ca3de0e9be434a5b (diff) |
Add and clarify on-first-phase
Diffstat (limited to 'searchcore/src/tests/proton')
-rw-r--r-- | searchcore/src/tests/proton/matching/matching_test.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/searchcore/src/tests/proton/matching/matching_test.cpp b/searchcore/src/tests/proton/matching/matching_test.cpp index a4952fa3154..d690fb29795 100644 --- a/searchcore/src/tests/proton/matching/matching_test.cpp +++ b/searchcore/src/tests/proton/matching/matching_test.cpp @@ -785,8 +785,21 @@ TEST("require that match params are set up straight with ranking on") { ASSERT_EQUAL(0.7, p.rankDropLimit); ASSERT_EQUAL(0u, p.offset); ASSERT_EQUAL(1u, p.hits); + ASSERT_TRUE(p.has_rank_drop_limit()); } +TEST("require that match params can turn off rank-drop-limit") { + MatchParams p(1, 2, 4, -std::numeric_limits<feature_t>::quiet_NaN(), 0, 1, true, true); + ASSERT_EQUAL(1u, p.numDocs); + ASSERT_EQUAL(2u, p.heapSize); + ASSERT_EQUAL(4u, p.arraySize); + ASSERT_TRUE(std::isnan(p.rankDropLimit)); + ASSERT_EQUAL(0u, p.offset); + ASSERT_EQUAL(1u, p.hits); + ASSERT_FALSE(p.has_rank_drop_limit()); +} + + TEST("require that match params are set up straight with ranking on arraySize is atleast the size of heapSize") { MatchParams p(1, 6, 4, 0.7, 1, 1, true, true); ASSERT_EQUAL(1u, p.numDocs); |