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:
Robert Muir 2013-05-13 17:23:03 +00:00
parent 1e4ece5fbd
commit 93201959b8
1 changed files with 15 additions and 3 deletions

View File

@ -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