aboutsummaryrefslogtreecommitdiff
path: root/src/testing
diff options
context:
space:
mode:
Diffstat (limited to 'src/testing')
-rw-r--r--src/testing/cover.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/testing/cover.go b/src/testing/cover.go
index 17c03f5e5e..62ee5ac9c0 100644
--- a/src/testing/cover.go
+++ b/src/testing/cover.go
@@ -109,7 +109,8 @@ func coverReport() {
}
}
if total == 0 {
- total = 1
+ fmt.Println("coverage: [no statements]")
+ return
}
fmt.Printf("coverage: %.1f%% of statements%s\n", 100*float64(active)/float64(total), cover.CoveredPackages)
}