lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hoss...@apache.org
Subject svn commit: r770483 - /lucene/java/trunk/src/test/org/apache/lucene/search/QueryUtils.java
Date Thu, 30 Apr 2009 23:18:14 GMT
Author: hossman
Date: Thu Apr 30 23:18:13 2009
New Revision: 770483

URL: http://svn.apache.org/viewvc?rev=770483&view=rev
Log:
another bit of sanity checking for queries: rewriting should be equal to cloning and rewriting

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

Modified: lucene/java/trunk/src/test/org/apache/lucene/search/QueryUtils.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/search/QueryUtils.java?rev=770483&r1=770482&r2=770483&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/search/QueryUtils.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/search/QueryUtils.java Thu Apr 30 23:18:13
2009
@@ -91,6 +91,10 @@
         }
         checkExplanations(q1,s);
         checkSerialization(q1,s);
+        
+        Query q2 = (Query)q1.clone();
+        checkEqual(s.rewrite(q1),
+                   s.rewrite(q2));
       }
     } catch (IOException e) {
       throw new RuntimeException(e);



Mime
View raw message