aboutsummaryrefslogtreecommitdiff
path: root/libgo/go/testing/cover.go
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/go/testing/cover.go')
-rw-r--r--libgo/go/testing/cover.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/libgo/go/testing/cover.go b/libgo/go/testing/cover.go
index 17c03f5..62ee5ac 100644
--- a/libgo/go/testing/cover.go
+++ b/libgo/go/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)
}