lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From uschind...@apache.org
Subject svn commit: r886335 - /lucene/java/branches/lucene_3_0_back_compat_tests/src/test/org/apache/lucene/search/TestWildcard.java
Date Wed, 02 Dec 2009 23:06:17 GMT
Author: uschindler
Date: Wed Dec  2 23:06:16 2009
New Revision: 886335

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

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

Modified: lucene/java/branches/lucene_3_0_back_compat_tests/src/test/org/apache/lucene/search/TestWildcard.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_3_0_back_compat_tests/src/test/org/apache/lucene/search/TestWildcard.java?rev=886335&r1=886334&r2=886335&view=diff
==============================================================================
--- lucene/java/branches/lucene_3_0_back_compat_tests/src/test/org/apache/lucene/search/TestWildcard.java
(original)
+++ lucene/java/branches/lucene_3_0_back_compat_tests/src/test/org/apache/lucene/search/TestWildcard.java
Wed Dec  2 23:06:16 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