aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorJulien Lancelot <julien.lancelot@gmail.com>2013-01-29 10:32:54 +0100
committerJulien Lancelot <julien.lancelot@gmail.com>2013-01-29 10:33:14 +0100
commit86199f0cbaeb53ce5419d9617b8ff5e46cc225c4 (patch)
tree2b2da2e793d0b1b4780473b9b2a55c7dd74cb363 /plugins
parent9f3de2ad8b0aaff9ec309a50a1b5d0f3c578d7a8 (diff)
downloadsonarqube-86199f0cbaeb53ce5419d9617b8ff5e46cc225c4.tar.gz
sonarqube-86199f0cbaeb53ce5419d9617b8ff5e46cc225c4.zip
SONAR-4092 Display number of lines covered by a test
Diffstat (limited to 'plugins')
-rw-r--r--plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/web/tests_viewer.html.erb9
1 files changed, 2 insertions, 7 deletions
diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/web/tests_viewer.html.erb b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/web/tests_viewer.html.erb
index b043a58fa10..d33f97d3993 100644
--- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/web/tests_viewer.html.erb
+++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/web/tests_viewer.html.erb
@@ -59,13 +59,8 @@
test_case[:name] = test.name()
test_case[:status] = test.status()
test_case[:time] = test.durationInMs()
- test_case[:covered_lines] = 0
- if test.coveredBlocks()
- has_covered_lines = true
- test.coveredBlocks().each do |covered_block|
- test_case[:covered_lines] += covered_block.lines().size
- end
- end
+ has_covered_lines = test.hasCoveredBlocks()
+ test_case[:covered_lines] = test.countCoveredBlocks() if test.hasCoveredBlocks()
if test.status() != 'ok'
test_case[:message] = ''
test_case[:message] = test.message() if test.message()