Repository: lucenenet Updated Branches: refs/heads/api-work 25e9d01dd -> cfdda330c (forced update)
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Tests/core/Util/Fst/TestFSTs.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Tests/core/Util/Fst/TestFSTs.cs b/src/Lucene.Net.Tests/core/Util/Fst/TestFSTs.cs index 061437c..83b3f07 100644 --- a/src/Lucene.Net.Tests/core/Util/Fst/TestFSTs.cs +++ b/src/Lucene.Net.Tests/core/Util/Fst/TestFSTs.cs @@ -256,7 +256,7 @@ namespace Lucene.Net.Util.Fst output.Length = s.Length; for (int idx2 = 0; idx2 < output.Length; idx2++) { - output.Ints[idx2] = s[idx2]; + output.Int32s[idx2] = s[idx2]; } pairs.Add(new FSTTester<IntsRef>.InputOutput<IntsRef>(terms[idx], output)); } @@ -413,7 +413,7 @@ namespace Lucene.Net.Util.Fst { output = termsEnum.DocFreq; } - builder.Add(Util.ToIntsRef(term, scratchIntsRef), (long)output); + builder.Add(Util.ToInt32sRef(term, scratchIntsRef), (long)output); ord++; if (VERBOSE && ord % 100000 == 0 && LuceneTestCase.TEST_NIGHTLY) { @@ -888,7 +888,7 @@ namespace Lucene.Net.Util.Fst { Outputs<object> outputs = NoOutputs.Singleton; Builder<object> b = new Builder<object>(FST.INPUT_TYPE.BYTE1, outputs); - b.Add(Util.ToIntsRef(new BytesRef("foobar"), new IntsRef()), outputs.NoOutput); + b.Add(Util.ToInt32sRef(new BytesRef("foobar"), new IntsRef()), outputs.NoOutput); BytesRefFSTEnum<object> fstEnum = new BytesRefFSTEnum<object>(b.Finish()); Assert.IsNull(fstEnum.SeekFloor(new BytesRef("foo"))); Assert.IsNull(fstEnum.SeekCeil(new BytesRef("foobaz"))); @@ -904,7 +904,7 @@ namespace Lucene.Net.Util.Fst IntsRef ints = new IntsRef(); for (int i = 0; i < 10; i++) { - b.Add(Util.ToIntsRef(new BytesRef(str), ints), outputs.NoOutput); + b.Add(Util.ToInt32sRef(new BytesRef(str), ints), outputs.NoOutput); } FST<object> fst = b.Finish(); @@ -979,9 +979,9 @@ namespace Lucene.Net.Util.Fst BytesRef b = new BytesRef("b"); BytesRef c = new BytesRef("c"); - builder.Add(Util.ToIntsRef(a, new IntsRef()), 17L); - builder.Add(Util.ToIntsRef(b, new IntsRef()), 42L); - builder.Add(Util.ToIntsRef(c, new IntsRef()), 13824324872317238L); + builder.Add(Util.ToInt32sRef(a, new IntsRef()), 17L); + builder.Add(Util.ToInt32sRef(b, new IntsRef()), 42L); + builder.Add(Util.ToInt32sRef(c, new IntsRef()), 13824324872317238L); FST<long?> fst = builder.Finish(); @@ -1006,10 +1006,10 @@ namespace Lucene.Net.Util.Fst Assert.AreEqual(b, seekResult.Input); Assert.AreEqual(42, seekResult.Output); - Assert.AreEqual(Util.ToIntsRef(new BytesRef("c"), new IntsRef()), Util.GetByOutput(fst, 13824324872317238L)); + Assert.AreEqual(Util.ToInt32sRef(new BytesRef("c"), new IntsRef()), Util.GetByOutput(fst, 13824324872317238L)); Assert.IsNull(Util.GetByOutput(fst, 47)); - Assert.AreEqual(Util.ToIntsRef(new BytesRef("b"), new IntsRef()), Util.GetByOutput(fst, 42)); - Assert.AreEqual(Util.ToIntsRef(new BytesRef("a"), new IntsRef()), Util.GetByOutput(fst, 17)); + Assert.AreEqual(Util.ToInt32sRef(new BytesRef("b"), new IntsRef()), Util.GetByOutput(fst, 42)); + Assert.AreEqual(Util.ToInt32sRef(new BytesRef("a"), new IntsRef()), Util.GetByOutput(fst, 17)); } [Test] @@ -1287,7 +1287,7 @@ namespace Lucene.Net.Util.Fst break; } term.CopyChars(w); - b.Add(Util.ToIntsRef(term, scratchIntsRef), nothing); + b.Add(Util.ToInt32sRef(term, scratchIntsRef), nothing); } return b.Finish(); @@ -1358,8 +1358,8 @@ namespace Lucene.Net.Util.Fst PositiveIntOutputs outputs = PositiveIntOutputs.Singleton; bool willRewrite = Random().NextBoolean(); Builder<long?> builder = new Builder<long?>(FST.INPUT_TYPE.BYTE1, 0, 0, true, true, int.MaxValue, outputs, null, willRewrite, PackedInts.DEFAULT, true, 15); - builder.Add(Util.ToIntsRef(new BytesRef("stat"), new IntsRef()), outputs.NoOutput); - builder.Add(Util.ToIntsRef(new BytesRef("station"), new IntsRef()), outputs.NoOutput); + builder.Add(Util.ToInt32sRef(new BytesRef("stat"), new IntsRef()), outputs.NoOutput); + builder.Add(Util.ToInt32sRef(new BytesRef("station"), new IntsRef()), outputs.NoOutput); FST<long?> fst = builder.Finish(); StringWriter w = new StringWriter(); //Writer w = new OutputStreamWriter(new FileOutputStream("/x/tmp/out.dot")); @@ -1471,9 +1471,9 @@ namespace Lucene.Net.Util.Fst Builder<long?> builder = new Builder<long?>(FST.INPUT_TYPE.BYTE1, outputs); IntsRef scratch = new IntsRef(); - builder.Add(Util.ToIntsRef(new BytesRef("aab"), scratch), 22L); - builder.Add(Util.ToIntsRef(new BytesRef("aac"), scratch), 7L); - builder.Add(Util.ToIntsRef(new BytesRef("ax"), scratch), 17L); + builder.Add(Util.ToInt32sRef(new BytesRef("aab"), scratch), 22L); + builder.Add(Util.ToInt32sRef(new BytesRef("aac"), scratch), 7L); + builder.Add(Util.ToInt32sRef(new BytesRef("ax"), scratch), 17L); FST<long?> fst = builder.Finish(); //Writer w = new OutputStreamWriter(new FileOutputStream("out.dot")); //Util.toDot(fst, w, false, false); @@ -1482,13 +1482,13 @@ namespace Lucene.Net.Util.Fst Util.TopResults<long?> res = Util.ShortestPaths(fst, fst.GetFirstArc(new FST.Arc<long?>()), outputs.NoOutput, minLongComparer, 3, true); Assert.IsTrue(res.IsComplete); Assert.AreEqual(3, res.TopN.Count); - Assert.AreEqual(Util.ToIntsRef(new BytesRef("aac"), scratch), res.TopN[0].Input); + Assert.AreEqual(Util.ToInt32sRef(new BytesRef("aac"), scratch), res.TopN[0].Input); Assert.AreEqual(7L, res.TopN[0].Output); - Assert.AreEqual(Util.ToIntsRef(new BytesRef("ax"), scratch), res.TopN[1].Input); + Assert.AreEqual(Util.ToInt32sRef(new BytesRef("ax"), scratch), res.TopN[1].Input); Assert.AreEqual(17L, res.TopN[1].Output); - Assert.AreEqual(Util.ToIntsRef(new BytesRef("aab"), scratch), res.TopN[2].Input); + Assert.AreEqual(Util.ToInt32sRef(new BytesRef("aab"), scratch), res.TopN[2].Input); Assert.AreEqual(22L, res.TopN[2].Output); } @@ -1499,12 +1499,12 @@ namespace Lucene.Net.Util.Fst Builder<long?> builder = new Builder<long?>(FST.INPUT_TYPE.BYTE1, outputs); IntsRef scratch = new IntsRef(); - builder.Add(Util.ToIntsRef(new BytesRef("aab"), scratch), 22L); - builder.Add(Util.ToIntsRef(new BytesRef("aac"), scratch), 7L); - builder.Add(Util.ToIntsRef(new BytesRef("adcd"), scratch), 17L); - builder.Add(Util.ToIntsRef(new BytesRef("adcde"), scratch), 17L); + builder.Add(Util.ToInt32sRef(new BytesRef("aab"), scratch), 22L); + builder.Add(Util.ToInt32sRef(new BytesRef("aac"), scratch), 7L); + builder.Add(Util.ToInt32sRef(new BytesRef("adcd"), scratch), 17L); + builder.Add(Util.ToInt32sRef(new BytesRef("adcde"), scratch), 17L); - builder.Add(Util.ToIntsRef(new BytesRef("ax"), scratch), 17L); + builder.Add(Util.ToInt32sRef(new BytesRef("ax"), scratch), 17L); FST<long?> fst = builder.Finish(); AtomicInteger rejectCount = new AtomicInteger(); Util.TopNSearcher<long?> searcher = new TopNSearcherAnonymousInnerClassHelper(this, fst, minLongComparer, rejectCount); @@ -1515,7 +1515,7 @@ namespace Lucene.Net.Util.Fst Assert.IsTrue(res.IsComplete); // rejected(4) + topN(2) <= maxQueueSize(6) Assert.AreEqual(1, res.TopN.Count); - Assert.AreEqual(Util.ToIntsRef(new BytesRef("aac"), scratch), res.TopN[0].Input); + Assert.AreEqual(Util.ToInt32sRef(new BytesRef("aac"), scratch), res.TopN[0].Input); Assert.AreEqual(7L, res.TopN[0].Output); rejectCount.Set(0); searcher = new TopNSearcherAnonymousInnerClassHelper2(this, fst, minLongComparer, rejectCount); @@ -1600,9 +1600,9 @@ namespace Lucene.Net.Util.Fst Builder<Pair> builder = new Builder<Pair>(FST.INPUT_TYPE.BYTE1, outputs); IntsRef scratch = new IntsRef(); - builder.Add(Util.ToIntsRef(new BytesRef("aab"), scratch), outputs.NewPair(22L, 57L)); - builder.Add(Util.ToIntsRef(new BytesRef("aac"), scratch), outputs.NewPair(7L, 36L)); - builder.Add(Util.ToIntsRef(new BytesRef("ax"), scratch), outputs.NewPair(17L, 85L)); + builder.Add(Util.ToInt32sRef(new BytesRef("aab"), scratch), outputs.NewPair(22L, 57L)); + builder.Add(Util.ToInt32sRef(new BytesRef("aac"), scratch), outputs.NewPair(7L, 36L)); + builder.Add(Util.ToInt32sRef(new BytesRef("ax"), scratch), outputs.NewPair(17L, 85L)); FST<Pair> fst = builder.Finish(); //Writer w = new OutputStreamWriter(new FileOutputStream("out.dot")); //Util.toDot(fst, w, false, false); @@ -1612,15 +1612,15 @@ namespace Lucene.Net.Util.Fst Assert.IsTrue(res.IsComplete); Assert.AreEqual(3, res.TopN.Count); - Assert.AreEqual(Util.ToIntsRef(new BytesRef("aac"), scratch), res.TopN[0].Input); + Assert.AreEqual(Util.ToInt32sRef(new BytesRef("aac"), scratch), res.TopN[0].Input); Assert.AreEqual(7L, res.TopN[0].Output.Output1); // weight Assert.AreEqual(36L, res.TopN[0].Output.Output2); // output - Assert.AreEqual(Util.ToIntsRef(new BytesRef("ax"), scratch), res.TopN[1].Input); + Assert.AreEqual(Util.ToInt32sRef(new BytesRef("ax"), scratch), res.TopN[1].Input); Assert.AreEqual(17L, res.TopN[1].Output.Output1); // weight Assert.AreEqual(85L, res.TopN[1].Output.Output2); // output - Assert.AreEqual(Util.ToIntsRef(new BytesRef("aab"), scratch), res.TopN[2].Input); + Assert.AreEqual(Util.ToInt32sRef(new BytesRef("aab"), scratch), res.TopN[2].Input); Assert.AreEqual(22L, res.TopN[2].Output.Output1); // weight Assert.AreEqual(57L, res.TopN[2].Output.Output2); // output } @@ -1661,7 +1661,7 @@ namespace Lucene.Net.Util.Fst foreach (KeyValuePair<string, long> e in slowCompletor) { //System.out.println("add: " + e); - builder.Add(Util.ToIntsRef(new BytesRef(e.Key), scratch), e.Value); + builder.Add(Util.ToInt32sRef(new BytesRef(e.Key), scratch), e.Value); } FST<long?> fst = builder.Finish(); @@ -1703,7 +1703,7 @@ namespace Lucene.Net.Util.Fst if (e.Key.StartsWith(prefix)) { //System.out.println(" consider " + e.getKey()); - matches.Add(new Util.Result<long?>(Util.ToIntsRef(new BytesRef(e.Key.Substring(prefix.Length)), new IntsRef()), e.Value - prefixOutput)); + matches.Add(new Util.Result<long?>(Util.ToInt32sRef(new BytesRef(e.Key.Substring(prefix.Length)), new IntsRef()), e.Value - prefixOutput)); } } @@ -1804,7 +1804,7 @@ namespace Lucene.Net.Util.Fst //System.out.println("add: " + e); long weight = e.Value.a; long output = e.Value.b; - builder.Add(Util.ToIntsRef(new BytesRef(e.Key), scratch), outputs.NewPair(weight, output)); + builder.Add(Util.ToInt32sRef(new BytesRef(e.Key), scratch), outputs.NewPair(weight, output)); } FST<Pair> fst = builder.Finish(); @@ -1845,7 +1845,7 @@ namespace Lucene.Net.Util.Fst if (e.Key.StartsWith(prefix)) { //System.out.println(" consider " + e.getKey()); - matches.Add(new Util.Result<Pair>(Util.ToIntsRef(new BytesRef(e.Key.Substring(prefix.Length)), new IntsRef()), + matches.Add(new Util.Result<Pair>(Util.ToInt32sRef(new BytesRef(e.Key.Substring(prefix.Length)), new IntsRef()), outputs.NewPair(e.Value.a - prefixOutput.Output1, e.Value.b - prefixOutput.Output2))); } } @@ -1881,7 +1881,7 @@ namespace Lucene.Net.Util.Fst BytesRef output = new BytesRef(bytes); for (int arc = 0; arc < 6; arc++) { - input.Ints[0] = arc; + input.Int32s[0] = arc; output.Bytes[0] = (byte)arc; builder.Add(input, BytesRef.DeepCopyOf(output)); } @@ -1889,7 +1889,7 @@ namespace Lucene.Net.Util.Fst FST<BytesRef> fst = builder.Finish(); for (int arc = 0; arc < 6; arc++) { - input.Ints[0] = arc; + input.Int32s[0] = arc; BytesRef result = Util.Get(fst, input); Assert.IsNotNull(result); Assert.AreEqual(300, result.Length); http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Tests/core/Util/Packed/TestPackedInts.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Tests/core/Util/Packed/TestPackedInts.cs b/src/Lucene.Net.Tests/core/Util/Packed/TestPackedInts.cs index 8527887..35de442 100644 --- a/src/Lucene.Net.Tests/core/Util/Packed/TestPackedInts.cs +++ b/src/Lucene.Net.Tests/core/Util/Packed/TestPackedInts.cs @@ -135,9 +135,9 @@ namespace Lucene.Net.Util.Packed IndexInput @in = d.OpenInput("out.bin", NewIOContext(Random())); // header = codec header | bitsPerValue | valueCount | format CodecUtil.CheckHeader(@in, PackedInts.CODEC_NAME, PackedInts.VERSION_START, PackedInts.VERSION_CURRENT); // codec header - Assert.AreEqual(w.BitsPerValue, @in.ReadVInt()); - Assert.AreEqual(valueCount, @in.ReadVInt()); - Assert.AreEqual(w.Format.Id, @in.ReadVInt()); + Assert.AreEqual(w.BitsPerValue, @in.ReadVInt32()); + Assert.AreEqual(valueCount, @in.ReadVInt32()); + Assert.AreEqual(w.Format.Id, @in.ReadVInt32()); Assert.AreEqual(startFp, @in.FilePointer); @in.Dispose(); } @@ -179,7 +179,7 @@ namespace Lucene.Net.Util.Packed LongsRef next = r.Next(count); for (int k = 0; k < next.Length; ++k) { - Assert.AreEqual(values[i + k], next.Longs[next.Offset + k], "index=" + i + " valueCount=" + valueCount + " nbits=" + nbits + " for " + r.GetType().Name); + Assert.AreEqual(values[i + k], next.Int64s[next.Offset + k], "index=" + i + " valueCount=" + valueCount + " nbits=" + nbits + " for " + r.GetType().Name); } i += next.Length; } @@ -213,7 +213,7 @@ namespace Lucene.Net.Util.Packed IndexOutput @out = dir.CreateOutput("tests.bin", NewIOContext(Random())); for (int i = 0; i < valueCount; ++i) { - @out.WriteLong(0); + @out.WriteInt64(0); } @out.Dispose(); IndexInput @in = dir.OpenInput("tests.bin", NewIOContext(Random())); @@ -1004,12 +1004,12 @@ namespace Lucene.Net.Util.Packed PackedInts.IEncoder encoder = PackedInts.GetEncoder(format, PackedInts.VERSION_CURRENT, bpv); PackedInts.IDecoder decoder = PackedInts.GetDecoder(format, PackedInts.VERSION_CURRENT, bpv); - int longBlockCount = encoder.LongBlockCount; - int longValueCount = encoder.LongValueCount; + int longBlockCount = encoder.Int64BlockCount; + int longValueCount = encoder.Int64ValueCount; int byteBlockCount = encoder.ByteBlockCount; int byteValueCount = encoder.ByteValueCount; - Assert.AreEqual(longBlockCount, decoder.LongBlockCount); - Assert.AreEqual(longValueCount, decoder.LongValueCount); + Assert.AreEqual(longBlockCount, decoder.Int64BlockCount); + Assert.AreEqual(longValueCount, decoder.Int64ValueCount); Assert.AreEqual(byteBlockCount, decoder.ByteBlockCount); Assert.AreEqual(byteValueCount, decoder.ByteValueCount); @@ -1068,7 +1068,7 @@ namespace Lucene.Net.Util.Packed // 4. byte[] decoding byte[] byteBlocks = new byte[8 * blocks.Length]; - ByteBuffer.Wrap(byteBlocks).AsLongBuffer().Put(blocks); + ByteBuffer.Wrap(byteBlocks).AsInt64Buffer().Put(blocks); long[] values2 = new long[valuesOffset + longIterations * longValueCount]; decoder.Decode(byteBlocks, blocksOffset * 8, values2, valuesOffset, byteIterations); foreach (long value in values2) @@ -1087,7 +1087,7 @@ namespace Lucene.Net.Util.Packed // 5. byte[] encoding byte[] blocks3_ = new byte[8 * (blocksOffset2 + blocksLen)]; encoder.Encode(values, valuesOffset, blocks3_, 8 * blocksOffset2, byteIterations); - assertEquals(msg, LongBuffer.Wrap(blocks2), ByteBuffer.Wrap(blocks3_).AsLongBuffer()); + assertEquals(msg, LongBuffer.Wrap(blocks2), ByteBuffer.Wrap(blocks3_).AsInt64Buffer()); // test encoding from int[] if (bpv <= 32) { @@ -1274,7 +1274,7 @@ namespace Lucene.Net.Util.Packed long totalBits = 0; for (int i = 0; i < longs.Length; ++i) { - pout.WriteLong(longs[i], bitsPerValues[i]); + pout.WriteInt64(longs[i], bitsPerValues[i]); totalBits += bitsPerValues[i]; if (skip[i]) { @@ -1289,7 +1289,7 @@ namespace Lucene.Net.Util.Packed PackedDataInput pin = new PackedDataInput(@in); for (int i = 0; i < longs.Length; ++i) { - Assert.AreEqual(longs[i], pin.ReadLong(bitsPerValues[i]), "" + i); + Assert.AreEqual(longs[i], pin.ReadInt64(bitsPerValues[i]), "" + i); if (skip[i]) { pin.SkipToNextByte(); @@ -1365,7 +1365,7 @@ namespace Lucene.Net.Util.Packed LongsRef nextValues = it.Next(TestUtil.NextInt(Random(), 1, 1024)); for (int j = 0; j < nextValues.Length; ++j) { - Assert.AreEqual(values[i + j], nextValues.Longs[nextValues.Offset + j], "" + (i + j)); + Assert.AreEqual(values[i + j], nextValues.Int64s[nextValues.Offset + j], "" + (i + j)); } i += nextValues.Length; } http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Tests/core/Util/TestArrayUtil.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Tests/core/Util/TestArrayUtil.cs b/src/Lucene.Net.Tests/core/Util/TestArrayUtil.cs index 58c2c21..4502869 100644 --- a/src/Lucene.Net.Tests/core/Util/TestArrayUtil.cs +++ b/src/Lucene.Net.Tests/core/Util/TestArrayUtil.cs @@ -78,7 +78,7 @@ namespace Lucene.Net.Util int test; try { - test = ArrayUtil.ParseInt("".ToCharArray()); + test = ArrayUtil.ParseInt32("".ToCharArray()); Assert.IsTrue(false); } #pragma warning disable 168 @@ -89,7 +89,7 @@ namespace Lucene.Net.Util } try { - test = ArrayUtil.ParseInt("foo".ToCharArray()); + test = ArrayUtil.ParseInt32("foo".ToCharArray()); Assert.IsTrue(false); } #pragma warning disable 168 @@ -100,7 +100,7 @@ namespace Lucene.Net.Util } try { - test = ArrayUtil.ParseInt(Convert.ToString(long.MaxValue).ToCharArray()); + test = ArrayUtil.ParseInt32(Convert.ToString(long.MaxValue).ToCharArray()); Assert.IsTrue(false); } #pragma warning disable 168 @@ -111,7 +111,7 @@ namespace Lucene.Net.Util } try { - test = ArrayUtil.ParseInt("0.34".ToCharArray()); + test = ArrayUtil.ParseInt32("0.34".ToCharArray()); Assert.IsTrue(false); } #pragma warning disable 168 @@ -123,15 +123,15 @@ namespace Lucene.Net.Util try { - test = ArrayUtil.ParseInt("1".ToCharArray()); + test = ArrayUtil.ParseInt32("1".ToCharArray()); Assert.IsTrue(test == 1, test + " does not equal: " + 1); - test = ArrayUtil.ParseInt("-10000".ToCharArray()); + test = ArrayUtil.ParseInt32("-10000".ToCharArray()); Assert.IsTrue(test == -10000, test + " does not equal: " + -10000); - test = ArrayUtil.ParseInt("1923".ToCharArray()); + test = ArrayUtil.ParseInt32("1923".ToCharArray()); Assert.IsTrue(test == 1923, test + " does not equal: " + 1923); - test = ArrayUtil.ParseInt("-1".ToCharArray()); + test = ArrayUtil.ParseInt32("-1".ToCharArray()); Assert.IsTrue(test == -1, test + " does not equal: " + -1); - test = ArrayUtil.ParseInt("foo 1923 bar".ToCharArray(), 4, 4); + test = ArrayUtil.ParseInt32("foo 1923 bar".ToCharArray(), 4, 4); Assert.IsTrue(test == 1923, test + " does not equal: " + 1923); } catch (FormatException e) http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Tests/core/Util/TestBroadWord.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Tests/core/Util/TestBroadWord.cs b/src/Lucene.Net.Tests/core/Util/TestBroadWord.cs index b505972..eb6b219 100644 --- a/src/Lucene.Net.Tests/core/Util/TestBroadWord.cs +++ b/src/Lucene.Net.Tests/core/Util/TestBroadWord.cs @@ -138,7 +138,7 @@ namespace Lucene.Net.Util { long ii = i * BroadWord.L8_L; long jj = j * BroadWord.L8_L; - Assert.AreEqual(ToStringUtils.LongHex((i < j) ? unchecked(0x80L * BroadWord.L8_L) : 0x0L), ToStringUtils.LongHex(BroadWord.SmallerUpTo7_8(ii, jj)), ToStringUtils.LongHex(ii) + " < " + ToStringUtils.LongHex(jj)); + Assert.AreEqual(ToStringUtils.Int64Hex((i < j) ? unchecked(0x80L * BroadWord.L8_L) : 0x0L), ToStringUtils.Int64Hex(BroadWord.SmallerUpTo7_8(ii, jj)), ToStringUtils.Int64Hex(ii) + " < " + ToStringUtils.Int64Hex(jj)); } } } @@ -153,7 +153,7 @@ namespace Lucene.Net.Util { long ii = i * BroadWord.L8_L; long jj = j * BroadWord.L8_L; - Assert.AreEqual(ToStringUtils.LongHex((i < j) ? unchecked(0x80L * BroadWord.L8_L) : 0x0L), ToStringUtils.LongHex(BroadWord.Smalleru_8(ii, jj)), ToStringUtils.LongHex(ii) + " < " + ToStringUtils.LongHex(jj)); + Assert.AreEqual(ToStringUtils.Int64Hex((i < j) ? unchecked(0x80L * BroadWord.L8_L) : 0x0L), ToStringUtils.Int64Hex(BroadWord.Smalleru_8(ii, jj)), ToStringUtils.Int64Hex(ii) + " < " + ToStringUtils.Int64Hex(jj)); } } } @@ -165,7 +165,7 @@ namespace Lucene.Net.Util for (long i = 0x0L; i <= 0xFFL; i++) { long ii = i * BroadWord.L8_L; - Assert.AreEqual(ToStringUtils.LongHex((i != 0L) ? unchecked(0x80L * BroadWord.L8_L) : 0x0L), ToStringUtils.LongHex(BroadWord.NotEquals0_8(ii)), ToStringUtils.LongHex(ii) + " <> 0"); + Assert.AreEqual(ToStringUtils.Int64Hex((i != 0L) ? unchecked(0x80L * BroadWord.L8_L) : 0x0L), ToStringUtils.Int64Hex(BroadWord.NotEquals0_8(ii)), ToStringUtils.Int64Hex(ii) + " <> 0"); } } } http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Tests/core/Util/TestFieldCacheSanityChecker.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Tests/core/Util/TestFieldCacheSanityChecker.cs b/src/Lucene.Net.Tests/core/Util/TestFieldCacheSanityChecker.cs index ab2a4e2..8773d2b 100644 --- a/src/Lucene.Net.Tests/core/Util/TestFieldCacheSanityChecker.cs +++ b/src/Lucene.Net.Tests/core/Util/TestFieldCacheSanityChecker.cs @@ -125,8 +125,8 @@ namespace Lucene.Net.Util cache.GetDoubles(ReaderAclone, "theDouble", FieldCache.DEFAULT_DOUBLE_PARSER, false); cache.GetDoubles(ReaderB, "theDouble", FieldCache.DEFAULT_DOUBLE_PARSER, false); - cache.GetInts(ReaderX, "theInt", false); - cache.GetInts(ReaderX, "theInt", FieldCache.DEFAULT_INT_PARSER, false); + cache.GetInt32s(ReaderX, "theInt", false); + cache.GetInt32s(ReaderX, "theInt", FieldCache.DEFAULT_INT_PARSER, false); // // // @@ -147,7 +147,7 @@ namespace Lucene.Net.Util IFieldCache cache = FieldCache.DEFAULT; cache.PurgeAllCaches(); - cache.GetInts(ReaderX, "theInt", FieldCache.DEFAULT_INT_PARSER, false); + cache.GetInt32s(ReaderX, "theInt", FieldCache.DEFAULT_INT_PARSER, false); cache.GetTerms(ReaderX, "theInt", false); #pragma warning disable 612, 618 cache.GetBytes(ReaderX, "theByte", false); http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Tests/core/Util/TestIntsRef.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Tests/core/Util/TestIntsRef.cs b/src/Lucene.Net.Tests/core/Util/TestIntsRef.cs index 2ecf8eb..7b50d74 100644 --- a/src/Lucene.Net.Tests/core/Util/TestIntsRef.cs +++ b/src/Lucene.Net.Tests/core/Util/TestIntsRef.cs @@ -26,7 +26,7 @@ namespace Lucene.Net.Util public virtual void TestEmpty() { IntsRef i = new IntsRef(); - Assert.AreEqual(IntsRef.EMPTY_INTS, i.Ints); + Assert.AreEqual(IntsRef.EMPTY_INTS, i.Int32s); Assert.AreEqual(0, i.Offset); Assert.AreEqual(0, i.Length); } @@ -36,7 +36,7 @@ namespace Lucene.Net.Util { int[] ints = new int[] { 1, 2, 3, 4 }; IntsRef i = new IntsRef(ints, 0, 4); - Assert.AreEqual(ints, i.Ints); + Assert.AreEqual(ints, i.Int32s); Assert.AreEqual(0, i.Offset); Assert.AreEqual(4, i.Length); http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Tests/core/Util/TestNumericUtils.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Tests/core/Util/TestNumericUtils.cs b/src/Lucene.Net.Tests/core/Util/TestNumericUtils.cs index 45614c2..ab14b15 100644 --- a/src/Lucene.Net.Tests/core/Util/TestNumericUtils.cs +++ b/src/Lucene.Net.Tests/core/Util/TestNumericUtils.cs @@ -34,7 +34,7 @@ namespace Lucene.Net.Util BytesRef last = null, act = new BytesRef(NumericUtils.BUF_SIZE_LONG); for (long l = -100000L; l < 100000L; l++) { - NumericUtils.LongToPrefixCodedBytes(l, 0, act); + NumericUtils.Int64ToPrefixCodedBytes(l, 0, act); if (last != null) { // test if smaller @@ -42,7 +42,7 @@ namespace Lucene.Net.Util Assert.IsTrue(last.Utf8ToString().CompareToOrdinal(act.Utf8ToString()) < 0, "actual bigger than last (as String)"); } // test is back and forward conversion works - Assert.AreEqual(l, NumericUtils.PrefixCodedToLong(act), "forward and back conversion should generate same long"); + Assert.AreEqual(l, NumericUtils.PrefixCodedToInt64(act), "forward and back conversion should generate same long"); // next step last = act; act = new BytesRef(NumericUtils.BUF_SIZE_LONG); @@ -56,7 +56,7 @@ namespace Lucene.Net.Util BytesRef last = null, act = new BytesRef(NumericUtils.BUF_SIZE_INT); for (int i = -100000; i < 100000; i++) { - NumericUtils.IntToPrefixCodedBytes(i, 0, act); + NumericUtils.Int32ToPrefixCodedBytes(i, 0, act); if (last != null) { // test if smaller @@ -64,7 +64,7 @@ namespace Lucene.Net.Util Assert.IsTrue(last.Utf8ToString().CompareToOrdinal(act.Utf8ToString()) < 0, "actual bigger than last (as String)"); } // test is back and forward conversion works - Assert.AreEqual(i, NumericUtils.PrefixCodedToInt(act), "forward and back conversion should generate same int"); + Assert.AreEqual(i, NumericUtils.PrefixCodedToInt32(act), "forward and back conversion should generate same int"); // next step last = act; act = new BytesRef(NumericUtils.BUF_SIZE_INT); @@ -80,15 +80,15 @@ namespace Lucene.Net.Util for (int i = 0; i < vals.Length; i++) { prefixVals[i] = new BytesRef(NumericUtils.BUF_SIZE_LONG); - NumericUtils.LongToPrefixCodedBytes(vals[i], 0, prefixVals[i]); + NumericUtils.Int64ToPrefixCodedBytes(vals[i], 0, prefixVals[i]); // check forward and back conversion - Assert.AreEqual(vals[i], NumericUtils.PrefixCodedToLong(prefixVals[i]), "forward and back conversion should generate same long"); + Assert.AreEqual(vals[i], NumericUtils.PrefixCodedToInt64(prefixVals[i]), "forward and back conversion should generate same long"); // test if decoding values as int fails correctly try { - NumericUtils.PrefixCodedToInt(prefixVals[i]); + NumericUtils.PrefixCodedToInt32(prefixVals[i]); Assert.Fail("decoding a prefix coded long value as int should fail"); } #pragma warning disable 168 @@ -111,8 +111,8 @@ namespace Lucene.Net.Util { for (int j = 0; j < 64; j++) { - NumericUtils.LongToPrefixCodedBytes(vals[i], j, @ref); - long prefixVal = NumericUtils.PrefixCodedToLong(@ref); + NumericUtils.Int64ToPrefixCodedBytes(vals[i], j, @ref); + long prefixVal = NumericUtils.PrefixCodedToInt64(@ref); long mask = (1L << j) - 1L; Assert.AreEqual(vals[i] & mask, vals[i] - prefixVal, "difference between prefix val and original value for " + vals[i] + " with shift=" + j); } @@ -128,15 +128,15 @@ namespace Lucene.Net.Util for (int i = 0; i < vals.Length; i++) { prefixVals[i] = new BytesRef(NumericUtils.BUF_SIZE_INT); - NumericUtils.IntToPrefixCodedBytes(vals[i], 0, prefixVals[i]); + NumericUtils.Int32ToPrefixCodedBytes(vals[i], 0, prefixVals[i]); // check forward and back conversion - Assert.AreEqual(vals[i], NumericUtils.PrefixCodedToInt(prefixVals[i]), "forward and back conversion should generate same int"); + Assert.AreEqual(vals[i], NumericUtils.PrefixCodedToInt32(prefixVals[i]), "forward and back conversion should generate same int"); // test if decoding values as long fails correctly try { - NumericUtils.PrefixCodedToLong(prefixVals[i]); + NumericUtils.PrefixCodedToInt64(prefixVals[i]); Assert.Fail("decoding a prefix coded int value as long should fail"); } #pragma warning disable 168 @@ -159,8 +159,8 @@ namespace Lucene.Net.Util { for (int j = 0; j < 32; j++) { - NumericUtils.IntToPrefixCodedBytes(vals[i], j, @ref); - int prefixVal = NumericUtils.PrefixCodedToInt(@ref); + NumericUtils.Int32ToPrefixCodedBytes(vals[i], j, @ref); + int prefixVal = NumericUtils.PrefixCodedToInt32(@ref); int mask = (1 << j) - 1; Assert.AreEqual(vals[i] & mask, vals[i] - prefixVal, "difference between prefix val and original value for " + vals[i] + " with shift=" + j); } @@ -176,8 +176,8 @@ namespace Lucene.Net.Util // check forward and back conversion for (int i = 0; i < vals.Length; i++) { - longVals[i] = NumericUtils.DoubleToSortableLong(vals[i]); - Assert.IsTrue(vals[i].CompareTo(NumericUtils.SortableLongToDouble(longVals[i])) == 0, "forward and back conversion should generate same double"); + longVals[i] = NumericUtils.DoubleToSortableInt64(vals[i]); + Assert.IsTrue(vals[i].CompareTo(NumericUtils.SortableInt64ToDouble(longVals[i])) == 0, "forward and back conversion should generate same double"); } // check sort order (prefixVals should be ascending) @@ -192,11 +192,11 @@ namespace Lucene.Net.Util [Test] public virtual void TestSortableDoubleNaN() { - long plusInf = NumericUtils.DoubleToSortableLong(double.PositiveInfinity); + long plusInf = NumericUtils.DoubleToSortableInt64(double.PositiveInfinity); foreach (double nan in DOUBLE_NANs) { Assert.IsTrue(double.IsNaN(nan)); - long sortable = NumericUtils.DoubleToSortableLong(nan); + long sortable = NumericUtils.DoubleToSortableInt64(nan); Assert.IsTrue((ulong)sortable > (ulong)plusInf, "Double not sorted correctly: " + nan + ", long repr: " + sortable + ", positive inf.: " + plusInf); } } @@ -210,8 +210,8 @@ namespace Lucene.Net.Util // check forward and back conversion for (int i = 0; i < vals.Length; i++) { - intVals[i] = NumericUtils.FloatToSortableInt(vals[i]); - Assert.IsTrue(vals[i].CompareTo(NumericUtils.SortableIntToFloat(intVals[i])) == 0, "forward and back conversion should generate same double"); + intVals[i] = NumericUtils.SingleToSortableInt32(vals[i]); + Assert.IsTrue(vals[i].CompareTo(NumericUtils.SortableInt32ToSingle(intVals[i])) == 0, "forward and back conversion should generate same double"); } // check sort order (prefixVals should be ascending) @@ -221,16 +221,16 @@ namespace Lucene.Net.Util } } - public static readonly float[] FLOAT_NANs = new float[] { float.NaN, Number.IntBitsToFloat(0x7f800001), Number.IntBitsToFloat(0x7fffffff), Number.IntBitsToFloat(unchecked((int)0xff800001)), Number.IntBitsToFloat(unchecked((int)0xffffffff)) }; + public static readonly float[] FLOAT_NANs = new float[] { float.NaN, Number.Int32BitsToSingle(0x7f800001), Number.Int32BitsToSingle(0x7fffffff), Number.Int32BitsToSingle(unchecked((int)0xff800001)), Number.Int32BitsToSingle(unchecked((int)0xffffffff)) }; [Test] public virtual void TestSortableFloatNaN() { - int plusInf = NumericUtils.FloatToSortableInt(float.PositiveInfinity); + int plusInf = NumericUtils.SingleToSortableInt32(float.PositiveInfinity); foreach (float nan in FLOAT_NANs) { Assert.IsTrue(float.IsNaN(nan)); - uint sortable = (uint)NumericUtils.FloatToSortableInt(nan); + uint sortable = (uint)NumericUtils.SingleToSortableInt32(nan); Assert.IsTrue(sortable > plusInf, "Float not sorted correctly: " + nan + ", int repr: " + sortable + ", positive inf.: " + plusInf); } } @@ -246,7 +246,7 @@ namespace Lucene.Net.Util IEnumerator<long> neededBounds = (expectedBounds == null) ? null : expectedBounds.GetEnumerator(); IEnumerator<int> neededShifts = (expectedShifts == null) ? null : expectedShifts.GetEnumerator(); - NumericUtils.SplitLongRange(new LongRangeBuilderAnonymousInnerClassHelper(this, lower, upper, useBitSet, bits, neededBounds, neededShifts), precisionStep, lower, upper); + NumericUtils.SplitInt64Range(new LongRangeBuilderAnonymousInnerClassHelper(this, lower, upper, useBitSet, bits, neededBounds, neededShifts), precisionStep, lower, upper); if (useBitSet) { @@ -446,7 +446,7 @@ namespace Lucene.Net.Util IEnumerator<int> neededBounds = (expectedBounds == null) ? null : expectedBounds.GetEnumerator(); IEnumerator<int> neededShifts = (expectedShifts == null) ? null : expectedShifts.GetEnumerator(); - NumericUtils.SplitIntRange(new IntRangeBuilderAnonymousInnerClassHelper(this, lower, upper, useBitSet, bits, neededBounds, neededShifts), precisionStep, lower, upper); + NumericUtils.SplitInt32Range(new IntRangeBuilderAnonymousInnerClassHelper(this, lower, upper, useBitSet, bits, neededBounds, neededShifts), precisionStep, lower, upper); if (useBitSet) { http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Tests/core/Util/TestRecyclingIntBlockAllocator.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Tests/core/Util/TestRecyclingIntBlockAllocator.cs b/src/Lucene.Net.Tests/core/Util/TestRecyclingIntBlockAllocator.cs index 15c83d6..b218493 100644 --- a/src/Lucene.Net.Tests/core/Util/TestRecyclingIntBlockAllocator.cs +++ b/src/Lucene.Net.Tests/core/Util/TestRecyclingIntBlockAllocator.cs @@ -44,7 +44,7 @@ namespace Lucene.Net.Util { RecyclingIntBlockAllocator allocator = NewAllocator(); HashSet<int[]> set = new HashSet<int[]>(); - int[] block = allocator.GetIntBlock(); + int[] block = allocator.GetInt32Block(); set.Add(block); Assert.IsNotNull(block); int size = block.Length; @@ -52,7 +52,7 @@ namespace Lucene.Net.Util int num = AtLeast(97); for (int i = 0; i < num; i++) { - block = allocator.GetIntBlock(); + block = allocator.GetInt32Block(); Assert.IsNotNull(block); Assert.AreEqual(size, block.Length); Assert.IsTrue(set.Add(block), "block is returned twice"); @@ -67,7 +67,7 @@ namespace Lucene.Net.Util RecyclingIntBlockAllocator allocator = NewAllocator(); HashSet<int[]> allocated = new HashSet<int[]>(); - int[] block = allocator.GetIntBlock(); + int[] block = allocator.GetInt32Block(); allocated.Add(block); Assert.IsNotNull(block); int size = block.Length; @@ -78,7 +78,7 @@ namespace Lucene.Net.Util int num = 1 + Random().Next(39); for (int j = 0; j < num; j++) { - block = allocator.GetIntBlock(); + block = allocator.GetInt32Block(); Assert.IsNotNull(block); Assert.AreEqual(size, block.Length); Assert.IsTrue(allocated.Add(block), "block is returned twice"); @@ -92,7 +92,7 @@ namespace Lucene.Net.Util { selected.Add(array[j]); } - allocator.RecycleIntBlocks(array, begin, end); + allocator.RecycleInt32Blocks(array, begin, end); for (int j = begin; j < end; j++) { Assert.IsNull(array[j]); @@ -109,7 +109,7 @@ namespace Lucene.Net.Util RecyclingIntBlockAllocator allocator = NewAllocator(); HashSet<int[]> allocated = new HashSet<int[]>(); int freeButAllocated = 0; - int[] block = allocator.GetIntBlock(); + int[] block = allocator.GetInt32Block(); allocated.Add(block); Assert.IsNotNull(block); int size = block.Length; @@ -120,7 +120,7 @@ namespace Lucene.Net.Util int num = 1 + Random().Next(39); for (int j = 0; j < num; j++) { - block = allocator.GetIntBlock(); + block = allocator.GetInt32Block(); freeButAllocated = Math.Max(0, freeButAllocated - 1); Assert.IsNotNull(block); Assert.AreEqual(size, block.Length); @@ -136,7 +136,7 @@ namespace Lucene.Net.Util int[] b = array[j]; Assert.IsTrue(allocated.Remove(b)); } - allocator.RecycleIntBlocks(array, begin, end); + allocator.RecycleInt32Blocks(array, begin, end); for (int j = begin; j < end; j++) { Assert.IsNull(array[j]); http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Tests/core/Util/TestSmallFloat.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Tests/core/Util/TestSmallFloat.cs b/src/Lucene.Net.Tests/core/Util/TestSmallFloat.cs index ce38493..a933ccd 100644 --- a/src/Lucene.Net.Tests/core/Util/TestSmallFloat.cs +++ b/src/Lucene.Net.Tests/core/Util/TestSmallFloat.cs @@ -32,7 +32,7 @@ namespace Lucene.Net.Util int mantissa = b & 7; int exponent = (b >> 3) & 31; int bits = ((exponent + (63 - 15)) << 24) | (mantissa << 21); - return Number.IntBitsToFloat(bits); + return Number.Int32BitsToSingle(bits); } // original lucene floatToByte (since lucene 1.3) @@ -48,7 +48,7 @@ namespace Lucene.Net.Util return 0; } - int bits = Number.FloatToIntBits(f); // parse float into parts + int bits = Number.SingleToInt32Bits(f); // parse float into parts int mantissa = (bits & 0xffffff) >> 21; int exponent = (((bits >> 24) & 0x7f) - 63) + 15; @@ -81,7 +81,7 @@ namespace Lucene.Net.Util return 0; } - int bits = Number.FloatToIntBits(f); // parse float into parts + int bits = Number.SingleToInt32Bits(f); // parse float into parts int mantissa = (bits & 0xffffff) >> 21; int exponent = (((bits >> 24) & 0x7f) - 63) + 15; @@ -106,13 +106,13 @@ namespace Lucene.Net.Util for (int i = 0; i < 256; i++) { float f1 = Orig_byteToFloat((sbyte)i); - float f2 = SmallFloat.ByteToFloat((sbyte)i, 3, 15); - float f3 = SmallFloat.Byte315ToFloat((sbyte)i); + float f2 = SmallFloat.ByteToSingle((sbyte)i, 3, 15); + float f3 = SmallFloat.Byte315ToSingle((sbyte)i); Assert.AreEqual(f1, f2, 0.0); Assert.AreEqual(f2, f3, 0.0); - float f4 = SmallFloat.ByteToFloat((sbyte)i, 5, 2); - float f5 = SmallFloat.Byte52ToFloat((sbyte)i); + float f4 = SmallFloat.ByteToSingle((sbyte)i, 5, 2); + float f5 = SmallFloat.Byte52ToSingle((sbyte)i); Assert.AreEqual(f4, f5, 0.0); } } @@ -122,37 +122,37 @@ namespace Lucene.Net.Util { Assert.AreEqual(0, Orig_floatToByte_v13(5.8123817E-10f)); // verify the old bug (see LUCENE-2937) Assert.AreEqual(1, Orig_floatToByte(5.8123817E-10f)); // verify it's fixed in this test code - Assert.AreEqual(1, SmallFloat.FloatToByte315(5.8123817E-10f)); // verify it's fixed + Assert.AreEqual(1, SmallFloat.SingleToByte315(5.8123817E-10f)); // verify it's fixed // test some constants - Assert.AreEqual(0, SmallFloat.FloatToByte315(0)); + Assert.AreEqual(0, SmallFloat.SingleToByte315(0)); //Java's Float.MIN_VALUE equals C#'s float.Epsilon - Assert.AreEqual(1, SmallFloat.FloatToByte315(float.Epsilon)); // underflow rounds up to smallest positive - Assert.AreEqual(255, SmallFloat.FloatToByte315(float.MaxValue) & 0xff); // overflow rounds down to largest positive - Assert.AreEqual(255, SmallFloat.FloatToByte315(float.PositiveInfinity) & 0xff); + Assert.AreEqual(1, SmallFloat.SingleToByte315(float.Epsilon)); // underflow rounds up to smallest positive + Assert.AreEqual(255, SmallFloat.SingleToByte315(float.MaxValue) & 0xff); // overflow rounds down to largest positive + Assert.AreEqual(255, SmallFloat.SingleToByte315(float.PositiveInfinity) & 0xff); // all negatives map to 0 - Assert.AreEqual(0, SmallFloat.FloatToByte315(-float.Epsilon)); - Assert.AreEqual(0, SmallFloat.FloatToByte315(-float.MaxValue)); - Assert.AreEqual(0, SmallFloat.FloatToByte315(float.NegativeInfinity)); + Assert.AreEqual(0, SmallFloat.SingleToByte315(-float.Epsilon)); + Assert.AreEqual(0, SmallFloat.SingleToByte315(-float.MaxValue)); + Assert.AreEqual(0, SmallFloat.SingleToByte315(float.NegativeInfinity)); // up iterations for more exhaustive test after changing something int num = AtLeast(100000); for (int i = 0; i < num; i++) { - float f = Number.IntBitsToFloat(Random().Next()); + float f = Number.Int32BitsToSingle(Random().Next()); if (float.IsNaN(f)) // skip NaN { continue; } sbyte b1 = Orig_floatToByte(f); - sbyte b2 = SmallFloat.FloatToByte(f, 3, 15); - sbyte b3 = SmallFloat.FloatToByte315(f); + sbyte b2 = SmallFloat.SingleToByte(f, 3, 15); + sbyte b3 = SmallFloat.SingleToByte315(f); Assert.AreEqual(b1, b2); Assert.AreEqual(b2, b3); - sbyte b4 = SmallFloat.FloatToByte(f, 5, 2); - sbyte b5 = SmallFloat.FloatToByte52(f); + sbyte b4 = SmallFloat.SingleToByte(f, 5, 2); + sbyte b5 = SmallFloat.SingleToByte52(f); Assert.AreEqual(b4, b5); } } http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Tests/core/Util/TestUnicodeUtil.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Tests/core/Util/TestUnicodeUtil.cs b/src/Lucene.Net.Tests/core/Util/TestUnicodeUtil.cs index ef7314e..d4d40a7 100644 --- a/src/Lucene.Net.Tests/core/Util/TestUnicodeUtil.cs +++ b/src/Lucene.Net.Tests/core/Util/TestUnicodeUtil.cs @@ -176,7 +176,7 @@ namespace Lucene.Net.Util codePoints[intUpto++] = cp; charUpto += Character.CharCount(cp); } - if (!ArrayUtil.Equals(codePoints, 0, utf32.Ints, utf32.Offset, intUpto)) + if (!ArrayUtil.Equals(codePoints, 0, utf32.Int32s, utf32.Offset, intUpto)) { Console.WriteLine("FAILED"); for (int j = 0; j < s.Length; j++) @@ -187,7 +187,7 @@ namespace Lucene.Net.Util Assert.AreEqual(intUpto, utf32.Length); for (int j = 0; j < intUpto; j++) { - Console.WriteLine(" " + utf32.Ints[j].ToString("x") + " vs " + codePoints[j].ToString("x")); + Console.WriteLine(" " + utf32.Int32s[j].ToString("x") + " vs " + codePoints[j].ToString("x")); } Assert.Fail("mismatch"); }
