Apache Lucene open-source search software
use TEST_VERSION_CURRENT instead of 4_0 in test
Simon Willnauer3b8458f6dea8
diff --git a/modules/analysis/common/src/test/org/apache/lucene/analysis/hunspell/HunspellDictionaryTest.java b/modules/analysis/common/src/test/org/apache/lucene/analysis/hunspell/HunspellDictionaryTest.javaindex 215e2b98d2c..dbd9ff5b95f 100644--- a/modules/analysis/common/src/test/org/apache/lucene/analysis/hunspell/HunspellDictionaryTest.java+++ b/modules/analysis/common/src/test/org/apache/lucene/analysis/hunspell/HunspellDictionaryTest.java@@ -1,6 +1,6 @@package org.apache.lucene.analysis.hunspell;-/*+/*** Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements. See the NOTICE file distributed with* this work for additional information regarding copyright ownership.@@ -17,6 +17,7 @@ package org.apache.lucene.analysis.hunspell;* limitations under the License.*/+import org.apache.lucene.util.LuceneTestCase;import org.apache.lucene.util.Version;import org.junit.Test;@@ -26,14 +27,14 @@ import java.text.ParseException;import static junit.framework.Assert.assertEquals;-public class HunspellDictionaryTest {+public class HunspellDictionaryTest extends LuceneTestCase {@Testpublic void testHunspellDictionary_loadDicAff() throws IOException, ParseException {InputStream affixStream = getClass().getResourceAsStream("test.aff");InputStream dictStream = getClass().getResourceAsStream("test.dic");- HunspellDictionary dictionary = new HunspellDictionary(affixStream, dictStream, Version.LUCENE_40);+ HunspellDictionary dictionary = new HunspellDictionary(affixStream, dictStream, TEST_VERSION_CURRENT);assertEquals(3, dictionary.lookupSuffix(new char[]{'e'}, 0, 1).size());assertEquals(1, dictionary.lookupPrefix(new char[]{'s'}, 0, 1).size());assertEquals(1, dictionary.lookupWord(new char[]{'o', 'l', 'r'}, 0, 3).size());diff --git a/modules/analysis/common/src/test/org/apache/lucene/analysis/hunspell/HunspellStemFilterTest.java b/modules/analysis/common/src/test/org/apache/lucene/analysis/hunspell/HunspellStemFilterTest.javaindex 4dedb67f96c..0d74516a300 100644--- a/modules/analysis/common/src/test/org/apache/lucene/analysis/hunspell/HunspellStemFilterTest.java+++ b/modules/analysis/common/src/test/org/apache/lucene/analysis/hunspell/HunspellStemFilterTest.java@@ -26,7 +26,6 @@ import org.apache.lucene.analysis.BaseTokenStreamTestCase;import org.apache.lucene.analysis.MockTokenizer;import org.apache.lucene.analysis.miscellaneous.KeywordMarkerFilter;import org.apache.lucene.analysis.util.CharArraySet;-import org.apache.lucene.util.Version;import org.junit.BeforeClass;public class HunspellStemFilterTest extends BaseTokenStreamTestCase {@@ -40,7 +39,7 @@ public class HunspellStemFilterTest extends BaseTokenStreamTestCase {InputStream affixStream = HunspellStemmerTest.class.getResourceAsStream("test.aff");InputStream dictStream = HunspellStemmerTest.class.getResourceAsStream("test.dic");- return new HunspellDictionary(affixStream, dictStream, Version.LUCENE_40, ignoreCase);+ return new HunspellDictionary(affixStream, dictStream, TEST_VERSION_CURRENT, ignoreCase);}/**diff --git a/modules/analysis/common/src/test/org/apache/lucene/analysis/hunspell/HunspellStemmerTest.java b/modules/analysis/common/src/test/org/apache/lucene/analysis/hunspell/HunspellStemmerTest.javaindex c8a62ee7ab2..ae42835dc44 100644--- a/modules/analysis/common/src/test/org/apache/lucene/analysis/hunspell/HunspellStemmerTest.java+++ b/modules/analysis/common/src/test/org/apache/lucene/analysis/hunspell/HunspellStemmerTest.java@@ -1,6 +1,6 @@package org.apache.lucene.analysis.hunspell;-/*+/*** Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements. See the NOTICE file distributed with* this work for additional information regarding copyright ownership.@@ -17,6 +17,7 @@ package org.apache.lucene.analysis.hunspell;* limitations under the License.*/+import org.apache.lucene.util.LuceneTestCase;import org.apache.lucene.util.Version;import org.junit.BeforeClass;import org.junit.Test;@@ -28,7 +29,7 @@ import java.util.List;import static junit.framework.Assert.assertEquals;-public class HunspellStemmerTest {+public class HunspellStemmerTest extends LuceneTestCase {private static HunspellStemmer stemmer;@@ -116,7 +117,7 @@ public class HunspellStemmerTest {InputStream affixStream = HunspellStemmerTest.class.getResourceAsStream("test.aff");InputStream dictStream = HunspellStemmerTest.class.getResourceAsStream("test.dic");- HunspellDictionary dictionary = new HunspellDictionary(affixStream, dictStream, Version.LUCENE_40, ignoreCase);+ HunspellDictionary dictionary = new HunspellDictionary(affixStream, dictStream, TEST_VERSION_CURRENT, ignoreCase);stemmer = new HunspellStemmer(dictionary);affixStream.close();