mirror of https://github.com/apache/lucene.git
SOLR-4785: add gbowyer's tests to unbreak build
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1481977 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
1e4ece5fbd
commit
93201959b8
|
@ -32,8 +32,8 @@ import org.junit.BeforeClass;
|
|||
|
||||
/**
|
||||
* Sanity checks that queries (generated by the QParser and ValueSourceParser
|
||||
* framework) are appropraitely {@link Object#equals} and
|
||||
* {@link Object#hashCode()} equivilent. If you are adding a new default
|
||||
* framework) are appropriately {@link Object#equals} and
|
||||
* {@link Object#hashCode()} equivalent. If you are adding a new default
|
||||
* QParser or ValueSourceParser, you will most likely get a failure from
|
||||
* {@link #testParserCoverage} until you add a new test method to this class.
|
||||
*
|
||||
|
@ -76,7 +76,7 @@ public class QueryEqualityTest extends SolrTestCaseJ4 {
|
|||
|
||||
|
||||
public void testDateMathParsingEquality() throws Exception {
|
||||
// regardless of parser, these should all be equivilent queries
|
||||
// regardless of parser, these should all be equivalent queries
|
||||
assertQueryEquals
|
||||
(null
|
||||
,"{!lucene}f_tdt:2013-09-11T00\\:00\\:00Z"
|
||||
|
@ -704,6 +704,18 @@ public class QueryEqualityTest extends SolrTestCaseJ4 {
|
|||
assertFuncEquals("sleep(1,5)", "sleep(1,5)");
|
||||
assertFuncEquals("threadid()", "threadid()");
|
||||
}
|
||||
|
||||
// TODO: more tests
|
||||
public void testQueryMaxScore() throws Exception {
|
||||
assertQueryEquals("maxscore", "{!maxscore}A OR B OR C",
|
||||
"A OR B OR C");
|
||||
assertQueryEquals("maxscore", "{!maxscore}A AND B",
|
||||
"A AND B");
|
||||
assertQueryEquals("maxscore", "{!maxscore}apache -solr",
|
||||
"apache -solr", "apache -solr ");
|
||||
assertQueryEquals("maxscore", "+apache +solr", "apache AND solr",
|
||||
"+apache +solr");
|
||||
}
|
||||
|
||||
/**
|
||||
* this test does not assert anything itself, it simply toggles a static
|
||||
|
|
Loading…
Reference in New Issue