From 753776605d583332e513e66d04ddeec084bc5757 Mon Sep 17 00:00:00 2001 From: Matheus Barbosa Date: Thu, 29 Jul 2021 16:34:25 -0300 Subject: [PATCH] feat(#31): add support for markup in multiple classes --- ...duralOverridingAssignmentAnalysisTest.java | 22 +++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) 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 fb609a96..75b5c624 100644 --- a/src/test/java/br/unb/cic/analysis/ioa/InterproceduralOverridingAssignmentAnalysisTest.java +++ b/src/test/java/br/unb/cic/analysis/ioa/InterproceduralOverridingAssignmentAnalysisTest.java @@ -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; @@ -86,9 +88,24 @@ private void configureSootOptions(List 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 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()); @@ -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";