mirror of
https://github.com/sigmasternchen/xtext-core
synced 2025-03-16 08:48:55 +00:00
[xtend][validation] field initializers cannot be void
Change-Id: I6c977e8e7f1851f152d06eccf835e26b0c655c21
This commit is contained in:
parent
5ecf7c2f74
commit
205cf3d1dc
1 changed files with 19 additions and 2 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue