1 개요[ | ]
- cover: inconsistent NumStmt: changed from 1 to 2
Console
Copy
testuser@localhost:~/gopath/src/lethe$ go test -race -covermode atomic -coverprofile=coverage.out ./...
? github.com/kuoss/lethe [no test files]
ok github.com/kuoss/lethe/clock 0.048s coverage: 100.0% of statements
ok github.com/kuoss/lethe/config 0.061s coverage: 84.8% of statements
...
ok github.com/kuoss/lethe/storage/querier 0.048s coverage: 0.0% of statements [no tests to run]
ok github.com/kuoss/lethe/storage/queryservice 0.065s coverage: 87.5% of statements
ok github.com/kuoss/lethe/util 0.052s coverage: 81.6% of statements
Console
Copy
testuser@localhost:~/gopath/src/lethe$ go tool cover -func coverage.out
cover: inconsistent NumStmt: changed from 1 to 2
2 workaround[ | ]
Console
Copy
testuser@localhost:~/gopath/src/lethe$ cat coverage.out | grep -v yaccpar > coverage2.out
testuser@localhost:~/gopath/src/lethe$ go tool cover -func coverage2.out
github.com/kuoss/lethe/clock/clock.go:12: Now 100.0%
github.com/kuoss/lethe/clock/clock.go:19: SetPlaygroundMode 100.0%
github.com/kuoss/lethe/config/config.go:25: New 82.9%
...
github.com/kuoss/lethe/util/time.go:16: GetDurationFromAge 80.8%
github.com/kuoss/lethe/util/time.go:53: FloatStringToTime 100.0%
total: (statements) 71.2%
3 같이 보기[ | ]
4 참고[ | ]
편집자 Jmnote
로그인하시면 댓글을 쓸 수 있습니다.