diagnostics

This commit is contained in:
Alexey Kudravtsev
2013-12-04 13:06:03 +04:00
parent 81ed6c6b4e
commit 9a87f77723
@@ -149,7 +149,13 @@ public class SliceTreeTest extends SliceTestCase {
Collection<PsiElement> leaves = SliceLeafAnalyzer.calcLeafExpressions(root, treeStructure, SliceLeafAnalyzer.createMap());
assertNotNull(leaves);
List<PsiElement> list = new ArrayList<PsiElement>(leaves);
assertEquals(list.toString(), 2, leaves.size());
String message = ContainerUtil.map(list, new Function<PsiElement, String>() {
@Override
public String fun(PsiElement element) {
return element.getClass() +": '"+element.getText()+"' ("+System.identityHashCode(element)+") ";
}
}).toString();
assertEquals(message, 2, leaves.size());
Collections.sort(list, new Comparator<PsiElement>() {
@Override
public int compare(PsiElement o1, PsiElement o2) {