Fix usage of zim::Searcher::getResults() in libkiwix

The correct usage does not require the user to calculate an `end` using
the `pageLength`. We can directly use getResults(start, pageLength)
This commit is contained in:
Maneesh P M
2021-08-04 17:24:30 +05:30
parent e74e7f5623
commit 9addd82d2d
4 changed files with 20 additions and 22 deletions

View File

@ -32,7 +32,7 @@ TEST(Searcher, incrementalRange) {
int suggCount = 0;
for (int i = 0; i < 10; i++) {
auto srs = search.getResults(i*5, (i + 1)*5); // get 5 results
auto srs = search.getResults(i*5, 5); // get 5 results
ASSERT_EQ(srs.size(), 5);
suggCount += srs.size();
}