mirror of https://github.com/apache/lucene.git
allow -1 from Fields.size()
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1508418 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
1a84b76403
commit
3bff59a588
|
@ -1151,7 +1151,9 @@ public abstract class BasePostingsFormatTestCase extends LuceneTestCase {
|
|||
DirectoryReader ir = iw.getReader();
|
||||
AtomicReader ar = getOnlySegmentReader(ir);
|
||||
Fields fields = ar.fields();
|
||||
assertTrue(fields.size() == 1);
|
||||
int fieldCount = fields.size();
|
||||
// -1 is allowed, if the codec doesn't implement fields.size():
|
||||
assertTrue(fieldCount == 1 || fieldCount == -1);
|
||||
Terms terms = ar.terms("");
|
||||
assertNotNull(terms);
|
||||
TermsEnum termsEnum = terms.iterator(null);
|
||||
|
@ -1174,7 +1176,9 @@ public abstract class BasePostingsFormatTestCase extends LuceneTestCase {
|
|||
DirectoryReader ir = iw.getReader();
|
||||
AtomicReader ar = getOnlySegmentReader(ir);
|
||||
Fields fields = ar.fields();
|
||||
assertTrue(fields.size() == 1);
|
||||
int fieldCount = fields.size();
|
||||
// -1 is allowed, if the codec doesn't implement fields.size():
|
||||
assertTrue(fieldCount == 1 || fieldCount == -1);
|
||||
Terms terms = ar.terms("");
|
||||
assertNotNull(terms);
|
||||
TermsEnum termsEnum = terms.iterator(null);
|
||||
|
|
Loading…
Reference in New Issue