Closed jonlawlor closed 9 years ago
I can confirm this.
I'll see if there is anything on this in the go issue tracker.
There is a closed issue that seems to be related: https://github.com/golang/go/issues/6333
There, mattn showed coverage as 0. In this case we have incorrectly low but nonzero coverage, so it isn't caught by the test they added.
The go devs have recognized the issue and are addressing it as they can: https://github.com/golang/go/issues/9479
When I run
go test -cover
for cblas the coverage percentage appears to be right, but when I rungo test -coverprofile=coverage.out
and thengo tool cover -html=coverage.out
it shows only one line covered. When runninggo tool cover -func=coverage.out
the percentages show that many of the functions should actually be covered.I suspect this is a problem with the go tool, but I'd like to verify that other people are seeing this as well. It appears to be cgo related.