Skip to content

Commit

Permalink
Merge pull request #82 from eMoflon/fixed-tgg-tests
Browse files Browse the repository at this point in the history
Enable sucessful, but ignored TGG tests
  • Loading branch information
anthonyanjorin authored Jun 22, 2018
2 parents 472cfb2 + 596359e commit 538a3e3
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,43 +6,40 @@
import Database.DB;
import testsuite.ibex.ClassInhHier2DB_MA.sync.util.SyncTestCaseCD2DB;

public class AlternatingSync extends SyncTestCaseCD2DB {

public class AlternatingSync extends SyncTestCaseCD2DB{

@Test
public void testCreateTableThenSubClass() {
tool.performAndPropagateTargetEdit(util.execute( (DB db) -> helperDB.createTable(db, "C1")));
tool.performAndPropagateTargetEdit(util.execute((DB db) -> helperDB.createTable(db, "C1")));
tool.performAndPropagateSourceEdit(p -> helperClass.createSubClass(p, "SC1", 0));
assertPostcondition("in/04_SubClassToTable_FWD", "expected/04_SubClassToTable_FWD");
}

@Test
public void testAddSubAttributeDeleteColumn() {
tool.performAndPropagateTargetEdit(util.execute( (DB db) -> helperDB.createTable(db, "C1")));
tool.performAndPropagateTargetEdit(util.execute((DB db) -> helperDB.createTable(db, "C1")));
tool.performAndPropagateSourceEdit(p -> helperClass.createSubClass(p, "SC1", 0));
//add attribute
tool.performAndPropagateSourceEdit( p -> helperClass.createAttributeInClass(p, "a2", null, 1));
//delete column
// add attribute
tool.performAndPropagateSourceEdit(p -> helperClass.createAttributeInClass(p, "a2", null, 1));
// delete column
tool.performAndPropagateTargetEdit(db -> helperDB.deleteColumnFromTable(db, "a2", "SC1"));
assertPostcondition("in/04_SubClassToTable_FWD", "expected/04_SubClassToTable_FWD");
}
@Ignore("TODO: Robrecht? Problems with deletion!")

@Ignore("TODO: Problems with deletion - non-deterministic!")
@Test
public void testCreateSubClassDeleteSubTable() {
createInheritance();
tool.performAndPropagateTargetEdit(db -> helperDB.deleteTable(db, "SC1"));
assertPostcondition("in/02_ClassToTable_FWD", "expected/02_ClassToTable_FWD");
}
@Ignore("TODO: Robrecht? Problems with deletion!")

@Ignore("TODO: Problems with deletion - non-deterministic!")
@Test
public void testCreateSuperClassDeleteSuperTable() {
createInheritance();
tool.performAndPropagateTargetEdit(db -> helperDB.deleteTable(db, "SC1"));
tool.performAndPropagateTargetEdit(db -> helperDB.deleteTable(db, "C1"));
assertPostcondition("in/01_PackageToDatabase_FWD", "expected/01_PackageToDatabase_FWD");
}


}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import ClassInheritanceHierarchy.ClassPackage;
import testsuite.ibex.ClassInhHier2DB_MA.sync.util.SyncTestCaseCD2DB;


public class SyncForward extends SyncTestCaseCD2DB{

@Test
Expand Down Expand Up @@ -162,8 +161,7 @@ public void testDeleteSubClass_FWD() {
tool.performAndPropagateSourceEdit(p -> helperClass.deleteClass(p, "SC1"));
assertPostcondition("in/02_ClassToTable_FWD", "expected/02_ClassToTable_FWD");
}

@Ignore("FIXME Greg: Why does this fail? We use the same deletion strategy for all other test cases.")

@Test
public void testDeleteIntermediateSuperClass_FWD() {
createInheritance();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import java.io.IOException;

import org.junit.Ignore;
import org.junit.Test;

public class TestContainmentConstraints extends FamiliesToPersonsModelGenTestCase {
Expand All @@ -28,7 +27,6 @@ public void testContainmentConstraintForSameContainmentReference() throws IOExce
* correctly prevents the application of ConnectFather on an already connected mother.
* @throws IOException
*/
@Ignore("Waiting for fix for issue #11 on emoflon-ibex-democles")
@Test
public void testContainmentConstraintForDifferentContainmentReference() throws IOException {
stop.setMaxRuleCount("HandleRegisters", 1);
Expand Down

0 comments on commit 538a3e3

Please sign in to comment.