aboutsummaryrefslogtreecommitdiffstats
path: root/it
diff options
context:
space:
mode:
authorJulien Lancelot <julien.lancelot@sonarsource.com>2016-08-16 16:42:25 +0200
committerJulien Lancelot <julien.lancelot@sonarsource.com>2016-08-16 17:36:41 +0200
commit792d73d26972dfa1f5f2f47fc88e930ef56af5ef (patch)
tree9cec106c895d4f97c862334f0d13b5135093cc01 /it
parentd235acc3d3f20d44617effe1fda54467fa81a9dc (diff)
downloadsonarqube-792d73d26972dfa1f5f2f47fc88e930ef56af5ef.tar.gz
sonarqube-792d73d26972dfa1f5f2f47fc88e930ef56af5ef.zip
SONAR-7957 Replace new ncloc by new lines
Diffstat (limited to 'it')
-rw-r--r--it/it-projects/duplications/new-duplications-v2/src/main/xoo/duplicated_lines_with_other_dir1/DuplicatedLinesWithOtherDirectory.xoo.measures1
-rw-r--r--it/it-projects/duplications/new-duplications-v2/src/main/xoo/duplicated_lines_with_other_dir2/DuplicatedLinesWithOtherDirectory.xoo.measures1
-rw-r--r--it/it-projects/duplications/new-duplications-v2/src/main/xoo/duplicated_lines_within_same_file/DuplicatedLinesInSameFile.xoo.measures1
-rw-r--r--it/it-tests/src/test/java/it/duplication/NewDuplicationsTest.java12
4 files changed, 6 insertions, 9 deletions
diff --git a/it/it-projects/duplications/new-duplications-v2/src/main/xoo/duplicated_lines_with_other_dir1/DuplicatedLinesWithOtherDirectory.xoo.measures b/it/it-projects/duplications/new-duplications-v2/src/main/xoo/duplicated_lines_with_other_dir1/DuplicatedLinesWithOtherDirectory.xoo.measures
index 86639725ced..03005736cf7 100644
--- a/it/it-projects/duplications/new-duplications-v2/src/main/xoo/duplicated_lines_with_other_dir1/DuplicatedLinesWithOtherDirectory.xoo.measures
+++ b/it/it-projects/duplications/new-duplications-v2/src/main/xoo/duplicated_lines_with_other_dir1/DuplicatedLinesWithOtherDirectory.xoo.measures
@@ -1,2 +1 @@
ncloc:42
-ncloc_data:1=0;2=0;3=0;4=0;5=1;6=1;7=0;8=1;9=1;10=1;11=1;12=1;13=1;14=1;15=1;16=1;17=1;18=1;19=1;20=1;21=1;22=1;23=1;24=1;25=1;26=1;27=1;28=1;29=1;30=1;31=1;32=1;33=1;34=1;35=1;36=1;37=1;38=1;39=1;40=1;41=0;42=0;
diff --git a/it/it-projects/duplications/new-duplications-v2/src/main/xoo/duplicated_lines_with_other_dir2/DuplicatedLinesWithOtherDirectory.xoo.measures b/it/it-projects/duplications/new-duplications-v2/src/main/xoo/duplicated_lines_with_other_dir2/DuplicatedLinesWithOtherDirectory.xoo.measures
index 24cb7ef5ab1..33a558499a3 100644
--- a/it/it-projects/duplications/new-duplications-v2/src/main/xoo/duplicated_lines_with_other_dir2/DuplicatedLinesWithOtherDirectory.xoo.measures
+++ b/it/it-projects/duplications/new-duplications-v2/src/main/xoo/duplicated_lines_with_other_dir2/DuplicatedLinesWithOtherDirectory.xoo.measures
@@ -1,3 +1,2 @@
ncloc:36
-ncloc_data:1=0;2=0;3=0;4=0;5=1;6=1;7=0;8=1;9=1;10=1;11=1;12=1;13=1;14=1;15=1;16=1;17=1;18=1;19=1;20=1;21=1;22=1;23=1;24=1;25=1;26=1;27=1;28=1;29=1;30=1;31=1;32=1;33=1;34=1;35=0;36=0;
diff --git a/it/it-projects/duplications/new-duplications-v2/src/main/xoo/duplicated_lines_within_same_file/DuplicatedLinesInSameFile.xoo.measures b/it/it-projects/duplications/new-duplications-v2/src/main/xoo/duplicated_lines_within_same_file/DuplicatedLinesInSameFile.xoo.measures
index 902659ea929..2fb2025cb32 100644
--- a/it/it-projects/duplications/new-duplications-v2/src/main/xoo/duplicated_lines_within_same_file/DuplicatedLinesInSameFile.xoo.measures
+++ b/it/it-projects/duplications/new-duplications-v2/src/main/xoo/duplicated_lines_within_same_file/DuplicatedLinesInSameFile.xoo.measures
@@ -1,3 +1,2 @@
ncloc:81
-ncloc_data:1=0;2=0;3=0;4=0;5=1;6=1;7=0;8=1;9=1;10=1;11=1;12=1;13=1;14=1;15=1;16=1;17=1;18=1;19=1;20=1;21=1;22=1;23=1;24=1;25=1;26=1;27=1;28=1;29=1;30=1;31=1;32=1;33=1;34=1;35=1;36=1;37=1;38=0;39=1;40=1;41=0;42=0;43=1;44=1;45=1;46=1;47=1;48=0;49=1;50=1;51=1;52=1;53=0;54=0;55=0;56=1;57=1;58=1;59=1;60=1;61=1;62=1;63=1;64=1;65=1;66=1;67=1;68=1;69=1;70=1;71=1;72=0;73=1;74=1;75=1;76=1;77=1;78=1;79=0;80=0;81=0;
diff --git a/it/it-tests/src/test/java/it/duplication/NewDuplicationsTest.java b/it/it-tests/src/test/java/it/duplication/NewDuplicationsTest.java
index 65ea8831cc5..b0c3bf917e6 100644
--- a/it/it-tests/src/test/java/it/duplication/NewDuplicationsTest.java
+++ b/it/it-tests/src/test/java/it/duplication/NewDuplicationsTest.java
@@ -52,16 +52,16 @@ public class NewDuplicationsTest {
@Test
public void new_duplications_on_project() throws Exception {
Resource project = getComponent("new-duplications");
- assertThat(project.getMeasure("new_ncloc").getVariation1()).isEqualTo(75d, DEFAULT_OFFSET);
+ assertThat(project.getMeasure("new_lines").getVariation1()).isEqualTo(83d, DEFAULT_OFFSET);
assertThat(project.getMeasure("new_duplicated_lines").getVariation1()).isEqualTo(71d, DEFAULT_OFFSET);
- assertThat(project.getMeasure("new_duplicated_lines_density").getVariation1()).isEqualTo(94.7d, DEFAULT_OFFSET);
+ assertThat(project.getMeasure("new_duplicated_lines_density").getVariation1()).isEqualTo(85.5d, DEFAULT_OFFSET);
assertThat(project.getMeasure("new_duplicated_blocks").getVariation1()).isEqualTo(12d, DEFAULT_OFFSET);
}
@Test
public void new_duplications_on_directory() throws Exception {
Resource project = getComponent("new-duplications:src/main/xoo/duplicated_lines_with_other_dir1");
- assertThat(project.getMeasure("new_ncloc").getVariation1()).isEqualTo(24d, DEFAULT_OFFSET);
+ assertThat(project.getMeasure("new_lines").getVariation1()).isEqualTo(24d, DEFAULT_OFFSET);
assertThat(project.getMeasure("new_duplicated_lines").getVariation1()).isEqualTo(24d, DEFAULT_OFFSET);
assertThat(project.getMeasure("new_duplicated_lines_density").getVariation1()).isEqualTo(100d, DEFAULT_OFFSET);
assertThat(project.getMeasure("new_duplicated_blocks").getVariation1()).isEqualTo(7d, DEFAULT_OFFSET);
@@ -70,15 +70,15 @@ public class NewDuplicationsTest {
@Test
public void new_duplications_on_file() throws Exception {
Resource project = getComponent("new-duplications:src/main/xoo/duplicated_lines_within_same_file/DuplicatedLinesInSameFile.xoo");
- assertThat(project.getMeasure("new_ncloc").getVariation1()).isEqualTo(33d, DEFAULT_OFFSET);
+ assertThat(project.getMeasure("new_lines").getVariation1()).isEqualTo(41d, DEFAULT_OFFSET);
assertThat(project.getMeasure("new_duplicated_lines").getVariation1()).isEqualTo(29d, DEFAULT_OFFSET);
- assertThat(project.getMeasure("new_duplicated_lines_density").getVariation1()).isEqualTo(87.9d, DEFAULT_OFFSET);
+ assertThat(project.getMeasure("new_duplicated_lines_density").getVariation1()).isEqualTo(70.7d, DEFAULT_OFFSET);
assertThat(project.getMeasure("new_duplicated_blocks").getVariation1()).isEqualTo(2d, DEFAULT_OFFSET);
}
private static Resource getComponent(String key) {
Resource component = orchestrator.getServer().getWsClient()
- .find(ResourceQuery.createForMetrics(key, "new_ncloc", "new_duplicated_lines", "new_duplicated_lines_density", "new_duplicated_blocks").setIncludeTrends(true));
+ .find(ResourceQuery.createForMetrics(key, "new_lines", "new_duplicated_lines", "new_duplicated_lines_density", "new_duplicated_blocks").setIncludeTrends(true));
assertThat(component).isNotNull();
return component;
}