use of abs.frontend.ast.Model in project abstools by abstools.
the class RecoverTest method intfTest4.
@Test
public void intfTest4() {
Model m = assertParseError(" interface I { I m() } class C { }");
assertContainsDeclWithName(m, "I");
}
use of abs.frontend.ast.Model in project abstools by abstools.
the class RecoverTest method importTest.
@Test
public void importTest() {
Model m = assertParseError("x class C { }");
assertContainsDeclWithName(m, "C");
}
use of abs.frontend.ast.Model in project abstools by abstools.
the class AnnotationTests method testMethodParam.
@Test
public void testMethodParam() {
Model m = assertParseOkAnn("class C { Unit m([Far] I i) { } }");
ClassDecl decl = getFirstClassDecl(m);
assertHasLocAnnotation(decl.getMethod(0).getMethodSig().getParam(0).getType(), "Far");
}
use of abs.frontend.ast.Model in project abstools by abstools.
the class AnnotationTests method testClassParam.
@Test
public void testClassParam() {
Model m = assertParseOkAnn("class C([Far] I i) { }");
ClassDecl decl = getFirstClassDecl(m);
assertHasLocAnnotation(decl.getParam(0).getType(), "Far");
}
use of abs.frontend.ast.Model in project abstools by abstools.
the class ABSUnitTestCaseTranslator method validateOutput.
private void validateOutput() {
CompilationUnit unit = new CompilationUnit();
ModuleDecl cm = module.treeCopyNoTransform();
unit.addModuleDecl(cm);
for (DeltaWrapper d : deltas) {
unit.addDeltaDecl(d.getDelta().treeCopyNoTransform());
}
unit.setProductLine(productline.treeCopyNoTransform());
unit.addProductDecl(product.treeCopyNoTransform());
Model copy = model.treeCopyNoTransform();
copy.addCompilationUnit(unit);
validateOutput(copy.treeCopyNoTransform(), null);
validateOutput(copy.treeCopyNoTransform(), module.getName().concat(".").concat(PRODUCT_NAME));
}
Aggregations