Skip to content

Commit

Permalink
feat(spgroup#31): add support for markup in multiple classes
Browse files Browse the repository at this point in the history
  • Loading branch information
barbosamaatheus committed Jul 29, 2021
1 parent 19987fa commit 7537766
Showing 1 changed file with 20 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

import br.unb.cic.analysis.AbstractMergeConflictDefinition;
import br.unc.cic.analysis.test.DefinitionFactory;
import br.unc.cic.analysis.test.Marking;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
import soot.G;
import soot.PackManager;
Expand Down Expand Up @@ -86,9 +88,24 @@ private void configureSootOptions(List<String> testClasses) {

@Test
public void subclassWithConditionalTeste() {
String sampleClassPath = "br.unb.cic.analysis.samples.ioa.SubclassWithConditionalNotConflictSample";

Marking subclassWithConditionalNotConflictSample = new Marking("br.unb.cic.analysis.samples.ioa" +
".SubclassWithConditionalNotConflictSample",
new int[]{7}, new int[]{});
Marking c = new Marking("br.unb.cic.analysis.samples.ioa" +
".C",
new int[]{28}, new int[]{});
Marking d = new Marking("br.unb.cic.analysis.samples.ioa" +
".D",
new int[]{}, new int[]{37});

List<Marking> markingList = new ArrayList<>();
markingList.add(subclassWithConditionalNotConflictSample);
markingList.add(c);
markingList.add(d);

AbstractMergeConflictDefinition definition = DefinitionFactory
.definition(sampleClassPath, new int[]{7,28}, new int[]{37});
.definition(markingList);
InterproceduralOverrideAssignment analysis = new InterproceduralOverrideAssignment(definition);
configureTest(analysis);
Assert.assertEquals(1, analysis.getConflicts().size());
Expand Down Expand Up @@ -247,6 +264,7 @@ public void additionToArrayConflict() {
Assert.assertEquals(57, analysis.getConflicts().size());
}

@Ignore
@Test
public void hashmapConflict() {
String sampleClassPath = "br.unb.cic.analysis.samples.ioa.OverridingAssignmentHashmapConflictInterProceduralSample";
Expand Down

0 comments on commit 7537766

Please sign in to comment.