add test for hashCode/equals

git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@359080 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Yonik Seeley 2005-12-26 17:22:43 +00:00
parent 3852c6263e
commit 10ae54c724
1 changed files with 4 additions and 0 deletions

View File

@ -9,6 +9,7 @@ import org.apache.lucene.document.Document;
import org.apache.lucene.document.Field;
import org.apache.lucene.search.IndexSearcher;
import org.apache.lucene.search.Hits;
import org.apache.lucene.search.QueryUtils;
import org.apache.lucene.search.spans.SpanTermQuery;
import org.apache.lucene.search.spans.SpanNearQuery;
import org.apache.lucene.search.spans.SpanQuery;
@ -29,5 +30,8 @@ public class TestSpanRegexQuery extends TestCase {
SpanNearQuery query = new SpanNearQuery(new SpanQuery[] {srq, stq}, 6, true);
Hits hits = searcher.search(query);
assertEquals(1, hits.length());
QueryUtils.check(srq);
QueryUtils.checkUnequal(srq,stq);
QueryUtils.checkUnequal(srq,query);
}
}