diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2BaseTest.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2BaseTest.java index c70de27a89b..16fd77eb2c9 100644 --- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2BaseTest.java +++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2BaseTest.java @@ -297,7 +297,15 @@ public class AST2BaseTest extends BaseTestCase { return null; return nameList.get(idx); } - public int size() { return nameList.size(); } + public int size() { return nameList.size(); } + + public void dump() { + for(int i=0; i statusLog= Collections.synchronizedList(new ArrayList()); ILogListener logListener= new ILogListener() { public void logging(IStatus status, String plugin) { if(!status.isOK() && status.getSeverity() != IStatus.INFO) { @@ -143,13 +143,20 @@ public class BaseTestCase extends TestCase { msg.append("non-OK status objects differs from actual ("+statusLog.size()+").\n"); Throwable cause= null; if(!statusLog.isEmpty()) { - for(Iterator i= statusLog.iterator(); i.hasNext(); ) { - IStatus status= (IStatus) i.next(); - if(cause==null) { - cause= status.getException(); + for(IStatus status : statusLog) { + IStatus[] ss= {status}; + ss= status instanceof MultiStatus ? ((MultiStatus)status).getChildren() : ss; + for(IStatus s : ss) { + msg.append("\t"+s.getMessage()+" "); + + Throwable t= s.getException(); + cause= (cause==null) ? t : cause; + if(t != null) { + msg.append(t.getMessage()!=null ? t.getMessage() : t.getClass().getCanonicalName()); + } + + msg.append("\n"); } - Throwable t= status.getException(); - msg.append("\t"+status.getMessage()+" "+(t!=null?t.getMessage():"")+"\n"); } } AssertionFailedError afe= new AssertionFailedError(msg.toString());