use of abs.frontend.ast.Model in project abstools by abstools.
the class InterfaceDeclarationTest method trivial.
@Test
public void trivial() {
Model p = assertParseOk("interface I {} {}");
assertTrue(!p.getErrors().containsErrors());
}
use of abs.frontend.ast.Model in project abstools by abstools.
the class InterfaceDeclarationTest method mutuallyCircular.
@Test
public void mutuallyCircular() {
Model p = assertParseOk("interface I extends J {} interface J extends I {} {}");
assertEquals(2, p.getErrors().getErrorCount());
Iterator<SemanticCondition> i = p.getErrors().iterator();
assertEndsWith(i.next(), CYCLIC_INHERITANCE.withArgs("I"));
assertEndsWith(i.next(), CYCLIC_INHERITANCE.withArgs("J"));
}
use of abs.frontend.ast.Model in project abstools by abstools.
the class InterfaceDeclarationTest method extendingUndefined.
@Test
public void extendingUndefined() {
Model p = assertParseOk("interface J extends I {} {}");
assertEquals(1, p.getErrors().getErrorCount());
assertEndsWith(p.getErrors().getFirstError(), UNKOWN_INTERFACE.withArgs("I"));
}
use of abs.frontend.ast.Model in project abstools by abstools.
the class InterfaceDeclarationTest method circular.
@Test
public void circular() {
Model p = assertParseOk("interface I extends I {} {}");
assertEquals(1, p.getErrors().getErrorCount());
assertEndsWith(p.getErrors().getFirstError(), CYCLIC_INHERITANCE.withArgs("I"));
}
use of abs.frontend.ast.Model in project abstools by abstools.
the class OtherAnalysisTests method awaitRewriteDecl2.
@Test
public void awaitRewriteDecl2() throws Exception {
String deltaDecl = "delta D; modifies class C { adds Unit m() { return await this!m();}}";
Model m = assertParseOk(deltaDecl);
DeltaDecl d = m.findDelta("D");
AwaitAsyncCall a = (AwaitAsyncCall) down(d);
// pity, would like this to work.
assertNotNull(a);
}
Aggregations