lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From uschind...@apache.org
Subject svn commit: r829244 - in /lucene/java/trunk: contrib/analyzers/common/src/test/org/apache/lucene/analysis/shingle/ src/test/org/apache/lucene/analysis/ src/test/org/apache/lucene/index/ src/test/org/apache/lucene/queryParser/ src/test/org/apache/lucene...
Date Fri, 23 Oct 2009 21:21:17 GMT
Author: uschindler
Date: Fri Oct 23 21:21:17 2009
New Revision: 829244

URL: http://svn.apache.org/viewvc?rev=829244&view=rev
Log:
Remove the remaining deprecated ctors from TokenStream API test base class (BaseTokenStreamTestCase).
They were used to test old and new TokenStream API.

Modified:
    lucene/java/trunk/contrib/analyzers/common/src/test/org/apache/lucene/analysis/shingle/TestShingleMatrixFilter.java
    lucene/java/trunk/src/test/org/apache/lucene/analysis/BaseTokenStreamTestCase.java
    lucene/java/trunk/src/test/org/apache/lucene/index/TestDocumentWriter.java
    lucene/java/trunk/src/test/org/apache/lucene/index/TestIndexWriter.java
    lucene/java/trunk/src/test/org/apache/lucene/queryParser/TestMultiFieldQueryParser.java
    lucene/java/trunk/src/test/org/apache/lucene/search/TestPositionIncrement.java

