Return-Path: Delivered-To: apmail-incubator-lucene-net-commits-archive@locus.apache.org Received: (qmail 30536 invoked from network); 24 Aug 2007 02:01:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 24 Aug 2007 02:01:02 -0000 Received: (qmail 41138 invoked by uid 500); 24 Aug 2007 02:00:58 -0000 Delivered-To: apmail-incubator-lucene-net-commits-archive@incubator.apache.org Received: (qmail 41102 invoked by uid 500); 24 Aug 2007 02:00:58 -0000 Mailing-List: contact lucene-net-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: lucene-net-dev@incubator.apache.org Delivered-To: mailing list lucene-net-commits@incubator.apache.org Received: (qmail 41093 invoked by uid 99); 24 Aug 2007 02:00:58 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Aug 2007 19:00:58 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Aug 2007 02:00:49 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id BD77F1A9832; Thu, 23 Aug 2007 19:00:29 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r569217 - /incubator/lucene.net/trunk/C#/src/Test/Search/TestSort.cs Date: Fri, 24 Aug 2007 02:00:29 -0000 To: lucene-net-commits@incubator.apache.org From: aroush@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20070824020029.BD77F1A9832@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: aroush Date: Thu Aug 23 19:00:28 2007 New Revision: 569217 URL: http://svn.apache.org/viewvc?rev=569217&view=rev Log: Fix: LUCENENET-86 "Nunit test for TestSort." Modified: incubator/lucene.net/trunk/C#/src/Test/Search/TestSort.cs Modified: incubator/lucene.net/trunk/C#/src/Test/Search/TestSort.cs URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Test/Search/TestSort.cs?rev=569217&r1=569216&r2=569217&view=diff ============================================================================== --- incubator/lucene.net/trunk/C#/src/Test/Search/TestSort.cs (original) +++ incubator/lucene.net/trunk/C#/src/Test/Search/TestSort.cs Thu Aug 23 19:00:28 2007 @@ -122,6 +122,7 @@ return null; // return new NUnit.Core.TestSuite(typeof(TestSort)); {{Aroush-1.9}} how do you do this in NUnit? } + static string NDS = System.Globalization.CultureInfo.CurrentCulture.NumberFormat.NumberDecimalSeparator; // document data: // the tracer field is used to determine which document was hit @@ -131,22 +132,22 @@ // the string field to sort by string // the i18n field includes accented characters for testing locale-specific sorting private System.String[][] data = new System.String[][]{ - // tracer contents int float string custom i18n - new System.String[]{ "A", "x a", "5", "4f", "c", "A-3", "p\u00EAche"}, - new System.String[]{ "B", "y a", "5", "3.4028235E38", "i", "B-10", "HAT"}, - new System.String[]{ "C", "x a b c", "2147483647", "1.0", "j", "A-2", "p\u00E9ch\u00E9"}, - new System.String[]{ "D", "y a b c", "-1", "0.0f", "a", "C-0", "HUT"}, - new System.String[]{ "E", "x a b c d", "5", "2f", "h", "B-8", "peach"}, - new System.String[]{ "F", "y a b c d", "2", "3.14159f", "g", "B-1", "H\u00C5T"}, - new System.String[]{ "G", "x a b c d", "3", "-1.0", "f", "C-100", "sin"}, - new System.String[]{ "H", "y a b c d", "0", "1.4E-45", "e", "C-88", "H\u00D8T"}, - new System.String[]{ "I", "x a b c d e f", "-2147483648", "1.0e+0", "d", "A-10", "s\u00EDn"}, - new System.String[]{ "J", "y a b c d e f", "4", ".5", "b", "C-7", "HOT"}, - new System.String[]{ "W", "g", "1", null, null, null, null}, - new System.String[]{ "X", "g", "1", "0.1", null, null, null}, - new System.String[]{ "Y", "g", "1", "0.2", null, null, null}, - new System.String[]{ "Z", "f g", null, null, null, null, null}}; - + // tracer contents int float string custom i18n + new System.String[]{ "A", "x a", "5", "4f", "c", "A-3", "p\u00EAche"}, + new System.String[]{ "B", "y a", "5", "3" + NDS + "4028235E38", "i", "B-10", "HAT"}, + new System.String[]{ "C", "x a b c", "2147483647", "1" + NDS + "0", "j", "A-2", "p\u00E9ch\u00E9"}, + new System.String[]{ "D", "y a b c", "-1", "0" + NDS + "0f", "a", "C-0", "HUT"}, + new System.String[]{ "E", "x a b c d", "5", "2f", "h", "B-8", "peach"}, + new System.String[]{ "F", "y a b c d", "2", "3" + NDS + "14159f", "g", "B-1", "H\u00C5T"}, + new System.String[]{ "G", "x a b c d", "3", "-1" + NDS + "0", "f", "C-100", "sin"}, + new System.String[]{ "H", "y a b c d", "0", "1" + NDS + "4E-45", "e", "C-88", "H\u00D8T"}, + new System.String[]{ "I", "x a b c d e f", "-2147483648", "1" + NDS + "0e+0", "d", "A-10", "s\u00EDn"}, + new System.String[]{ "J", "y a b c d e f", "4", "" + NDS + "5", "b", "C-7", "HOT"}, + new System.String[]{ "W", "g", "1", null, null, null, null}, + new System.String[]{ "X", "g", "1", "0" + NDS + "1", null, null, null}, + new System.String[]{ "Y", "g", "1", "0" + NDS + "2", null, null, null}, + new System.String[]{ "Z", "f g", null, null, null, null, null}}; + // create an index of all the documents, or just the x, or just the y documents private Searcher GetIndex(bool even, bool odd)