From 865982dbe315ba8f7ab685bae54cb06ad2fd3972 Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Thu, 21 Mar 2013 05:25:58 +0000 Subject: [PATCH] make sure the simple tests run against both cases git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1459155 13f79535-47bb-0310-9956-ffa450edef68 --- .../lucene/search/TestBooleanMinShouldMatch.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lucene/core/src/test/org/apache/lucene/search/TestBooleanMinShouldMatch.java b/lucene/core/src/test/org/apache/lucene/search/TestBooleanMinShouldMatch.java index 7c913eb2bf4..719a192cf97 100644 --- a/lucene/core/src/test/org/apache/lucene/search/TestBooleanMinShouldMatch.java +++ b/lucene/core/src/test/org/apache/lucene/search/TestBooleanMinShouldMatch.java @@ -86,12 +86,22 @@ public class TestBooleanMinShouldMatch extends LuceneTestCase { public void verifyNrHits(Query q, int expected) throws Exception { + // bs1 ScoreDoc[] h = s.search(q, null, 1000).scoreDocs; if (expected != h.length) { printHits(getTestName(), h, s); } assertEquals("result count", expected, h.length); //System.out.println("TEST: now check"); + // bs2 + TopScoreDocCollector collector = TopScoreDocCollector.create(1000, true); + s.search(q, collector); + ScoreDoc[] h2 = collector.topDocs().scoreDocs; + if (expected != h2.length) { + printHits(getTestName(), h2, s); + } + assertEquals("result count (bs2)", expected, h2.length); + QueryUtils.check(random(), q,s); }