// try samples
SortedSet set = new TreeSet();
for (int i = 0; i < testArray.length; ++i) {
//logln("Results for: " + name.transliterate(testArray[i]));
CanonicalIterator it = new CanonicalIterator(testArray[i][0]);
// int counter = 0;
set.clear();
String first = null;
while (true) {
String result = it.next();
if(first==null){
first = result;
}
if (result == null) break;
set.add(result); // sort them
//logln(++counter + ": " + hex.transliterate(result));
//logln(" = " + name.transliterate(result));
}
expectEqual(i + ": ", testArray[i][0], collectionToString(set), testArray[i][1]);
it.reset();
if(!it.next().equals(first)){
errln("CanonicalIterator.reset() failed");
}
if(!it.getSource().equals(Normalizer.normalize(testArray[i][0],Normalizer.NFD))){
errln("CanonicalIterator.getSource() does not return NFD of input source");
}
}
}