lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r883994 - in /incubator/lucene.net/trunk/C#/src: Lucene.Net/Search/ Lucene.Net/Search/Function/ Lucene.Net/Util/ Test/Search/ Test/Search/Function/ Test/Util/
Date Wed, 25 Nov 2009 06:50:17 GMT
Author: digy
Date: Wed Nov 25 06:50:08 2009
New Revision: 883994

URL: http://svn.apache.org/viewvc?rev=883994&view=rev
Log:
LUCENENET-309 TestSort.TestTypedSort fails (2)
needs documentation!!!

Modified:
    incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/FieldCache.cs
    incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/FieldCacheImpl.cs
    incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/FieldCacheRangeFilter.cs
    incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/FieldComparator.cs
    incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/FieldSortedHitQueue.cs
    incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/Function/ByteFieldSource.cs
    incubator/lucene.net/trunk/C#/src/Lucene.Net/Util/AverageGuessMemoryModel.cs
    incubator/lucene.net/trunk/C#/src/Test/Search/Function/TestFieldScoreQuery.cs
    incubator/lucene.net/trunk/C#/src/Test/Search/TestFieldCache.cs
    incubator/lucene.net/trunk/C#/src/Test/Search/TestSort.cs
    incubator/lucene.net/trunk/C#/src/Test/Util/TestFieldCacheSanityChecker.cs

