another bit of sanity checking for queries: rewriting should be equal to cloning and rewriting

git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@770483 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Chris M. Hostetter 2009-04-30 23:18:13 +00:00
parent b58e470eb7
commit 9620458453
1 changed files with 4 additions and 0 deletions

View File

@ -91,6 +91,10 @@ public class QueryUtils {
}
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);