From 043be6e23b1717758ccd1b66dff58b40810b0076 Mon Sep 17 00:00:00 2001 From: Peter Leibiger Date: Mon, 22 Apr 2024 18:08:55 +0200 Subject: [PATCH] fix(cobertura): removes rounding The rounding was previously removed one the package level. This commit also removes it for the sources level. --- cobertura/CHANGELOG.md | 4 ++++ cobertura/bin/src/cobertura.dart | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/cobertura/CHANGELOG.md b/cobertura/CHANGELOG.md index 7291d26..ea455bc 100644 --- a/cobertura/CHANGELOG.md +++ b/cobertura/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.5 + +- Removes rounding for source elements + ## 1.0.4 - Removes rounding diff --git a/cobertura/bin/src/cobertura.dart b/cobertura/bin/src/cobertura.dart index 8fc7c91..1a83470 100644 --- a/cobertura/bin/src/cobertura.dart +++ b/cobertura/bin/src/cobertura.dart @@ -178,10 +178,10 @@ void _writeCobertura({ var className = path.basenameWithoutExtension(r.file); var classLineRate = r.lines.found > 0 - ? (r.lines.hit / r.lines.found).round() + ? r.lines.hit / r.lines.found : r.lines.found; var classBranchRate = r.branches.found > 0 - ? (r.branches.hit / r.branches.found).round() + ? r.branches.hit / r.branches.found : r.branches.found; builder.element("class", attributes: {