rewrite assertion to use 'assert'

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1181299 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Muir 2011-10-10 23:55:20 +00:00
parent f10fbf25af
commit d526a4c699
1 changed files with 5 additions and 6 deletions

View File

@ -355,12 +355,11 @@ public class TestBooleanMinShouldMatch extends LuceneTestCase {
found=true; found=true;
float otherScore = top1.scoreDocs[other].score; float otherScore = top1.scoreDocs[other].score;
// check if scores match // check if scores match
if (Math.abs(otherScore-score)>1.0e-6f) { assertEquals("Doc " + id + " scores don't match\n"
fail("Doc " + id + " scores don't match\n" + CheckHits.topdocsString(top1,0,0)
+ CheckHits.topdocsString(top1,0,0) + CheckHits.topdocsString(top2,0,0)
+ CheckHits.topdocsString(top2,0,0) + "for query:" + q2.toString(),
+ "for query:" + q2.toString()); score, otherScore, 1.0e-6f);
}
} }
} }