From 55b373f5ed29031bbd891075bb4a8d10e0174bf9 Mon Sep 17 00:00:00 2001 From: Uwe Schindler Date: Thu, 22 Jul 2010 13:02:20 +0000 Subject: [PATCH] As BytesRef has now native order use them in numeric tests. The contents are raw byte[] and no strings, it should compare native git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@966633 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/test/org/apache/lucene/util/TestNumericUtils.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lucene/src/test/org/apache/lucene/util/TestNumericUtils.java b/lucene/src/test/org/apache/lucene/util/TestNumericUtils.java index cc945133691..1bb32b2bd81 100644 --- a/lucene/src/test/org/apache/lucene/util/TestNumericUtils.java +++ b/lucene/src/test/org/apache/lucene/util/TestNumericUtils.java @@ -31,7 +31,7 @@ public class TestNumericUtils extends LuceneTestCase { NumericUtils.longToPrefixCoded(l, 0, act); if (last!=null) { // test if smaller - assertTrue("actual bigger than last (BytesRef)", BytesRef.getUTF8SortedAsUnicodeComparator().compare(last, act) < 0 ); + assertTrue("actual bigger than last (BytesRef)", last.compareTo(act) < 0 ); assertTrue("actual bigger than last (as String)", last.utf8ToString().compareTo(act.utf8ToString()) < 0 ); } // test is back and forward conversion works @@ -49,7 +49,7 @@ public class TestNumericUtils extends LuceneTestCase { NumericUtils.intToPrefixCoded(i, 0, act); if (last!=null) { // test if smaller - assertTrue("actual bigger than last (BytesRef)", BytesRef.getUTF8SortedAsUnicodeComparator().compare(last, act) < 0 ); + assertTrue("actual bigger than last (BytesRef)", last.compareTo(act) < 0 ); assertTrue("actual bigger than last (as String)", last.utf8ToString().compareTo(act.utf8ToString()) < 0 ); } // test is back and forward conversion works @@ -85,7 +85,7 @@ public class TestNumericUtils extends LuceneTestCase { // check sort order (prefixVals should be ascending) for (int i=1; i