Skip to content

Commit a3392ec

Browse files
authored
Merge pull request #40 from intersystems/ZeroMethods
Fixed Divide By Zero error in results viewer
2 parents f13bdf4 + 9963585 commit a3392ec

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [3.1.1] - Unreleased
9+
10+
### Fixed
11+
- #39: Fixed bug where results viewer gave divide by zero error when there were 0 executed methods in the covered code
12+
813
## [3.1.0] - 2024-07-05
914

1015
### Added
@@ -25,4 +30,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2530
- #25: Fix so the tool works on 2023.1
2631

2732
## [2.1.3] - 2022-03-30
28-
- Last released version before CHANGELOG existed.
33+
- Last released version before CHANGELOG existed.

cls/TestCoverage/UI/AggregateResultViewer.cls

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ XData Contents [ XMLNamespace = "http://www.intersystems.com/zen" ]
2525
ROUND(100*CoveredLines/ExecutableLines,2) PercentCoverage,
2626
ExecutableLines as ExecutableLines,
2727
CoveredLines As LinesCovered,
28-
ROUND(100*CoveredMethods/ExecutableMethods,2) MethodCoverage,
28+
CASE ExecutableMethods WHEN 0 THEN NULL ELSE ROUND(100*CoveredMethods/ExecutableMethods,2) END As MethodCoverage,
2929
ExecutableMethods As ExecutableMethods,
3030
CoveredMethods As MethodsCovered,
3131
'' as Info,
@@ -100,4 +100,3 @@ ClientMethod drawCell(value, row, col) [ Language = javascript ]
100100
}
101101

102102
}
103-

module.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<Export generator="Cache" version="25">
33
<Document name="TestCoverage.ZPM"><Module>
44
<Name>TestCoverage</Name>
5-
<Version>3.1.0</Version>
5+
<Version>3.1.1</Version>
66
<Description>Run your typical ObjectScript %UnitTest tests and see which lines of your code are executed. Includes Cobertura-style reporting for use in continuous integration tools.</Description>
77
<Packaging>module</Packaging>
88
<Resource Name="TestCoverage.PKG" Directory="cls" />

0 commit comments

Comments
 (0)