You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by us...@apache.org on 2010/10/27 15:13:59 UTC
svn commit: r1027951 -
/lucene/dev/trunk/lucene/src/test/org/apache/lucene/util/TestBytesRefHash.java
Author: uschindler
Date: Wed Oct 27 13:13:58 2010
New Revision: 1027951
URL: http://svn.apache.org/viewvc?rev=1027951&view=rev
Log:
add a note why we use this strange comparator for this test (and not the standard one)
Modified:
lucene/dev/trunk/lucene/src/test/org/apache/lucene/util/TestBytesRefHash.java
Modified: lucene/dev/trunk/lucene/src/test/org/apache/lucene/util/TestBytesRefHash.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/src/test/org/apache/lucene/util/TestBytesRefHash.java?rev=1027951&r1=1027950&r2=1027951&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/src/test/org/apache/lucene/util/TestBytesRefHash.java (original)
+++ lucene/dev/trunk/lucene/src/test/org/apache/lucene/util/TestBytesRefHash.java Wed Oct 27 13:13:58 2010
@@ -174,6 +174,8 @@ public class TestBytesRefHash extends Lu
hash.add(ref);
strings.add(str);
}
+ // We use the UTF-16 comparator here, because we need to be able to
+ // compare to native String.compareTo() [UTF-16]:
int[] sort = hash.sort(BytesRef.getUTF8SortedAsUTF16Comparator());
assertTrue(strings.size() < sort.length);
int i = 0;