mirror of
https://github.com/kiwix/libkiwix.git
synced 2025-06-26 10:11:30 +00:00
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:
@ -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();
|
||||
}
|
||||
|
Reference in New Issue
Block a user