[xtend][validation] field initializers cannot be void

Change-Id: I6c977e8e7f1851f152d06eccf835e26b0c655c21
This commit is contained in:
Jan Koehnlein 2013-02-21 14:41:46 +01:00
parent 5ecf7c2f74
commit 205cf3d1dc

View file

@ -127,8 +127,25 @@ public class ValidationTestHelper {
return false;
}
});
if (Iterables.isEmpty(matchingErrors))
fail("Expected "+severity+" '" + code + "' but got " + validate);
if (Iterables.isEmpty(matchingErrors)) {
StringBuilder message = new StringBuilder("Expected ")
.append(severity)
.append(" '")
.append(code)
.append("' on ")
.append(objectType.getName())
.append(" but got\n");
for(Issue issue: validate) {
EObject eObject = model.eResource().getResourceSet().getEObject(issue.getUriToProblem(), true);
message.append(issue.getSeverity())
.append(" '")
.append(issue.getCode())
.append("' on ")
.append(eObject.eClass().getName())
.append("\n");
}
fail(message.toString());
}
}
public void assertWarning(final EObject model, final EClass objectType, final String code,