Apache Lucene open-source search software
SOLR-4785: add gbowyer's tests to unbreak build
Robert Muir93201959b8aa
diff --git a/solr/core/src/test/org/apache/solr/search/QueryEqualityTest.java b/solr/core/src/test/org/apache/solr/search/QueryEqualityTest.javaindex cb1b666a17b..0a3ebe266d2 100644--- a/solr/core/src/test/org/apache/solr/search/QueryEqualityTest.java+++ b/solr/core/src/test/org/apache/solr/search/QueryEqualityTest.java@@ -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 queriesassertQueryEquals(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