Modified: lucene/java/trunk/contrib/analyzers/common/src/test/org/apache/lucene/analysis/shingle/TestShingleMatrixFilter.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/analyzers/common/src/test/org/apache/lucene/analysis/shingle/TestShingleMatrixFilter.java?rev=829244&r1=829243&r2=829244&view=diff
==============================================================================
--- lucene/java/trunk/contrib/analyzers/common/src/test/org/apache/lucene/analysis/shingle/TestShingleMatrixFilter.java
(original)
+++ lucene/java/trunk/contrib/analyzers/common/src/test/org/apache/lucene/analysis/shingle/TestShingleMatrixFilter.java
Fri Oct 23 21:21:17 2009
@@ -38,8 +38,7 @@
 public class TestShingleMatrixFilter extends BaseTokenStreamTestCase {
 
   public TestShingleMatrixFilter(String name) {
-    // use this ctor, because SingleTokenTokenStream only uses next(Token), so exclude it
-    super(name, new HashSet<String>(Arrays.asList("testBehavingAsShingleFilter", "testMatrix",
"testIterator")));
+    super(name);
   }
 
   public void testIterator() throws IOException {

Modified: lucene/java/trunk/src/test/org/apache/lucene/analysis/BaseTokenStreamTestCase.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/analysis/BaseTokenStreamTestCase.java?rev=829244&r1=829243&r2=829244&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/analysis/BaseTokenStreamTestCase.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/analysis/BaseTokenStreamTestCase.java Fri
Oct 23 21:21:17 2009
@@ -26,9 +26,6 @@
 
 /** 
  * Base class for all Lucene unit tests that use TokenStreams.  
- * <p>
- * This class runs all tests twice, one time with {@link TokenStream#setOnlyUseNewAPI} <code>false</code>
- * and after that one time with <code>true</code>.
  */
 public abstract class BaseTokenStreamTestCase extends LuceneTestCase {
 
@@ -39,16 +36,6 @@
   public BaseTokenStreamTestCase(String name) {
     super(name);
   }
-
-  /** @deprecated */
-  public BaseTokenStreamTestCase(Set testWithNewAPI) {
-    super();
-  }
-
-  /** @deprecated */
-  public BaseTokenStreamTestCase(String name, Set testWithNewAPI) {
-    super(name);
-  }
   
   // some helpers to test Analyzers and TokenStreams:
   

Modified: lucene/java/trunk/src/test/org/apache/lucene/index/TestDocumentWriter.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/index/TestDocumentWriter.java?rev=829244&r1=829243&r2=829244&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/index/TestDocumentWriter.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/index/TestDocumentWriter.java Fri Oct 23
21:21:17 2009
@@ -38,10 +38,10 @@
 import org.apache.lucene.document.Field.TermVector;
 import org.apache.lucene.store.RAMDirectory;
 import org.apache.lucene.util.AttributeSource;
-import org.apache.lucene.analysis.BaseTokenStreamTestCase;
+import org.apache.lucene.util.LuceneTestCase;
 import org.apache.lucene.util._TestUtil;
 
-public class TestDocumentWriter extends BaseTokenStreamTestCase {
+public class TestDocumentWriter extends LuceneTestCase {
   private RAMDirectory dir;
 
   public TestDocumentWriter(String s) {

Modified: lucene/java/trunk/src/test/org/apache/lucene/index/TestIndexWriter.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/index/TestIndexWriter.java?rev=829244&r1=829243&r2=829244&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/index/TestIndexWriter.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/index/TestIndexWriter.java Fri Oct 23 21:21:17
2009
@@ -32,7 +32,7 @@
 import java.util.HashSet;
 import java.util.Random;
 
-import org.apache.lucene.analysis.BaseTokenStreamTestCase;
+import org.apache.lucene.util.LuceneTestCase;
 import org.apache.lucene.analysis.Analyzer;
 import org.apache.lucene.analysis.CachingTokenFilter;
 import org.apache.lucene.analysis.SimpleAnalyzer;
@@ -68,14 +68,9 @@
 import org.apache.lucene.util._TestUtil;
 import org.apache.lucene.util.Version;
 
-public class TestIndexWriter extends BaseTokenStreamTestCase {
+public class TestIndexWriter extends LuceneTestCase {
     public TestIndexWriter(String name) {
-      super(name, new HashSet(Arrays.asList(new String[]{
-        "testExceptionFromTokenStream", "testDocumentsWriterExceptions", "testNegativePositions",
-        "testEndOffsetPositionWithCachingTokenFilter", "testEndOffsetPositionWithTeeSinkTokenFilter",
-        "testEndOffsetPositionStandard", "testEndOffsetPositionStandardEmptyField",
-        "testEndOffsetPositionStandardEmptyField2"
-      })));
+      super(name);
     }
 
     public void testDocCount() throws IOException

Modified: lucene/java/trunk/src/test/org/apache/lucene/queryParser/TestMultiFieldQueryParser.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/queryParser/TestMultiFieldQueryParser.java?rev=829244&r1=829243&r2=829244&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/queryParser/TestMultiFieldQueryParser.java
(original)
+++ lucene/java/trunk/src/test/org/apache/lucene/queryParser/TestMultiFieldQueryParser.java
Fri Oct 23 21:21:17 2009
@@ -35,13 +35,13 @@
 import org.apache.lucene.search.BooleanClause.Occur;
 import org.apache.lucene.store.Directory;
 import org.apache.lucene.store.RAMDirectory;
-import org.apache.lucene.analysis.BaseTokenStreamTestCase;
+import org.apache.lucene.util.LuceneTestCase;
 import org.apache.lucene.util.Version;
 
 /**
  * Tests QueryParser.
  */
-public class TestMultiFieldQueryParser extends BaseTokenStreamTestCase {
+public class TestMultiFieldQueryParser extends LuceneTestCase {
 
   /** test stop words arsing for both the non static form, and for the 
    * corresponding static form (qtxt, fields[]). */

Modified: lucene/java/trunk/src/test/org/apache/lucene/search/TestPositionIncrement.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/search/TestPositionIncrement.java?rev=829244&r1=829243&r2=829244&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/search/TestPositionIncrement.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/search/TestPositionIncrement.java Fri Oct
23 21:21:17 2009
@@ -42,7 +42,6 @@
 import org.apache.lucene.queryParser.QueryParser;
 import org.apache.lucene.store.MockRAMDirectory;
 import org.apache.lucene.store.Directory;
-import org.apache.lucene.analysis.BaseTokenStreamTestCase;
 import org.apache.lucene.analysis.LowerCaseTokenizer;
 import org.apache.lucene.analysis.TokenFilter;
 import org.apache.lucene.index.Payload;
@@ -52,6 +51,7 @@
 import org.apache.lucene.search.spans.SpanTermQuery;
 import org.apache.lucene.search.spans.Spans;
 import org.apache.lucene.util.Version;
+import org.apache.lucene.util.LuceneTestCase;
 
 /**
  * Term position unit test.
@@ -59,7 +59,7 @@
  *
  * @version $Revision$
  */
-public class TestPositionIncrement extends BaseTokenStreamTestCase {
+public class TestPositionIncrement extends LuceneTestCase {
 
   public void testSetPosition() throws Exception {
     Analyzer analyzer = new Analyzer() {



Mime
View raw message