diff --git a/pom.xml b/pom.xml
index 3af37678..67fd7f6e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -39,23 +39,11 @@
-
- commons-io
- commons-io
- 2.7
-
-
+
junit
junit
- 4.13.1
-
-
-
- org.mockito
- mockito-core
- 3.11.2
- test
+ 4.13.2
@@ -82,12 +70,25 @@
5.3.2
+
eu.stamp-project
test-runner
3.0.0-SNAPSHOT
+
+ fr.inria.gforge.spoon
+ spoon-core
+ 9.1.0-SNAPSHOT
+
+
+ log4j
+ log4j
+
+
+
+
log4j
log4j
@@ -101,27 +102,21 @@
- org.apache.maven
- maven-core
- 3.8.1
+ info.picocli
+ picocli
+ 4.6.1
- fr.inria.gforge.spoon
- spoon-core
- 9.1.0-SNAPSHOT
-
-
- log4j
- log4j
-
-
+ com.google.code.gson
+ gson
+ 2.8.7
- info.picocli
- picocli
- 4.6.1
+ net.sf.supercsv
+ super-csv
+ 2.4.0
@@ -132,16 +127,12 @@
test
+
- com.google.code.gson
- gson
- 2.8.7
-
-
-
- net.sf.supercsv
- super-csv
- 2.4.0
+ org.mockito
+ mockito-core
+ 3.11.2
+ test
diff --git a/src/main/java/fr/spoonlabs/flacoco/cli/export/JSONExporter.java b/src/main/java/fr/spoonlabs/flacoco/cli/export/JSONExporter.java
index 2f7c5c4c..dbb44803 100644
--- a/src/main/java/fr/spoonlabs/flacoco/cli/export/JSONExporter.java
+++ b/src/main/java/fr/spoonlabs/flacoco/cli/export/JSONExporter.java
@@ -1,7 +1,7 @@
package fr.spoonlabs.flacoco.cli.export;
-import com.google.common.reflect.TypeToken;
import com.google.gson.Gson;
+import com.google.gson.reflect.TypeToken;
import fr.spoonlabs.flacoco.api.Suspiciousness;
import java.io.IOException;
diff --git a/src/main/java/fr/spoonlabs/flacoco/core/coverage/framework/TestFrameworkStrategy.java b/src/main/java/fr/spoonlabs/flacoco/core/coverage/framework/TestFrameworkStrategy.java
index 38d870a0..d43fe076 100644
--- a/src/main/java/fr/spoonlabs/flacoco/core/coverage/framework/TestFrameworkStrategy.java
+++ b/src/main/java/fr/spoonlabs/flacoco/core/coverage/framework/TestFrameworkStrategy.java
@@ -45,7 +45,7 @@ protected String computeClasspath() {
String junitClasspath;
String jacocoClassPath;
- junitClasspath = mavenHome + "junit/junit/4.12/junit-4.12.jar" + File.pathSeparatorChar
+ junitClasspath = mavenHome + "junit/junit/4.13.2/junit-4.13.2.jar" + File.pathSeparatorChar
+ mavenHome + "org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar" + File.pathSeparatorChar
+ mavenHome + "org/junit/jupiter/junit-jupiter-api/5.3.2/junit-jupiter-api-5.3.2.jar" + File.pathSeparatorChar
+ mavenHome + "org/apiguardian/apiguardian-api/1.0.0/apiguardian-api-1.0.0.jar" + File.pathSeparatorChar
diff --git a/src/test/java/fr/spoonlabs/flacoco/api/FlacocoTest.java b/src/test/java/fr/spoonlabs/flacoco/api/FlacocoTest.java
index 03978ae2..f1542274 100644
--- a/src/test/java/fr/spoonlabs/flacoco/api/FlacocoTest.java
+++ b/src/test/java/fr/spoonlabs/flacoco/api/FlacocoTest.java
@@ -57,7 +57,7 @@ public void testExampleFL1SpectrumBasedOchiaiDefaultMode() {
System.out.println("" + line + " " + susp.get(line));
}
- assertEquals(4, susp.size());
+ assertEquals(6, susp.size());
// Line executed only by the failing
assertEquals(1.0, susp.get("fr/spoonlabs/FLtest1/Calculator@-@15").getScore(), 0);
@@ -68,6 +68,8 @@ public void testExampleFL1SpectrumBasedOchiaiDefaultMode() {
// Lines executed by all test
assertEquals(0.5, susp.get("fr/spoonlabs/FLtest1/Calculator@-@10").getScore(), 0);
+ assertEquals(0.5, susp.get("fr/spoonlabs/FLtest1/Calculator@-@5").getScore(), 0);
+ assertEquals(0.5, susp.get("fr/spoonlabs/FLtest1/Calculator@-@6").getScore(), 0);
}
@Test
@@ -121,7 +123,7 @@ public void testExampleFL1SpectrumBasedOchiaiDefaultModeIncludeZero() {
}
// all lines are returned
- assertEquals(8, susp.size());
+ assertEquals(10, susp.size());
// Line executed only by the failing
assertEquals(1.0, susp.get("fr/spoonlabs/FLtest1/Calculator@-@15").getScore(), 0);
@@ -132,6 +134,8 @@ public void testExampleFL1SpectrumBasedOchiaiDefaultModeIncludeZero() {
// Lines executed by all test
assertEquals(0.5, susp.get("fr/spoonlabs/FLtest1/Calculator@-@10").getScore(), 0);
+ assertEquals(0.5, susp.get("fr/spoonlabs/FLtest1/Calculator@-@5").getScore(), 0);
+ assertEquals(0.5, susp.get("fr/spoonlabs/FLtest1/Calculator@-@6").getScore(), 0);
// Lines with no failing test executing them have a 0.0 score
assertEquals(0.0, susp.get("fr/spoonlabs/FLtest1/Calculator@-@11").getScore(), 0);
@@ -165,7 +169,7 @@ public void testExampleFL1SpectrumBasedOchiaiDefaultModeManualTestConfig() {
System.out.println("" + line + " " + susp.get(line));
}
- assertEquals(4, susp.size());
+ assertEquals(6, susp.size());
// Line executed only by the failing
assertEquals(1.0, susp.get("fr/spoonlabs/FLtest1/Calculator@-@15").getScore(), 0);
@@ -173,6 +177,8 @@ public void testExampleFL1SpectrumBasedOchiaiDefaultModeManualTestConfig() {
// Line executed by a mix of failing and passing
assertEquals(0.70, susp.get("fr/spoonlabs/FLtest1/Calculator@-@14").getScore(), 0.01);
assertEquals(0.57, susp.get("fr/spoonlabs/FLtest1/Calculator@-@12").getScore(), 0.01);
+ assertEquals(0.5, susp.get("fr/spoonlabs/FLtest1/Calculator@-@5").getScore(), 0);
+ assertEquals(0.5, susp.get("fr/spoonlabs/FLtest1/Calculator@-@6").getScore(), 0);
// Lines executed by all test
assertEquals(0.5, susp.get("fr/spoonlabs/FLtest1/Calculator@-@10").getScore(), 0);
@@ -200,7 +206,7 @@ public void testExampleFL2SpectrumBasedOchiaiDefaultMode() {
System.out.println("susp " + line + " " + susp.get(line));
}
- assertEquals(6, susp.keySet().size());
+ assertEquals(8, susp.keySet().size());
// Line executed only by the failing
assertEquals(1.0, susp.get("fr/spoonlabs/FLtest1/Calculator@-@21").getScore(), 0);
@@ -213,6 +219,8 @@ public void testExampleFL2SpectrumBasedOchiaiDefaultMode() {
// Lines executed by all test
assertEquals(0.44, susp.get("fr/spoonlabs/FLtest1/Calculator@-@12").getScore(), 0.01);
+ assertEquals(0.44, susp.get("fr/spoonlabs/FLtest1/Calculator@-@5").getScore(), 0.01);
+ assertEquals(0.44, susp.get("fr/spoonlabs/FLtest1/Calculator@-@6").getScore(), 0.01);
}
@Test
@@ -233,7 +241,7 @@ public void testExampleFL3SpectrumBasedOchiaiDefaultMode() {
System.out.println("susp " + line + " " + susp.get(line));
}
- assertEquals(5, susp.keySet().size());
+ assertEquals(7, susp.keySet().size());
// Line executed only by the failing
assertEquals(1.0, susp.get("fr/spoonlabs/FLtest1/Calculator@-@21").getScore(), 0);
@@ -245,6 +253,8 @@ public void testExampleFL3SpectrumBasedOchiaiDefaultMode() {
// Lines executed by all test
assertEquals(0.44, susp.get("fr/spoonlabs/FLtest1/Calculator@-@12").getScore(), 0.01);
+ assertEquals(0.44, susp.get("fr/spoonlabs/FLtest1/Calculator@-@5").getScore(), 0.01);
+ assertEquals(0.44, susp.get("fr/spoonlabs/FLtest1/Calculator@-@6").getScore(), 0.01);
}
@Test
@@ -267,7 +277,7 @@ public void testExampleFL1SpectrumBasedOchiaiCoverTestsDefaultMode() {
System.out.println("" + line + " " + susp.get(line));
}
- assertEquals(6, susp.size());
+ assertEquals(8, susp.size());
// Line executed only by the failing
assertEquals(1.0, susp.get("fr/spoonlabs/FLtest1/Calculator@-@15").getScore(), 0);
@@ -280,6 +290,8 @@ public void testExampleFL1SpectrumBasedOchiaiCoverTestsDefaultMode() {
assertEquals(0.5, susp.get("fr/spoonlabs/FLtest1/CalculatorTest@-@9").getScore(), 0);
assertEquals(0.5, susp.get("fr/spoonlabs/FLtest1/CalculatorTest@-@7").getScore(), 0);
assertEquals(0.5, susp.get("fr/spoonlabs/FLtest1/Calculator@-@10").getScore(), 0);
+ assertEquals(0.5, susp.get("fr/spoonlabs/FLtest1/Calculator@-@5").getScore(), 0);
+ assertEquals(0.5, susp.get("fr/spoonlabs/FLtest1/Calculator@-@6").getScore(), 0);
}
@Test
@@ -296,7 +308,8 @@ public void testExampleFL1SpectrumBasedOchiaiSpoonMode() {
// Run default mode
Map susp = flacoco.runSpoon();
- assertEquals(4, susp.size());
+ // The two lines of the (empty) constructor get mapped to the same CtStatement
+ assertEquals(5, susp.size());
for (CtStatement ctStatement : susp.keySet()) {
System.out.println("" + ctStatement + " " + susp.get(ctStatement));
@@ -317,6 +330,7 @@ public void testExampleFL1SpectrumBasedOchiaiSpoonMode() {
break;
// Lines executed by all test
case 10:
+ case 5:
assertEquals(0.5, susp.get(ctStatement).getScore(), 0);
break;
}
@@ -741,7 +755,7 @@ public void testExampleFL7SpectrumBasedOchiaiDefaultMode() {
System.out.println("" + line + " " + susp.get(line));
}
- assertEquals(4, susp.size());
+ assertEquals(6, susp.size());
// Line executed only by the failing
assertEquals(1.0, susp.get("fr/spoonlabs/FLtest1/Calculator@-@15").getScore(), 0);
@@ -752,6 +766,8 @@ public void testExampleFL7SpectrumBasedOchiaiDefaultMode() {
// Lines executed by all test
assertEquals(0.5, susp.get("fr/spoonlabs/FLtest1/Calculator@-@10").getScore(), 0);
+ assertEquals(0.5, susp.get("fr/spoonlabs/FLtest1/Calculator@-@5").getScore(), 0);
+ assertEquals(0.5, susp.get("fr/spoonlabs/FLtest1/Calculator@-@6").getScore(), 0);
}
@Test
@@ -777,7 +793,7 @@ public void testExampleFL8SpectrumBasedOchiaiDefaultMode() {
System.out.println("" + line + " " + susp.get(line));
}
- assertEquals(4, susp.size());
+ assertEquals(6, susp.size());
// Line executed only by the failing
assertEquals(1.0, susp.get("fr/spoonlabs/FLtest1/Calculator@-@15").getScore(), 0);
@@ -788,6 +804,8 @@ public void testExampleFL8SpectrumBasedOchiaiDefaultMode() {
// Lines executed by all test
assertEquals(0.5, susp.get("fr/spoonlabs/FLtest1/Calculator@-@10").getScore(), 0);
+ assertEquals(0.5, susp.get("fr/spoonlabs/FLtest1/Calculator@-@5").getScore(), 0);
+ assertEquals(0.5, susp.get("fr/spoonlabs/FLtest1/Calculator@-@6").getScore(), 0);
}
@Test
@@ -814,7 +832,7 @@ public void testExampleFL8SpectrumBasedOchiaiCoverTestsDefaultMode() {
System.out.println("" + line + " " + susp.get(line));
}
- assertEquals(6, susp.size());
+ assertEquals(8, susp.size());
// Line executed only by the failing
assertEquals(1.0, susp.get("fr/spoonlabs/FLtest1/Calculator@-@15").getScore(), 0);
@@ -827,6 +845,8 @@ public void testExampleFL8SpectrumBasedOchiaiCoverTestsDefaultMode() {
assertEquals(0.5, susp.get("fr/spoonlabs/FLtest1/CalculatorTest@-@9").getScore(), 0);
assertEquals(0.5, susp.get("fr/spoonlabs/FLtest1/CalculatorTest@-@7").getScore(), 0);
assertEquals(0.5, susp.get("fr/spoonlabs/FLtest1/Calculator@-@10").getScore(), 0);
+ assertEquals(0.5, susp.get("fr/spoonlabs/FLtest1/Calculator@-@5").getScore(), 0);
+ assertEquals(0.5, susp.get("fr/spoonlabs/FLtest1/Calculator@-@6").getScore(), 0);
}
@Test
@@ -847,7 +867,8 @@ public void testExampleFL8SpectrumBasedOchiaiSpoonMode() {
// Run default mode
Map susp = flacoco.runSpoon();
- assertEquals(4, susp.size());
+ // The two lines of the (empty) constructor get mapped to the same CtStatement
+ assertEquals(5, susp.size());
for (CtStatement ctStatement : susp.keySet()) {
System.out.println("" + ctStatement + " " + susp.get(ctStatement));
@@ -868,6 +889,7 @@ public void testExampleFL8SpectrumBasedOchiaiSpoonMode() {
break;
// Lines executed by all test
case 10:
+ case 5:
assertEquals(0.5, susp.get(ctStatement).getScore(), 0);
break;
}
@@ -896,7 +918,7 @@ public void testExampleFL9SpectrumBasedOchiaiDefaultMode() {
System.out.println("" + line + " " + susp.get(line));
}
- assertEquals(4, susp.size());
+ assertEquals(6, susp.size());
// Line executed only by the failing
assertEquals(1.0, susp.get("fr/spoonlabs/FLtest1/Calculator@-@15").getScore(), 0);
@@ -907,6 +929,8 @@ public void testExampleFL9SpectrumBasedOchiaiDefaultMode() {
// Lines executed by all test
assertEquals(0.5, susp.get("fr/spoonlabs/FLtest1/Calculator@-@10").getScore(), 0);
+ assertEquals(0.5, susp.get("fr/spoonlabs/FLtest1/Calculator@-@5").getScore(), 0);
+ assertEquals(0.5, susp.get("fr/spoonlabs/FLtest1/Calculator@-@6").getScore(), 0);
}
@Test
@@ -927,7 +951,8 @@ public void testExampleFL9SpectrumBasedOchiaiSpoonMode() {
// Run default mode
Map susp = flacoco.runSpoon();
- assertEquals(4, susp.size());
+ // The two lines of the (empty) constructor get mapped to the same CtStatement
+ assertEquals(5, susp.size());
for (CtStatement ctStatement : susp.keySet()) {
System.out.println("" + ctStatement + " " + susp.get(ctStatement));
@@ -948,6 +973,7 @@ public void testExampleFL9SpectrumBasedOchiaiSpoonMode() {
break;
// Lines executed by all test
case 10:
+ case 5:
assertEquals(0.5, susp.get(ctStatement).getScore(), 0);
break;
}
@@ -972,7 +998,7 @@ public void testExampleFL11SpectrumBasedOchiaiDefaultMode() {
System.out.println("" + line + " " + susp.get(line));
}
- assertEquals(6, susp.size());
+ assertEquals(8, susp.size());
// Line executed by all failing test cases
assertEquals(1.0, susp.get("fr/spoonlabs/FLtest1/Calculator@-@14").getScore(), 0.0);
@@ -987,6 +1013,8 @@ public void testExampleFL11SpectrumBasedOchiaiDefaultMode() {
// Line executed by all tests (2 passing, 2 failing)
assertEquals(0.70, susp.get("fr/spoonlabs/FLtest1/Calculator@-@10").getScore(), 0.01);
+ assertEquals(0.70, susp.get("fr/spoonlabs/FLtest1/Calculator@-@5").getScore(), 0.01);
+ assertEquals(0.70, susp.get("fr/spoonlabs/FLtest1/Calculator@-@6").getScore(), 0.01);
}
/**
diff --git a/src/test/java/fr/spoonlabs/flacoco/core/coverage/CoverageRunnerTest.java b/src/test/java/fr/spoonlabs/flacoco/core/coverage/CoverageRunnerTest.java
index 0782d458..29918f89 100644
--- a/src/test/java/fr/spoonlabs/flacoco/core/coverage/CoverageRunnerTest.java
+++ b/src/test/java/fr/spoonlabs/flacoco/core/coverage/CoverageRunnerTest.java
@@ -58,8 +58,8 @@ public void testExampleFL1() {
assertEquals(4, matrix.getTests().size());
assertEquals(1, matrix.getFailingTestCases().size());
- // 8 executed lines
- assertEquals(8, matrix.getResultExecution().keySet().size());
+ // 10 executed lines
+ assertEquals(10, matrix.getResultExecution().keySet().size());
// This line is the first if, so it's covered by all tests
Set firstLineExecuted = matrix.getResultExecution().get("fr/spoonlabs/FLtest1/Calculator@-@10");
@@ -159,8 +159,8 @@ public void testExampleFL2() {
assertEquals(1, matrix.getFailingTestCases().size());
assertEquals(5, matrix.getTests().size());
- // 10 executed lines
- assertEquals(10, matrix.getResultExecution().keySet().size());
+ // 12 executed lines
+ assertEquals(12, matrix.getResultExecution().keySet().size());
// This line is the first if, so it's covered by all tests
Set firstLineExecuted = matrix.getResultExecution().get("fr/spoonlabs/FLtest1/Calculator@-@12");
@@ -196,8 +196,8 @@ public void testExampleFL3() {
assertEquals(1, matrix.getFailingTestCases().size());
assertEquals(5, matrix.getTests().size());
- // 9 executed lines
- assertEquals(9, matrix.getResultExecution().keySet().size());
+ // 11 executed lines
+ assertEquals(11, matrix.getResultExecution().keySet().size());
// This line is the first if, so it's covered by all tests
Set firstLineExecuted = matrix.getResultExecution().get("fr/spoonlabs/FLtest1/Calculator@-@12");
@@ -466,8 +466,8 @@ public void testExampleFL6Mixed() {
assertEquals(4, matrix.getTests().size());
assertEquals(1, matrix.getFailingTestCases().size());
- // 8 executed lines
- assertEquals(8, matrix.getResultExecution().keySet().size());
+ // 10 executed lines
+ assertEquals(10, matrix.getResultExecution().keySet().size());
// This line is the first if, so it's covered by all tests
Set firstLineExecuted = matrix.getResultExecution().get("fr/spoonlabs/FLtest1/Calculator@-@10");
@@ -583,8 +583,8 @@ public void testJVMArgs() {
assertEquals(4, matrix.getTests().size());
assertEquals(1, matrix.getFailingTestCases().size());
- // 8 executed lines
- assertEquals(8, matrix.getResultExecution().keySet().size());
+ // 10 executed lines
+ assertEquals(10, matrix.getResultExecution().keySet().size());
// This line is the first if, so it's covered by all tests
Set firstLineExecuted = matrix.getResultExecution().get("fr/spoonlabs/FLtest1/Calculator@-@10");
@@ -680,8 +680,8 @@ public void testExampleFL7() {
assertEquals(8, matrix.getTests().size());
assertEquals(2, matrix.getFailingTestCases().size());
- // 8 executed lines
- assertEquals(8, matrix.getResultExecution().keySet().size());
+ // 10 executed lines
+ assertEquals(10, matrix.getResultExecution().keySet().size());
// This line is the first if, so it's covered by all tests
Set firstLineExecuted = matrix.getResultExecution().get("fr/spoonlabs/FLtest1/Calculator@-@10");
@@ -782,8 +782,8 @@ public void testExampleFL8() {
assertEquals(4, matrix.getTests().size());
assertEquals(1, matrix.getFailingTestCases().size());
- // 8 executed lines
- assertEquals(8, matrix.getResultExecution().keySet().size());
+ // 10 executed lines
+ assertEquals(10, matrix.getResultExecution().keySet().size());
// This line is the first if, so it's covered by all tests
Set firstLineExecuted = matrix.getResultExecution().get("fr/spoonlabs/FLtest1/Calculator@-@10");
@@ -883,8 +883,8 @@ public void testExampleFL9() {
assertEquals(8, matrix.getTests().size());
assertEquals(2, matrix.getFailingTestCases().size());
- // 8 executed lines
- assertEquals(8, matrix.getResultExecution().keySet().size());
+ // 10 executed lines
+ assertEquals(10, matrix.getResultExecution().keySet().size());
// This line is the first if, so it's covered by all tests
Set firstLineExecuted = matrix.getResultExecution().get("fr/spoonlabs/FLtest1/Calculator@-@10");
@@ -980,8 +980,8 @@ public void testExampleFL11() {
assertEquals(4, matrix.getTests().size());
assertEquals(2, matrix.getFailingTestCases().size());
- // 8 executed lines
- assertEquals(8, matrix.getResultExecution().keySet().size());
+ // 10 executed lines
+ assertEquals(10, matrix.getResultExecution().keySet().size());
// This line is the first if, so it's covered by all tests
Set firstLineExecuted = matrix.getResultExecution().get("fr/spoonlabs/FLtest1/Calculator@-@10");
diff --git a/src/test/java/fr/spoonlabs/flacoco/localization/spectrum/SpectrumRunnerTest.java b/src/test/java/fr/spoonlabs/flacoco/localization/spectrum/SpectrumRunnerTest.java
index 9eaaf328..d0450b8b 100644
--- a/src/test/java/fr/spoonlabs/flacoco/localization/spectrum/SpectrumRunnerTest.java
+++ b/src/test/java/fr/spoonlabs/flacoco/localization/spectrum/SpectrumRunnerTest.java
@@ -48,7 +48,7 @@ public void testExampleFL1Ochiai() {
System.out.println("susp " + line + " " + susp.get(line));
}
- assertEquals(4, susp.size());
+ assertEquals(6, susp.size());
// Line executed only by the failing
assertEquals(1.0, susp.get("fr/spoonlabs/FLtest1/Calculator@-@15").getScore(), 0);
@@ -59,6 +59,8 @@ public void testExampleFL1Ochiai() {
// Lines executed by all test
assertEquals(0.5, susp.get("fr/spoonlabs/FLtest1/Calculator@-@10").getScore(), 0);
+ assertEquals(0.5, susp.get("fr/spoonlabs/FLtest1/Calculator@-@5").getScore(), 0);
+ assertEquals(0.5, susp.get("fr/spoonlabs/FLtest1/Calculator@-@6").getScore(), 0);
}
@Test
@@ -76,11 +78,11 @@ public void testExampleFL2Ochiai() {
System.out.println("susp " + line + " " + susp.get(line));
}
- assertEquals(6, susp.size());
+ assertEquals(8, susp.keySet().size());
// Line executed only by the failing
assertEquals(1.0, susp.get("fr/spoonlabs/FLtest1/Calculator@-@21").getScore(), 0);
- assertEquals(1.0, susp.get("fr/spoonlabs/FLtest1/Calculator@-@22").getScore(), 0);
+ assertEquals(1.0, susp.get("fr/spoonlabs/FLtest1/Calculator@-@22").getScore(), 0); // exception thrown here
// Line executed by a mix of failing and passing
assertEquals(0.70, susp.get("fr/spoonlabs/FLtest1/Calculator@-@18").getScore(), 0.01);
@@ -89,6 +91,8 @@ public void testExampleFL2Ochiai() {
// Lines executed by all test
assertEquals(0.44, susp.get("fr/spoonlabs/FLtest1/Calculator@-@12").getScore(), 0.01);
+ assertEquals(0.44, susp.get("fr/spoonlabs/FLtest1/Calculator@-@5").getScore(), 0.01);
+ assertEquals(0.44, susp.get("fr/spoonlabs/FLtest1/Calculator@-@6").getScore(), 0.01);
}
@Test
@@ -106,7 +110,7 @@ public void testExampleFL3Ochiai() {
System.out.println("susp " + line + " " + susp.get(line));
}
- assertEquals(5, susp.size());
+ assertEquals(7, susp.keySet().size());
// Line executed only by the failing
assertEquals(1.0, susp.get("fr/spoonlabs/FLtest1/Calculator@-@21").getScore(), 0);
@@ -118,6 +122,8 @@ public void testExampleFL3Ochiai() {
// Lines executed by all test
assertEquals(0.44, susp.get("fr/spoonlabs/FLtest1/Calculator@-@12").getScore(), 0.01);
+ assertEquals(0.44, susp.get("fr/spoonlabs/FLtest1/Calculator@-@5").getScore(), 0.01);
+ assertEquals(0.44, susp.get("fr/spoonlabs/FLtest1/Calculator@-@6").getScore(), 0.01);
}
@Test
@@ -137,7 +143,7 @@ public void testExampleFL1OchiaiCoverTests() {
System.out.println("susp " + line + " " + susp.get(line));
}
- assertEquals(6, susp.size());
+ assertEquals(8, susp.size());
// Line executed only by the failing
assertEquals(1.0, susp.get("fr/spoonlabs/FLtest1/Calculator@-@15").getScore(), 0);
@@ -150,6 +156,8 @@ public void testExampleFL1OchiaiCoverTests() {
assertEquals(0.5, susp.get("fr/spoonlabs/FLtest1/CalculatorTest@-@9").getScore(), 0);
assertEquals(0.5, susp.get("fr/spoonlabs/FLtest1/CalculatorTest@-@7").getScore(), 0);
assertEquals(0.5, susp.get("fr/spoonlabs/FLtest1/Calculator@-@10").getScore(), 0);
+ assertEquals(0.5, susp.get("fr/spoonlabs/FLtest1/Calculator@-@5").getScore(), 0);
+ assertEquals(0.5, susp.get("fr/spoonlabs/FLtest1/Calculator@-@6").getScore(), 0);
}
@Test
@@ -347,7 +355,7 @@ public void testExampleFL7Ochiai() {
System.out.println("susp " + line + " " + susp.get(line));
}
- assertEquals(4, susp.size());
+ assertEquals(6, susp.size());
// Line executed only by the failing
assertEquals(1.0, susp.get("fr/spoonlabs/FLtest1/Calculator@-@15").getScore(), 0);
@@ -358,6 +366,8 @@ public void testExampleFL7Ochiai() {
// Lines executed by all test
assertEquals(0.5, susp.get("fr/spoonlabs/FLtest1/Calculator@-@10").getScore(), 0);
+ assertEquals(0.5, susp.get("fr/spoonlabs/FLtest1/Calculator@-@5").getScore(), 0);
+ assertEquals(0.5, susp.get("fr/spoonlabs/FLtest1/Calculator@-@6").getScore(), 0);
}
@Test
@@ -379,7 +389,7 @@ public void testExampleFL8Ochiai() {
System.out.println("susp " + line + " " + susp.get(line));
}
- assertEquals(4, susp.size());
+ assertEquals(6, susp.size());
// Line executed only by the failing
assertEquals(1.0, susp.get("fr/spoonlabs/FLtest1/Calculator@-@15").getScore(), 0);
@@ -390,6 +400,8 @@ public void testExampleFL8Ochiai() {
// Lines executed by all test
assertEquals(0.5, susp.get("fr/spoonlabs/FLtest1/Calculator@-@10").getScore(), 0);
+ assertEquals(0.5, susp.get("fr/spoonlabs/FLtest1/Calculator@-@5").getScore(), 0);
+ assertEquals(0.5, susp.get("fr/spoonlabs/FLtest1/Calculator@-@6").getScore(), 0);
}
@Test
@@ -411,7 +423,7 @@ public void testExampleFL9Ochiai() {
System.out.println("susp " + line + " " + susp.get(line));
}
- assertEquals(4, susp.size());
+ assertEquals(6, susp.size());
// Line executed only by the failing
assertEquals(1.0, susp.get("fr/spoonlabs/FLtest1/Calculator@-@15").getScore(), 0);
@@ -422,6 +434,8 @@ public void testExampleFL9Ochiai() {
// Lines executed by all test
assertEquals(0.5, susp.get("fr/spoonlabs/FLtest1/Calculator@-@10").getScore(), 0);
+ assertEquals(0.5, susp.get("fr/spoonlabs/FLtest1/Calculator@-@5").getScore(), 0);
+ assertEquals(0.5, susp.get("fr/spoonlabs/FLtest1/Calculator@-@6").getScore(), 0);
}
@Test
@@ -439,7 +453,7 @@ public void testExampleFL11Ochiai() {
System.out.println("susp " + line + " " + susp.get(line));
}
- assertEquals(6, susp.size());
+ assertEquals(8, susp.size());
// Line executed by all failing test cases
assertEquals(1.0, susp.get("fr/spoonlabs/FLtest1/Calculator@-@14").getScore(), 0.0);
@@ -454,6 +468,8 @@ public void testExampleFL11Ochiai() {
// Line executed by all tests (2 passing, 2 failing)
assertEquals(0.70, susp.get("fr/spoonlabs/FLtest1/Calculator@-@10").getScore(), 0.01);
+ assertEquals(0.70, susp.get("fr/spoonlabs/FLtest1/Calculator@-@5").getScore(), 0.01);
+ assertEquals(0.70, susp.get("fr/spoonlabs/FLtest1/Calculator@-@6").getScore(), 0.01);
}
@Test
diff --git a/src/test/resources/expected.csv b/src/test/resources/expected.csv
index 1825d5cd..ba78672b 100644
--- a/src/test/resources/expected.csv
+++ b/src/test/resources/expected.csv
@@ -1,4 +1,6 @@
fr/spoonlabs/FLtest1/Calculator@-@15,1.0
fr/spoonlabs/FLtest1/Calculator@-@14,0.7071067811865475
fr/spoonlabs/FLtest1/Calculator@-@12,0.5773502691896258
+fr/spoonlabs/FLtest1/Calculator@-@5,0.5
+fr/spoonlabs/FLtest1/Calculator@-@6,0.5
fr/spoonlabs/FLtest1/Calculator@-@10,0.5
diff --git a/src/test/resources/expected.custom b/src/test/resources/expected.custom
index 44adbb9b..10a8eb10 100644
--- a/src/test/resources/expected.custom
+++ b/src/test/resources/expected.custom
@@ -1 +1 @@
-fr/spoonlabs/FLtest1/Calculator@-@15,1.0fr/spoonlabs/FLtest1/Calculator@-@14,0.7071067811865475fr/spoonlabs/FLtest1/Calculator@-@12,0.5773502691896258fr/spoonlabs/FLtest1/Calculator@-@10,0.5
\ No newline at end of file
+fr/spoonlabs/FLtest1/Calculator@-@15,1.0fr/spoonlabs/FLtest1/Calculator@-@14,0.7071067811865475fr/spoonlabs/FLtest1/Calculator@-@12,0.5773502691896258fr/spoonlabs/FLtest1/Calculator@-@5,0.5fr/spoonlabs/FLtest1/Calculator@-@6,0.5fr/spoonlabs/FLtest1/Calculator@-@10,0.5
\ No newline at end of file
diff --git a/src/test/resources/expected.json b/src/test/resources/expected.json
index 77ff1996..16254f5f 100644
--- a/src/test/resources/expected.json
+++ b/src/test/resources/expected.json
@@ -1 +1 @@
-{"fr/spoonlabs/FLtest1/Calculator@-@15":1.0,"fr/spoonlabs/FLtest1/Calculator@-@14":0.7071067811865475,"fr/spoonlabs/FLtest1/Calculator@-@12":0.5773502691896258,"fr/spoonlabs/FLtest1/Calculator@-@10":0.5}
\ No newline at end of file
+{"fr/spoonlabs/FLtest1/Calculator@-@15":1.0,"fr/spoonlabs/FLtest1/Calculator@-@14":0.7071067811865475,"fr/spoonlabs/FLtest1/Calculator@-@12":0.5773502691896258,"fr/spoonlabs/FLtest1/Calculator@-@5":0.5,"fr/spoonlabs/FLtest1/Calculator@-@6":0.5,"fr/spoonlabs/FLtest1/Calculator@-@10":0.5}
\ No newline at end of file