one Math.max too much, sorry

git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@740444 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Uwe Schindler 2009-02-03 21:07:11 +00:00
parent b2c04094ef
commit 80b471b0cc
1 changed files with 1 additions and 1 deletions

View File

@ -196,7 +196,7 @@ public class TestTrieRangeQuery extends LuceneTestCase
// test inclusive range
TrieRangeQuery tq=new TrieRangeQuery(field, new Long(lower), new Long(upper), true, true, variant);
TopDocs tTopDocs = searcher.search(tq, 1);
assertEquals("Returned count of range query must be equal to inclusive range length", tTopDocs.totalHits, Math.max(upper-lower+1, 0) );
assertEquals("Returned count of range query must be equal to inclusive range length", tTopDocs.totalHits, upper-lower+1 );
// test exclusive range
tq=new TrieRangeQuery(field, new Long(lower), new Long(upper), false, false, variant);
tTopDocs = searcher.search(tq, 1);