Author: akazakov
Date: 2011-10-07 16:14:37 -0400 (Fri, 07 Oct 2011)
New Revision: 35481
Modified:
trunk/common/plugins/org.jboss.tools.common.base.test/src/org/jboss/tools/common/base/test/contentassist/AbstractContentAssistantTestCase.java
Log:
https://issues.jboss.org/browse/JBIDE-9868
org.jboss.tools.jsf.jsp.ca.test.CAForJSF2BeansInJavaTest failure
Modified:
trunk/common/plugins/org.jboss.tools.common.base.test/src/org/jboss/tools/common/base/test/contentassist/AbstractContentAssistantTestCase.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.base.test/src/org/jboss/tools/common/base/test/contentassist/AbstractContentAssistantTestCase.java 2011-10-07
20:01:13 UTC (rev 35480)
+++
trunk/common/plugins/org.jboss.tools.common.base.test/src/org/jboss/tools/common/base/test/contentassist/AbstractContentAssistantTestCase.java 2011-10-07
20:14:37 UTC (rev 35481)
@@ -104,19 +104,24 @@
// }
ICompletionProposal[] result = res.toArray(new ICompletionProposal[res.size()]);
+ StringBuffer sb = new StringBuffer("[");
+ for (ICompletionProposal p : result) {
+ sb.append(p.getDisplayString()).append(", ");
+ }
+ sb.append("]");
int foundCounter = 0;
for (int i = 0; i < proposals.length; i++) {
boolean found = compareProposal(proposals[i], result);
if (found)
foundCounter++;
- assertTrue("Proposal " + proposals[i] + " not found!",
found ); //$NON-NLS-1$ //$NON-NLS-2$
+ assertTrue("Proposal " + proposals[i] + " not found! Found
proposals: " + sb.toString(), found ); //$NON-NLS-1$ //$NON-NLS-2$
}
if (exactly) {
if (excludeELProposalsFromExactTest) {
- assertTrue("Some other proposals were found!", foundCounter ==
proposals.length); //$NON-NLS-1$
+ assertEquals("Some other proposals were found! Found proposals: " +
sb.toString(), foundCounter, proposals.length); //$NON-NLS-1$
} else {
- assertTrue("Some other proposals were found!", result.length ==
proposals.length); //$NON-NLS-1$
+ assertEquals("Some other proposals were found! Found proposals: " +
sb.toString(), result.length, proposals.length); //$NON-NLS-1$
}
}