Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/go: go test -cover doesn't work well when test cases don't have the same package name #8034

Closed
mikioh opened this issue May 20, 2014 · 2 comments
Milestone

Comments

@mikioh
Copy link
Contributor

mikioh commented May 20, 2014

The package "ipv6" has several test cases but all cases are packed into
"ipv6_test" package. When we run "go test -cover" it displays:

ipv6$ go test -cover
PASS
coverage: 0.0% of statements
ok      code.google.com/p/go.net/ipv6   0.015s

and if we add a dummy_test.go containing "package ipv6" line,

ipv6$ go test -cover
PASS
coverage: 66.6% of statements
ok      code.google.com/p/go.net/ipv6   0.019s

Perhaps it's a regression in go1.3.
@ianlancetaylor
Copy link
Contributor

Comment 1:

Labels changed: added release-go1.4.

@mikioh
Copy link
Contributor Author

mikioh commented May 22, 2014

Comment 2:

This issue was closed by revision f9c6ad9.

Status changed to Fixed.

@rsc rsc added this to the Go1.4 milestone Apr 14, 2015
@rsc rsc removed the release-go1.4 label Apr 14, 2015
@golang golang locked and limited conversation to collaborators Jun 25, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants