lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From uschind...@apache.org
Subject svn commit: r886336 - /lucene/java/trunk/src/test/org/apache/lucene/search/TestWildcard.java
Date Wed, 02 Dec 2009 23:07:09 GMT
Author: uschindler
Date: Wed Dec  2 23:07:08 2009
New Revision: 886336

URL: http://svn.apache.org/viewvc?rev=886336&view=rev
Log:
Change the wildcard test in trunk, too

Modified:
    lucene/java/trunk/src/test/org/apache/lucene/search/TestWildcard.java

Modified: lucene/java/trunk/src/test/org/apache/lucene/search/TestWildcard.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/search/TestWildcard.java?rev=886336&r1=886335&r2=886336&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/search/TestWildcard.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/search/TestWildcard.java Wed Dec  2 23:07:08
2009
@@ -104,8 +104,9 @@
     MultiTermQuery wq = new WildcardQuery(new Term("field", ""));
     wq.setRewriteMethod(MultiTermQuery.SCORING_BOOLEAN_QUERY_REWRITE);
     assertMatches(searcher, wq, 0);
-    BooleanQuery expected = new BooleanQuery(true);
-    assertEquals(searcher.rewrite(expected), searcher.rewrite(wq));
+    Query q = searcher.rewrite(wq);
+    assertTrue(q instanceof BooleanQuery);
+    assertEquals(0, ((BooleanQuery) q).clauses().size());
   }
   
   /**



Mime
View raw message