add a note why we use this strange comparator for this test (and not the standard one)

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1027951 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Uwe Schindler 2010-10-27 13:13:58 +00:00
parent c62a0192bc
commit 07a5f01b26
1 changed files with 2 additions and 0 deletions

View File

@ -174,6 +174,8 @@ public class TestBytesRefHash extends LuceneTestCase {
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;