add back testing the empty string as term here (fangs)

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@982880 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Muir 2010-08-06 06:10:48 +00:00
parent 9f645f1c77
commit 11fa1cb7c4
2 changed files with 2 additions and 6 deletions

View File

@ -49,11 +49,10 @@ public class TestPrefixRandom extends LuceneTestCase {
super.setUp();
random = newRandom();
dir = new MockRAMDirectory();
// TODO: fix mocktokenizer to not extend chartokenizer, so you can have an 'empty' keyword.
RandomIndexWriter writer = new RandomIndexWriter(random, dir, new MockAnalyzer(MockTokenizer.KEYWORD, false));
Document doc = new Document();
Field field = new Field("field", "", Field.Store.NO, Field.Index.ANALYZED);
Field field = new Field("field", "", Field.Store.NO, Field.Index.NOT_ANALYZED);
doc.add(field);
int num = 2000 * RANDOM_MULTIPLIER;

View File

@ -57,13 +57,10 @@ public class TestRegexpRandom2 extends LuceneTestCase {
super.setUp();
random = newRandom();
dir = new MockRAMDirectory();
// TODO: fix mocktokenizer to not extend chartokenizer, so you can have an 'empty' keyword.
// currently, this means 'empty tokens' arent created/tested in the enumeration:
// <mikemccand> it's like having a big hairy scary monster in the basement but being upset that it doesn't have fangs
RandomIndexWriter writer = new RandomIndexWriter(random, dir, new MockAnalyzer(MockTokenizer.KEYWORD, false));
Document doc = new Document();
Field field = new Field("field", "", Field.Store.NO, Field.Index.ANALYZED);
Field field = new Field("field", "", Field.Store.NO, Field.Index.NOT_ANALYZED);
doc.add(field);
List<String> terms = new ArrayList<String>();
int num = 2000 * RANDOM_MULTIPLIER;