diff --git a/src/test/java/br/unb/cic/analysis/ioa/InterproceduralOverridingAssignmentAnalysisTest.java b/src/test/java/br/unb/cic/analysis/ioa/InterproceduralOverridingAssignmentAnalysisTest.java index 24c4eac8..270b5511 100644 --- a/src/test/java/br/unb/cic/analysis/ioa/InterproceduralOverridingAssignmentAnalysisTest.java +++ b/src/test/java/br/unb/cic/analysis/ioa/InterproceduralOverridingAssignmentAnalysisTest.java @@ -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()); + } + } diff --git a/src/test/java/br/unb/cic/analysis/samples/OverridingAssignmentBranchConflictInterProceduralSample.java b/src/test/java/br/unb/cic/analysis/samples/OverridingAssignmentIfBranchConflictInterProceduralSample.java similarity index 81% rename from src/test/java/br/unb/cic/analysis/samples/OverridingAssignmentBranchConflictInterProceduralSample.java rename to src/test/java/br/unb/cic/analysis/samples/OverridingAssignmentIfBranchConflictInterProceduralSample.java index f66a959d..eb4e9244 100644 --- a/src/test/java/br/unb/cic/analysis/samples/OverridingAssignmentBranchConflictInterProceduralSample.java +++ b/src/test/java/br/unb/cic/analysis/samples/OverridingAssignmentIfBranchConflictInterProceduralSample.java @@ -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() {