Search in sources :

Example 71 with Model

use of abs.frontend.ast.Model in project abstools by abstools.

the class RecoverTest method intfTest3.

@Test
public void intfTest3() {
    Model m = assertParseError(" interface I extends J,K class C { }");
    assertContainsDeclWithName(m, "I");
}
Also used : Model(abs.frontend.ast.Model) Test(org.junit.Test) FrontendTest(abs.frontend.FrontendTest)

Example 72 with Model

use of abs.frontend.ast.Model in project abstools by abstools.

the class RecoverTest method classDeclTest.

@Test
public void classDeclTest() {
    Model m = assertParseError(" class C { class D { }");
    assertContainsDeclWithName(m, "C");
}
Also used : Model(abs.frontend.ast.Model) Test(org.junit.Test) FrontendTest(abs.frontend.FrontendTest)

Example 73 with Model

use of abs.frontend.ast.Model in project abstools by abstools.

the class RecoverTest method classDeclTest3.

@Test
public void classDeclTest3() {
    Model m = assertParseError(" class C implements I { XXX asd statasd asdasd }");
    assertContainsDeclWithName(m, "C");
}
Also used : Model(abs.frontend.ast.Model) Test(org.junit.Test) FrontendTest(abs.frontend.FrontendTest)

Example 74 with Model

use of abs.frontend.ast.Model in project abstools by abstools.

the class RecoverTest method caseExp.

// FIXME: recovery fails:
// @Test
public void caseExp() {
    Model m = assertParseError("interface K {} { Maybe<[Somewhere] K> m = Nothing; " + "[Far] K k = case m { Nothing => null; Just(x) => x; _ => null };  }");
    assertContainsDeclWithName(m, "K");
}
Also used : Model(abs.frontend.ast.Model)

Example 75 with Model

use of abs.frontend.ast.Model in project abstools by abstools.

the class RecoverTest method intfTest.

@Test
public void intfTest() {
    Model m = assertParseError(" interface I { class C { }");
    assertContainsDeclWithName(m, "I");
}
Also used : Model(abs.frontend.ast.Model) Test(org.junit.Test) FrontendTest(abs.frontend.FrontendTest)

Aggregations

Model (abs.frontend.ast.Model)224 Test (org.junit.Test)170 FrontendTest (abs.frontend.FrontendTest)93 ClassDecl (abs.frontend.ast.ClassDecl)57 DeltaDecl (abs.frontend.ast.DeltaDecl)30 SemanticConditionList (abs.frontend.analyser.SemanticConditionList)24 FunctionDecl (abs.frontend.ast.FunctionDecl)15 PrintStream (java.io.PrintStream)14 ModifyClassModifier (abs.frontend.ast.ModifyClassModifier)12 SkipStmt (abs.frontend.ast.SkipStmt)11 AbsNature (org.absmodels.abs.plugin.builder.AbsNature)11 ExpFunctionDef (abs.frontend.ast.ExpFunctionDef)9 ModuleDecl (abs.frontend.ast.ModuleDecl)9 CompilationUnit (abs.frontend.ast.CompilationUnit)7 DeltaTraitModifier (abs.frontend.ast.DeltaTraitModifier)7 ModifyMethodModifier (abs.frontend.ast.ModifyMethodModifier)7 PartialFunctionDecl (abs.frontend.ast.PartialFunctionDecl)7 PureExp (abs.frontend.ast.PureExp)7 TraitExpr (abs.frontend.ast.TraitExpr)7 WrongProgramArgumentException (abs.common.WrongProgramArgumentException)6