Search in sources :

Example 6 with InterfaceDecl

use of org.abs_models.frontend.ast.InterfaceDecl in project abstools by abstools.

the class DeltaSamplesTest method test_ticket322_P.

@Test
public void test_ticket322_P() throws Exception {
    Model m = assertTypeCheckFileOk("abssamples/deltas/bug322.abs");
    m.flattenForProduct("P");
    m.flushCache();
    assertFalse(m.hasErrors());
    assertFalse(m.hasTypeErrors());
    InterfaceDecl i = (InterfaceDecl) DeltaTest.findDecl(m, "M", "I");
    assertNotNull(i);
    InterfaceDecl j = (InterfaceDecl) DeltaTest.findDecl(m, "M", "J");
    assertNotNull(j);
}
Also used : Model(org.abs_models.frontend.ast.Model) InterfaceDecl(org.abs_models.frontend.ast.InterfaceDecl) FrontendTest(org.abs_models.frontend.FrontendTest) Test(org.junit.Test)

Example 7 with InterfaceDecl

use of org.abs_models.frontend.ast.InterfaceDecl in project abstools by abstools.

the class DeltaSamplesTest method test_ticket322_Q.

@Test
public void test_ticket322_Q() throws Exception {
    Model m = assertTypeCheckFileOk("abssamples/deltas/bug322.abs");
    m.flattenForProduct("Q");
    m.flushCache();
    assertFalse(m.hasErrors());
    assertFalse(m.hasTypeErrors());
    InterfaceDecl i = (InterfaceDecl) DeltaTest.findDecl(m, "M", "I");
    assertNull(i);
    InterfaceDecl j = (InterfaceDecl) DeltaTest.findDecl(m, "M", "J");
    assertNull(j);
}
Also used : Model(org.abs_models.frontend.ast.Model) InterfaceDecl(org.abs_models.frontend.ast.InterfaceDecl) FrontendTest(org.abs_models.frontend.FrontendTest) Test(org.junit.Test)

Aggregations

InterfaceDecl (org.abs_models.frontend.ast.InterfaceDecl)7 HashSet (java.util.HashSet)4 FrontendTest (org.abs_models.frontend.FrontendTest)3 ClassDecl (org.abs_models.frontend.ast.ClassDecl)3 Model (org.abs_models.frontend.ast.Model)3 Test (org.junit.Test)3 MethodSig (org.abs_models.frontend.ast.MethodSig)2 VarDeclStmt (org.abs_models.frontend.ast.VarDeclStmt)2 ArrayList (java.util.ArrayList)1 ABSTest (org.abs_models.ABSTest)1 DataConstructorExp (org.abs_models.frontend.ast.DataConstructorExp)1 DataTypeUse (org.abs_models.frontend.ast.DataTypeUse)1 FromImport (org.abs_models.frontend.ast.FromImport)1 Import (org.abs_models.frontend.ast.Import)1 InterfaceTypeUse (org.abs_models.frontend.ast.InterfaceTypeUse)1 List (org.abs_models.frontend.ast.List)1 MainBlock (org.abs_models.frontend.ast.MainBlock)1 ModuleDecl (org.abs_models.frontend.ast.ModuleDecl)1 Name (org.abs_models.frontend.ast.Name)1 NamedImport (org.abs_models.frontend.ast.NamedImport)1