Skip to content

Commit

Permalink
test(spgroup#31): add if branch test case
Browse files Browse the repository at this point in the history
  • Loading branch information
barbosamaatheus committed Dec 22, 2020
1 parent 380327d commit a579687
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -125,5 +125,15 @@ public void objectFieldNotConflict() {
Assert.assertEquals(0, analysis.getConflicts().size());
}

@Test
public void ifBranchConflict() {
String sampleClassPath = "br.unb.cic.analysis.samples.OverridingAssignmentIfBranchConflictInterProceduralSample";
AbstractMergeConflictDefinition definition = DefinitionFactory
.definition(sampleClassPath, new int[]{8}, new int[]{9});
InterproceduralOverrideAssignment analysis = new InterproceduralOverrideAssignment(definition);
configureTest(analysis);
Assert.assertEquals(1, analysis.getConflicts().size());
}


}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package br.unb.cic.analysis.samples;

// Conflict: [left, m():8] --> [right, foo():14]
public class OverridingAssignmentBranchConflictInterProceduralSample {
public class OverridingAssignmentIfBranchConflictInterProceduralSample {
private int x;

public void m() {
Expand Down

0 comments on commit a579687

Please sign in to comment.