lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From uschind...@apache.org
Subject svn commit: r824689 - /lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/search/spans/TestFieldMaskingSpanQuery.java
Date Tue, 13 Oct 2009 11:01:25 GMT
Author: uschindler
Date: Tue Oct 13 11:01:25 2009
New Revision: 824689

URL: http://svn.apache.org/viewvc?rev=824689&view=rev
Log:
add this again for generics testing

Modified:
    lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/search/spans/TestFieldMaskingSpanQuery.java

Modified: lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/search/spans/TestFieldMaskingSpanQuery.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/search/spans/TestFieldMaskingSpanQuery.java?rev=824689&r1=824688&r2=824689&view=diff
==============================================================================
--- lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/search/spans/TestFieldMaskingSpanQuery.java
(original)
+++ lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/search/spans/TestFieldMaskingSpanQuery.java
Tue Oct 13 11:01:25 2009
@@ -17,28 +17,22 @@
  * limitations under the License.
  */
 
-import org.apache.lucene.search.IndexSearcher;
-import org.apache.lucene.search.Query;
-import org.apache.lucene.search.Scorer;
-import org.apache.lucene.search.Weight;
-import org.apache.lucene.search.CheckHits;
-import org.apache.lucene.search.QueryUtils;
-
-import org.apache.lucene.store.RAMDirectory;
-
-import org.apache.lucene.index.IndexWriter;
-import org.apache.lucene.index.IndexReader;
-import org.apache.lucene.index.Term;
+import java.util.HashSet;
+import java.util.Set;
 
 import org.apache.lucene.analysis.WhitespaceAnalyzer;
-
 import org.apache.lucene.document.Document;
 import org.apache.lucene.document.Field;
-
+import org.apache.lucene.index.IndexReader;
+import org.apache.lucene.index.IndexWriter;
+import org.apache.lucene.index.Term;
+import org.apache.lucene.search.CheckHits;
+import org.apache.lucene.search.IndexSearcher;
+import org.apache.lucene.search.Query;
+import org.apache.lucene.search.QueryUtils;
+import org.apache.lucene.store.RAMDirectory;
 import org.apache.lucene.util.LuceneTestCase;
 
-import java.util.HashSet;
-
 public class TestFieldMaskingSpanQuery extends LuceneTestCase {
 
   protected static Document doc(Field[] fields) {
@@ -137,6 +131,9 @@
 
     QueryUtils.checkEqual(q, qr);
 
+    Set terms = new HashSet();
+    qr.extractTerms(terms);
+    assertEquals(1, terms.size());
   }
   
   public void testRewrite1() throws Exception {
@@ -154,6 +151,9 @@
 
     QueryUtils.checkUnequal(q, qr);
 
+    Set terms = new HashSet();
+    qr.extractTerms(terms);
+    assertEquals(2, terms.size());
   }
   
   public void testRewrite2() throws Exception {



Mime
View raw message