lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r882670 - /incubator/lucene.net/trunk/C#/src/Test/QueryParser/TestQueryParser.cs
Date Fri, 20 Nov 2009 18:29:28 GMT
Author: digy
Date: Fri Nov 20 18:29:28 2009
New Revision: 882670

URL: http://svn.apache.org/viewvc?rev=882670&view=rev
Log:
LUCENENET-283 TestDateRange and TestLegacyDateRange fail.

Modified:
    incubator/lucene.net/trunk/C#/src/Test/QueryParser/TestQueryParser.cs

Modified: incubator/lucene.net/trunk/C#/src/Test/QueryParser/TestQueryParser.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Test/QueryParser/TestQueryParser.cs?rev=882670&r1=882669&r2=882670&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Test/QueryParser/TestQueryParser.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Test/QueryParser/TestQueryParser.cs Fri Nov 20 18:29:28
2009
@@ -656,7 +656,7 @@
 			System.String startDate = GetLocalizedDate(2002, 1, 1, false);
 			System.String endDate = GetLocalizedDate(2002, 1, 4, false);
 			System.Globalization.Calendar endDateExpected = new System.Globalization.GregorianCalendar();
-			System.DateTime tempAux = new System.DateTime(2002, 2, 4, 23, 59, 59, 999, endDateExpected);
+			System.DateTime tempAux = new System.DateTime(2002, 1, 4, 23, 59, 59, 999, endDateExpected);
 			AssertQueryEquals("[ " + EscapeDateString(startDate) + " TO " + EscapeDateString(endDate)
+ "]", null, "[" + GetLegacyDate(startDate) + " TO " + DateField.DateToString(tempAux) + "]");
 			AssertQueryEquals("{  " + EscapeDateString(startDate) + "    " + EscapeDateString(endDate)
+ "   }", null, "{" + GetLegacyDate(startDate) + " TO " + GetLegacyDate(endDate) + "}");
 		}
@@ -667,7 +667,7 @@
 			System.String startDate = GetLocalizedDate(2002, 1, 1, false);
 			System.String endDate = GetLocalizedDate(2002, 1, 4, false);
 			System.Globalization.Calendar calendar = new System.Globalization.GregorianCalendar();
-            System.DateTime endDateExpected = new System.DateTime(2002, 2, 4, 23, 59, 59,
999, calendar);
+            System.DateTime endDateExpected = new System.DateTime(2002, 1, 4, 23, 59, 59,
999, calendar);
 			System.String defaultField = "default";
 			System.String monthField = "month";
 			System.String hourField = "hour";
@@ -1104,7 +1104,7 @@
 		private void  AssertHits(int expected, System.String query, IndexSearcher is_Renamed)
 		{
 			QueryParser qp = new QueryParser("date", new WhitespaceAnalyzer());
-			qp.SetLocale(new System.Globalization.CultureInfo("en"));
+			qp.SetLocale(new System.Globalization.CultureInfo("en-US"));
 			Query q = qp.Parse(query);
 			ScoreDoc[] hits = is_Renamed.Search(q, null, 1000).scoreDocs;
 			Assert.AreEqual(expected, hits.Length);



Mime
View raw message