Modified: incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/FieldCache.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Lucene.Net/Search/FieldCache.cs?rev=883994&r1=883993&r2=883994&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/FieldCache.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/FieldCache.cs Wed Nov 25 06:50:08
2009
@@ -197,13 +197,9 @@
 	[Serializable]
 	public class AnonymousClassByteParser : ByteParser
 	{
-		public virtual byte ParseByte(System.String value_Renamed)
+		public virtual sbyte ParseByte(System.String value_Renamed)
 		{
-            if (value_Renamed[0] == '-')
-            {
-                return (byte) System.SByte.Parse(value_Renamed);
-            }
-			return (byte) System.Byte.Parse(value_Renamed);
+            return System.SByte.Parse(value_Renamed);
 		}
 		protected internal virtual System.Object ReadResolve()
 		{
@@ -392,7 +388,7 @@
 		/// <returns> The values in the given field for each document.
 		/// </returns>
 		/// <throws>  IOException  If any error occurs. </throws>
-		byte[] GetBytes(IndexReader reader, System.String field);
+		sbyte[] GetBytes(IndexReader reader, System.String field);
 		
 		/// <summary>Checks the internal cache for an appropriate entry, and if none is found,
 		/// reads the terms in <code>field</code> as bytes and returns an array of
@@ -408,7 +404,7 @@
 		/// <returns> The values in the given field for each document.
 		/// </returns>
 		/// <throws>  IOException  If any error occurs. </throws>
-		byte[] GetBytes(IndexReader reader, System.String field, ByteParser parser);
+		sbyte[] GetBytes(IndexReader reader, System.String field, ByteParser parser);
 		
 		/// <summary>Checks the internal cache for an appropriate entry, and if none is
 		/// found, reads the terms in <code>field</code> as shorts and returns an array
@@ -691,7 +687,7 @@
 	public interface ByteParser:Parser
 	{
 		/// <summary>Return a single Byte representation of this field's value. </summary>
-		byte ParseByte(System.String string_Renamed);
+		sbyte ParseByte(System.String string_Renamed);
 	}
 	
 	/// <summary>Interface to parse shorts from document fields.</summary>

Modified: incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/FieldCacheImpl.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Lucene.Net/Search/FieldCacheImpl.cs?rev=883994&r1=883993&r2=883994&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/FieldCacheImpl.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/FieldCacheImpl.cs Wed Nov 25 06:50:08
2009
@@ -52,7 +52,7 @@
 			lock (this)
 			{
 				caches = new System.Collections.Hashtable(7);
-				caches[System.Type.GetType("System.Byte")] = new ByteCache(this);
+				caches[System.Type.GetType("System.SByte")] = new ByteCache(this);
 				caches[System.Type.GetType("System.Int16")] = new ShortCache(this);
 				caches[System.Type.GetType("System.Int32")] = new IntCache(this);
 				caches[System.Type.GetType("System.Single")] = new FloatCache(this);
@@ -357,15 +357,15 @@
 		}
 		
 		// inherit javadocs
-		public virtual byte[] GetBytes(IndexReader reader, System.String field)
+		public virtual sbyte[] GetBytes(IndexReader reader, System.String field)
 		{
 			return GetBytes(reader, field, null);
 		}
 		
 		// inherit javadocs
-		public virtual byte[] GetBytes(IndexReader reader, System.String field, ByteParser parser)
+		public virtual sbyte[] GetBytes(IndexReader reader, System.String field, ByteParser parser)
 		{
-			return (byte[]) ((Cache) caches[System.Type.GetType("System.Byte")]).Get(reader, new Entry(field,
parser));
+			return (sbyte[]) ((Cache) caches[System.Type.GetType("System.SByte")]).Get(reader, new
Entry(field, parser));
 		}
 		
 		internal sealed class ByteCache:Cache
@@ -382,7 +382,7 @@
 				{
 					return wrapper.GetBytes(reader, field, Lucene.Net.Search.FieldCache_Fields.DEFAULT_BYTE_PARSER);
 				}
-				byte[] retArray = new byte[reader.MaxDoc()];
+				sbyte[] retArray = new sbyte[reader.MaxDoc()];
 				TermDocs termDocs = reader.TermDocs();
 				TermEnum termEnum = reader.Terms(new Term(field));
 				try
@@ -392,7 +392,7 @@
 						Term term = termEnum.Term();
 						if (term == null || (System.Object) term.Field() != (System.Object) field)
 							break;
-						byte termval = parser.ParseByte(term.Text());
+						sbyte termval = parser.ParseByte(term.Text());
 						termDocs.Seek(termEnum);
 						while (termDocs.Next())
 						{

Modified: incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/FieldCacheRangeFilter.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Lucene.Net/Search/FieldCacheRangeFilter.cs?rev=883994&r1=883993&r2=883994&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/FieldCacheRangeFilter.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/FieldCacheRangeFilter.cs Wed Nov 25
06:50:08 2009
@@ -156,14 +156,14 @@
 		{
 			private class AnonymousClassFieldCacheDocIdSet:FieldCacheDocIdSet
 			{
-				private void  InitBlock(byte[] values, byte inclusiveLowerPoint, byte inclusiveUpperPoint,
AnonymousClassFieldCacheRangeFilter1 enclosingInstance)
+				private void  InitBlock(sbyte[] values, byte inclusiveLowerPoint, byte inclusiveUpperPoint,
AnonymousClassFieldCacheRangeFilter1 enclosingInstance)
 				{
 					this.values = values;
 					this.inclusiveLowerPoint = inclusiveLowerPoint;
 					this.inclusiveUpperPoint = inclusiveUpperPoint;
 					this.enclosingInstance = enclosingInstance;
 				}
-				private byte[] values;
+				private sbyte[] values;
 				private byte inclusiveLowerPoint;
 				private byte inclusiveUpperPoint;
 				private AnonymousClassFieldCacheRangeFilter1 enclosingInstance;
@@ -175,7 +175,7 @@
 					}
 					
 				}
-				internal AnonymousClassFieldCacheDocIdSet(byte[] values, byte inclusiveLowerPoint, byte
inclusiveUpperPoint, AnonymousClassFieldCacheRangeFilter1 enclosingInstance, Lucene.Net.Index.IndexReader
Param1, bool Param2):base(Param1, Param2)
+				internal AnonymousClassFieldCacheDocIdSet(sbyte[] values, byte inclusiveLowerPoint, byte
inclusiveUpperPoint, AnonymousClassFieldCacheRangeFilter1 enclosingInstance, Lucene.Net.Index.IndexReader
Param1, bool Param2):base(Param1, Param2)
 				{
 					InitBlock(values, inclusiveLowerPoint, inclusiveUpperPoint, enclosingInstance);
 				}
@@ -217,7 +217,7 @@
 				if (inclusiveLowerPoint > inclusiveUpperPoint)
 					return DocIdSet.EMPTY_DOCIDSET;
 				
-				byte[] values = Lucene.Net.Search.FieldCache_Fields.DEFAULT.GetBytes(reader, field, (Lucene.Net.Search.ByteParser)
parser);
+				sbyte[] values = Lucene.Net.Search.FieldCache_Fields.DEFAULT.GetBytes(reader, field,
(Lucene.Net.Search.ByteParser) parser);
 				// we only request the usage of termDocs, if the range contains 0
 				return new AnonymousClassFieldCacheDocIdSet(values, inclusiveLowerPoint, inclusiveUpperPoint,
this, reader, (inclusiveLowerPoint <= 0 && inclusiveUpperPoint >= 0));
 			}

Modified: incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/FieldComparator.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Lucene.Net/Search/FieldComparator.cs?rev=883994&r1=883993&r2=883994&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/FieldComparator.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/FieldComparator.cs Wed Nov 25 06:50:08
2009
@@ -88,15 +88,15 @@
 		/// </summary>
 		public sealed class ByteComparator:FieldComparator
 		{
-			private byte[] values;
-			private byte[] currentReaderValues;
+			private sbyte[] values;
+			private sbyte[] currentReaderValues;
 			private System.String field;
 			private ByteParser parser;
-			private byte bottom;
+			private sbyte bottom;
 			
 			internal ByteComparator(int numHits, System.String field, Lucene.Net.Search.Parser parser)
 			{
-				values = new byte[numHits];
+				values = new sbyte[numHits];
 				this.field = field;
 				this.parser = (ByteParser) parser;
 			}
@@ -128,7 +128,7 @@
 			
 			public override System.IComparable Value(int slot)
 			{
-				return (byte) values[slot];
+				return (sbyte) values[slot];
 			}
 		}
 		

Modified: incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/FieldSortedHitQueue.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Lucene.Net/Search/FieldSortedHitQueue.cs?rev=883994&r1=883993&r2=883994&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/FieldSortedHitQueue.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/FieldSortedHitQueue.cs Wed Nov 25
06:50:08 2009
@@ -112,15 +112,15 @@
 		}
 		private class AnonymousClassScoreDocComparator : ScoreDocComparator
 		{
-			public AnonymousClassScoreDocComparator(byte[] fieldOrder)
+			public AnonymousClassScoreDocComparator(sbyte[] fieldOrder)
 			{
 				InitBlock(fieldOrder);
 			}
-			private void  InitBlock(byte[] fieldOrder)
+			private void  InitBlock(sbyte[] fieldOrder)
 			{
 				this.fieldOrder = fieldOrder;
 			}
-			private byte[] fieldOrder;
+			private sbyte[] fieldOrder;
 			
 			public int Compare(ScoreDoc i, ScoreDoc j)
 			{
@@ -135,7 +135,7 @@
 			
 			public virtual System.IComparable SortValue(ScoreDoc i)
 			{
-				return (byte) fieldOrder[i.doc];
+				return (sbyte) fieldOrder[i.doc];
 			}
 			
 			public virtual int SortType()
@@ -556,7 +556,7 @@
 		internal static ScoreDocComparator comparatorByte(IndexReader reader, System.String fieldname,
Lucene.Net.Search.ByteParser parser)
 		{
 			System.String field = String.Intern(fieldname);
-			byte[] fieldOrder = Lucene.Net.Search.FieldCache_Fields.DEFAULT.GetBytes(reader, field,
parser);
+			sbyte[] fieldOrder = Lucene.Net.Search.FieldCache_Fields.DEFAULT.GetBytes(reader, field,
parser);
 			return new AnonymousClassScoreDocComparator(fieldOrder);
 		}
 		

Modified: incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/Function/ByteFieldSource.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Lucene.Net/Search/Function/ByteFieldSource.cs?rev=883994&r1=883993&r2=883994&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/Function/ByteFieldSource.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/Function/ByteFieldSource.cs Wed Nov
25 06:50:08 2009
@@ -52,16 +52,16 @@
 	{
 		private class AnonymousClassDocValues:DocValues
 		{
-			public AnonymousClassDocValues(byte[] arr, ByteFieldSource enclosingInstance)
+			public AnonymousClassDocValues(sbyte[] arr, ByteFieldSource enclosingInstance)
 			{
 				InitBlock(arr, enclosingInstance);
 			}
-			private void  InitBlock(byte[] arr, ByteFieldSource enclosingInstance)
+			private void  InitBlock(sbyte[] arr, ByteFieldSource enclosingInstance)
 			{
 				this.arr = arr;
 				this.enclosingInstance = enclosingInstance;
 			}
-			private byte[] arr;
+			private sbyte[] arr;
 			private ByteFieldSource enclosingInstance;
 			public ByteFieldSource Enclosing_Instance
 			{
@@ -114,7 +114,7 @@
 		/*(non-Javadoc) @see Lucene.Net.Search.Function.FieldCacheSource#getCachedValues(Lucene.Net.Search.FieldCache,
java.lang.String, Lucene.Net.Index.IndexReader) */
 		public override DocValues GetCachedFieldValues(FieldCache cache, System.String field, IndexReader
reader)
 		{
-			byte[] arr = cache.GetBytes(reader, field, parser);
+			sbyte[] arr = cache.GetBytes(reader, field, parser);
 			return new AnonymousClassDocValues(arr, this);
 		}
 		

Modified: incubator/lucene.net/trunk/C#/src/Lucene.Net/Util/AverageGuessMemoryModel.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Lucene.Net/Util/AverageGuessMemoryModel.cs?rev=883994&r1=883993&r2=883994&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Lucene.Net/Util/AverageGuessMemoryModel.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Lucene.Net/Util/AverageGuessMemoryModel.cs Wed Nov 25
06:50:08 2009
@@ -40,6 +40,7 @@
 				this.enclosingInstance = enclosingInstance;
 				Add(typeof(bool), 1);
 				Add(typeof(byte), 1);
+                Add(typeof(sbyte), 1);
 				Add(typeof(char), 2);
 				Add(typeof(short), 2);
 				Add(typeof(int), 4);

Modified: incubator/lucene.net/trunk/C#/src/Test/Search/Function/TestFieldScoreQuery.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Test/Search/Function/TestFieldScoreQuery.cs?rev=883994&r1=883993&r2=883994&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Test/Search/Function/TestFieldScoreQuery.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Test/Search/Function/TestFieldScoreQuery.cs Wed Nov
25 06:50:08 2009
@@ -194,7 +194,7 @@
 		{
 			// prepare expected array types for comparison
 			System.Collections.Hashtable expectedArrayTypes = new System.Collections.Hashtable();
-			expectedArrayTypes[FieldScoreQuery.Type.BYTE] = new byte[0];
+			expectedArrayTypes[FieldScoreQuery.Type.BYTE] = new sbyte[0];
 			expectedArrayTypes[FieldScoreQuery.Type.SHORT] = new short[0];
 			expectedArrayTypes[FieldScoreQuery.Type.INT] = new int[0];
 			expectedArrayTypes[FieldScoreQuery.Type.FLOAT] = new float[0];

Modified: incubator/lucene.net/trunk/C#/src/Test/Search/TestFieldCache.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Test/Search/TestFieldCache.cs?rev=883994&r1=883993&r2=883994&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Test/Search/TestFieldCache.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Test/Search/TestFieldCache.cs Wed Nov 25 06:50:08 2009
@@ -44,7 +44,7 @@
 			IndexWriter writer = new IndexWriter(directory, new WhitespaceAnalyzer(), true, IndexWriter.MaxFieldLength.LIMITED);
 			long theLong = System.Int64.MaxValue;
 			double theDouble = System.Double.MaxValue;
-			byte theByte = (byte) System.SByte.MaxValue;
+			sbyte theByte = (sbyte) System.SByte.MaxValue;
 			short theShort = System.Int16.MaxValue;
 			int theInt = System.Int32.MaxValue;
 			float theFloat = System.Single.MaxValue;
@@ -53,7 +53,7 @@
 				Document doc = new Document();
 				doc.Add(new Field("theLong", System.Convert.ToString(theLong--), Field.Store.NO, Field.Index.NOT_ANALYZED));
 				doc.Add(new Field("theDouble", theDouble.ToString("E16"), Field.Store.NO, Field.Index.NOT_ANALYZED));
-				doc.Add(new Field("theByte", System.Convert.ToString((byte) theByte--), Field.Store.NO,
Field.Index.NOT_ANALYZED));
+				doc.Add(new Field("theByte", System.Convert.ToString((sbyte) theByte--), Field.Store.NO,
Field.Index.NOT_ANALYZED));
 				doc.Add(new Field("theShort", System.Convert.ToString(theShort--), Field.Store.NO, Field.Index.NOT_ANALYZED));
 				doc.Add(new Field("theInt", System.Convert.ToString(theInt--), Field.Store.NO, Field.Index.NOT_ANALYZED));
 				doc.Add(new Field("theFloat", theFloat.ToString("E8"), Field.Store.NO, Field.Index.NOT_ANALYZED));
@@ -110,13 +110,13 @@
 				Assert.IsTrue(longs[i] == (System.Int64.MaxValue - i), longs[i] + " does not equal: "
+ (System.Int64.MaxValue - i));
 			}
 			
-			byte[] bytes = cache.GetBytes(reader, "theByte");
+			sbyte[] bytes = cache.GetBytes(reader, "theByte");
 			Assert.AreSame(bytes, cache.GetBytes(reader, "theByte"), "Second request to cache return
same array");
 			Assert.AreSame(bytes, cache.GetBytes(reader, "theByte", Lucene.Net.Search.FieldCache_Fields.DEFAULT_BYTE_PARSER),
"Second request with explicit parser return same array");
 			Assert.IsTrue(bytes.Length == NUM_DOCS, "bytes Size: " + bytes.Length + " is not: " +
NUM_DOCS);
 			for (int i = 0; i < bytes.Length; i++)
 			{
-				Assert.IsTrue(bytes[i] == (byte) ((byte) System.SByte.MaxValue - i), bytes[i] + " does
not equal: " + ((byte) System.SByte.MaxValue - i));
+				Assert.IsTrue(bytes[i] == (sbyte) ((byte) System.SByte.MaxValue - i), bytes[i] + " does
not equal: " + ((byte) System.SByte.MaxValue - i));
 			}
 			
 			short[] shorts = cache.GetShorts(reader, "theShort");

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=883994&r1=883993&r2=883994&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Test/Search/TestSort.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Test/Search/TestSort.cs Wed Nov 25 06:50:08 2009
@@ -170,9 +170,9 @@
 				}
 				
 			}
-			public byte ParseByte(System.String val)
+			public sbyte ParseByte(System.String val)
 			{
-				return (byte) (val[0] - 'A');
+				return (sbyte) (val[0] - 'A');
 			}
 		}
 		[Serializable]
@@ -266,8 +266,8 @@
           new string[]{   "A",   "x a",           "5",           "4f",            "c",  
  "A-3",   "p\u00EAche",      "10",                      "-4.0",                         
 "3",                        "126",                      "J"},//A, x
           new string[]{   "B",   "y a",           "5",           "3.4028235E38",  "i",  
  "B-10",  "HAT",             "1000000000",              "40.0",                         
 "24",                       "1",                        "I"},//B, y
           new string[]{   "C",   "x a b c",       "2147483647",  "1.0",           "j",  
  "A-2",   "p\u00E9ch\u00E9", "99999999",                "40.00002343",                  
 "125",                      "15",                       "H"},//C, x
-          new string[]{   "D",   "y a b c",       "-1",          "0.0f",          "a",  
  "C-0",   "HUT",             long.MaxValue.ToString(),  double.MinValue.ToString("E16"),
 short.MinValue.ToString(),  byte.MinValue.ToString(),   "G"},//D, y
-          new string[]{   "E",   "x a b c d",     "5",           "2f",            "h",  
  "B-8",   "peach",           long.MinValue.ToString(),  double.MaxValue.ToString("E16"),
 short.MaxValue.ToString(),  byte.MaxValue.ToString(),   "F"},//E,x
+          new string[]{   "D",   "y a b c",       "-1",          "0.0f",          "a",  
  "C-0",   "HUT",             long.MaxValue.ToString(),  double.MinValue.ToString("E16"),
 short.MinValue.ToString(),  sbyte.MinValue.ToString(),   "G"},//D, y
+          new string[]{   "E",   "x a b c d",     "5",           "2f",            "h",  
  "B-8",   "peach",           long.MinValue.ToString(),  double.MaxValue.ToString("E16"),
 short.MaxValue.ToString(),  sbyte.MaxValue.ToString(),   "F"},//E,x
           new string[]{   "F",   "y a b c d",     "2",           "3.14159f",      "g",  
  "B-1",   "H\u00C5T",        "-44",                     "343.034435444",                
 "-3",                       "0",                        "E"},//F,y
           new string[]{   "G",   "x a b c d",     "3",           "-1.0",          "f",  
  "C-100", "sin",             "323254543543",            "4.043544",                     
 "5",                        "100",                      "D"},//G,x
           new string[]{   "H",   "y a b c d",     "0",           "1.4E-45",       "e",  
  "C-88",  "H\u00D8T",        "1023423423005",           "4.043545",                     
 "10",                       "-50",                      "C"},//H,y
@@ -439,21 +439,21 @@
 		[Test]
 		public virtual void  TestTypedSort()
 		{
-			sort.SetSort(new SortField[]{new SortField("int", SortField.INT), SortField.FIELD_DOC});
-			AssertMatches(full, queryX, sort, "IGAEC");
-			AssertMatches(full, queryY, sort, "DHFJB");
-			
-			sort.SetSort(new SortField[]{new SortField("float", SortField.FLOAT), SortField.FIELD_DOC});
-			AssertMatches(full, queryX, sort, "GCIEA");
-			AssertMatches(full, queryY, sort, "DHJFB");
-			
-			sort.SetSort(new SortField[]{new SortField("long", SortField.LONG), SortField.FIELD_DOC});
-			AssertMatches(full, queryX, sort, "EACGI");
-			AssertMatches(full, queryY, sort, "FBJHD");
-			
-			sort.SetSort(new SortField[]{new SortField("double", SortField.DOUBLE), SortField.FIELD_DOC});
-			AssertMatches(full, queryX, sort, "AGICE");
-			AssertMatches(full, queryY, sort, "DJHBF");
+            sort.SetSort(new SortField[] { new SortField("int", SortField.INT), SortField.FIELD_DOC
});
+            AssertMatches(full, queryX, sort, "IGAEC");
+            AssertMatches(full, queryY, sort, "DHFJB");
+
+            sort.SetSort(new SortField[] { new SortField("float", SortField.FLOAT), SortField.FIELD_DOC
});
+            AssertMatches(full, queryX, sort, "GCIEA");
+            AssertMatches(full, queryY, sort, "DHJFB");
+
+            sort.SetSort(new SortField[] { new SortField("long", SortField.LONG), SortField.FIELD_DOC
});
+            AssertMatches(full, queryX, sort, "EACGI");
+            AssertMatches(full, queryY, sort, "FBJHD");
+
+            sort.SetSort(new SortField[] { new SortField("double", SortField.DOUBLE), SortField.FIELD_DOC
});
+            AssertMatches(full, queryX, sort, "AGICE");
+            AssertMatches(full, queryY, sort, "DJHBF");
 			
 			sort.SetSort(new SortField[]{new SortField("byte", SortField.BYTE), SortField.FIELD_DOC});
 			AssertMatches(full, queryX, sort, "CIGAE");

Modified: incubator/lucene.net/trunk/C#/src/Test/Util/TestFieldCacheSanityChecker.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Test/Util/TestFieldCacheSanityChecker.cs?rev=883994&r1=883993&r2=883994&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Test/Util/TestFieldCacheSanityChecker.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Test/Util/TestFieldCacheSanityChecker.cs Wed Nov 25
06:50:08 2009
@@ -134,7 +134,7 @@
 			
 			int[] ints;
 			System.String[] strings;
-			byte[] bytes;
+			sbyte[] bytes;
 			
 			ints = cache.GetInts(readerX, "theInt", Lucene.Net.Search.FieldCache_Fields.DEFAULT_INT_PARSER);
 			strings = cache.GetStrings(readerX, "theInt");
@@ -161,7 +161,7 @@
 			cache.PurgeAllCaches();
 			
 			System.String[] strings;
-			byte[] bytes;
+			sbyte[] bytes;
 			
 			strings = cache.GetStrings(readerA, "theString");
 			strings = cache.GetStrings(readerB, "theString");



Mime
View raw message