aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorDuarte Meneses <duarte.meneses@sonarsource.com>2015-11-13 11:54:47 +0100
committerDuarte Meneses <duarte.meneses@sonarsource.com>2015-11-16 15:21:43 +0100
commit55d74d47d9b39317083f36352fdc8df3b0151ab6 (patch)
tree04e424d6d9d094178f7a670a1fcfc412983d7c2a /plugins
parente306193f685ba72fea402b8e80875b8cd9c5341a (diff)
downloadsonarqube-55d74d47d9b39317083f36352fdc8df3b0151ab6.tar.gz
sonarqube-55d74d47d9b39317083f36352fdc8df3b0151ab6.zip
SONAR-6183 Validate that coverage measures are correct regarding line number and resource
Diffstat (limited to 'plugins')
-rw-r--r--plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/coverage/ItCoverageSensorTest.java4
-rw-r--r--plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/coverage/OverallCoverageSensorTest.java4
-rw-r--r--plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/coverage/UtCoverageSensorTest.java4
3 files changed, 6 insertions, 6 deletions
diff --git a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/coverage/ItCoverageSensorTest.java b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/coverage/ItCoverageSensorTest.java
index 1fb232fa3bb..405f132d0d4 100644
--- a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/coverage/ItCoverageSensorTest.java
+++ b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/coverage/ItCoverageSensorTest.java
@@ -71,7 +71,7 @@ public class ItCoverageSensorTest {
public void testLineHitNoConditions() throws IOException {
File coverage = new File(baseDir, "src/foo.xoo.itcoverage");
FileUtils.write(coverage, "1:3\n\n#comment");
- DefaultInputFile inputFile = new DefaultInputFile("foo", "src/foo.xoo").setLanguage("xoo");
+ DefaultInputFile inputFile = new DefaultInputFile("foo", "src/foo.xoo").setLanguage("xoo").setLines(10);
context.fileSystem().add(inputFile);
sensor.execute(context);
@@ -83,7 +83,7 @@ public class ItCoverageSensorTest {
public void testLineHitAndConditions() throws IOException {
File coverage = new File(baseDir, "src/foo.xoo.itcoverage");
FileUtils.write(coverage, "1:3:4:2");
- DefaultInputFile inputFile = new DefaultInputFile("foo", "src/foo.xoo").setLanguage("xoo");
+ DefaultInputFile inputFile = new DefaultInputFile("foo", "src/foo.xoo").setLanguage("xoo").setLines(10);
context.fileSystem().add(inputFile);
sensor.execute(context);
diff --git a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/coverage/OverallCoverageSensorTest.java b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/coverage/OverallCoverageSensorTest.java
index 3a626f91bed..0707923d2bb 100644
--- a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/coverage/OverallCoverageSensorTest.java
+++ b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/coverage/OverallCoverageSensorTest.java
@@ -71,7 +71,7 @@ public class OverallCoverageSensorTest {
public void testLineHitNoConditions() throws IOException {
File coverage = new File(baseDir, "src/foo.xoo.overallcoverage");
FileUtils.write(coverage, "1:3\n\n#comment");
- DefaultInputFile inputFile = new DefaultInputFile("foo", "src/foo.xoo").setLanguage("xoo");
+ DefaultInputFile inputFile = new DefaultInputFile("foo", "src/foo.xoo").setLanguage("xoo").setLines(10);
context.fileSystem().add(inputFile);
sensor.execute(context);
@@ -83,7 +83,7 @@ public class OverallCoverageSensorTest {
public void testLineHitAndConditions() throws IOException {
File coverage = new File(baseDir, "src/foo.xoo.overallcoverage");
FileUtils.write(coverage, "1:3:4:2");
- DefaultInputFile inputFile = new DefaultInputFile("foo", "src/foo.xoo").setLanguage("xoo");
+ DefaultInputFile inputFile = new DefaultInputFile("foo", "src/foo.xoo").setLanguage("xoo").setLines(10);
context.fileSystem().add(inputFile);
sensor.execute(context);
diff --git a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/coverage/UtCoverageSensorTest.java b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/coverage/UtCoverageSensorTest.java
index a8f14d7dfe2..b3fd1e6e86d 100644
--- a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/coverage/UtCoverageSensorTest.java
+++ b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/coverage/UtCoverageSensorTest.java
@@ -71,7 +71,7 @@ public class UtCoverageSensorTest {
public void testLineHitNoConditions() throws IOException {
File coverage = new File(baseDir, "src/foo.xoo.coverage");
FileUtils.write(coverage, "1:3\n\n#comment");
- DefaultInputFile inputFile = new DefaultInputFile("foo", "src/foo.xoo").setLanguage("xoo");
+ DefaultInputFile inputFile = new DefaultInputFile("foo", "src/foo.xoo").setLanguage("xoo").setLines(10);
context.fileSystem().add(inputFile);
sensor.execute(context);
@@ -85,7 +85,7 @@ public class UtCoverageSensorTest {
public void testLineHitAndConditions() throws IOException {
File coverage = new File(baseDir, "src/foo.xoo.coverage");
FileUtils.write(coverage, "1:3:4:2");
- DefaultInputFile inputFile = new DefaultInputFile("foo", "src/foo.xoo").setLanguage("xoo");
+ DefaultInputFile inputFile = new DefaultInputFile("foo", "src/foo.xoo").setLanguage("xoo").setLines(10);
context.fileSystem().add(inputFile);
sensor.execute(context);