Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1162)

Issue 10392050: code review 10392050: go.tools/cmd/cover: add a test (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 11 months ago by r
Modified:
11 years, 11 months ago
Reviewers:
rsc
CC:
golang-dev, rsc
Visibility:
Public.

Description

go.tools/cmd/cover: add a test Test the statistics work as expected for a simple program, which can be extended as needed. This is all a bit meta.

Patch Set 1 #

Patch Set 2 : diff -r 6acfcebcb6c6 https://code.google.com/p/go.tools #

Total comments: 8

Patch Set 3 : diff -r a2603d0ee4a8 https://code.google.com/p/go.tools #

Patch Set 4 : diff -r a2603d0ee4a8 https://code.google.com/p/go.tools #

Patch Set 5 : diff -r a2603d0ee4a8 https://code.google.com/p/go.tools #

Patch Set 6 : diff -r 1c4658e13ba3 https://code.google.com/p/go.tools #

Unified diffs Side-by-side diffs Delta from patch set Stats (+256 lines, -0 lines) Patch
A cmd/cover/cover_test.go View 1 2 3 4 5 1 chunk +87 lines, -0 lines 0 comments Download
A cmd/cover/testdata/main.go View 1 2 3 1 chunk +64 lines, -0 lines 0 comments Download
A cmd/cover/testdata/test.go View 1 1 chunk +105 lines, -0 lines 0 comments Download

Messages

Total messages: 4
r
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://code.google.com/p/go.tools
11 years, 11 months ago (2013-06-21 21:09:13 UTC) #1
r
Hello golang-dev@googlegroups.com (cc: golang-dev@googlegroups.com), Please take another look.
11 years, 11 months ago (2013-06-21 21:24:14 UTC) #2
rsc
LGTM definitely a bit meta https://codereview.appspot.com/10392050/diff/4001/cmd/cover/cover_test.go File cmd/cover/cover_test.go (right): https://codereview.appspot.com/10392050/diff/4001/cmd/cover/cover_test.go#newcode22 cmd/cover/cover_test.go:22: testcover = dot("testcover") call ...
11 years, 11 months ago (2013-06-21 21:27:35 UTC) #3
r
11 years, 11 months ago (2013-06-21 21:35:12 UTC) #4
*** Submitted as
https://code.google.com/p/go/source/detail?r=0e474618ba19&repo=tools ***

go.tools/cmd/cover: add a test
Test the statistics work as expected for a simple program, which can be extended
as needed. This is all a bit meta.

R=golang-dev, rsc
CC=golang-dev
https://codereview.appspot.com/10392050

https://codereview.appspot.com/10392050/diff/4001/cmd/cover/cover_test.go
File cmd/cover/cover_test.go (right):

https://codereview.appspot.com/10392050/diff/4001/cmd/cover/cover_test.go#new...
cmd/cover/cover_test.go:22: testcover = dot("testcover")
On 2013/06/21 21:27:35, rsc wrote:
> call it "testcover.exe".

Done.

https://codereview.appspot.com/10392050/diff/4001/cmd/cover/cover_test.go#new...
cmd/cover/cover_test.go:78: func dot(s string) string {
On 2013/06/21 21:27:35, rsc wrote:
> Can delete. Only the shell cares about ./

Done.

https://codereview.appspot.com/10392050/diff/4001/cmd/cover/cover_test.go#new...
cmd/cover/cover_test.go:84: output, err := c.CombinedOutput()
On 2013/06/21 21:27:35, rsc wrote:
> FWIW you can avoid the buffering with:
> 
> c.Stdout = os.Stdout
> c.Stderr = os.Stderr
> err := c.Run()

Done.

https://codereview.appspot.com/10392050/diff/4001/cmd/cover/testdata/main.go
File cmd/cover/testdata/main.go (right):

https://codereview.appspot.com/10392050/diff/4001/cmd/cover/testdata/main.go#...
cmd/cover/testdata/main.go:5: // Test runner for coverage test. This file is not
coverage-annotated; test_go is.
On 2013/06/21 21:27:35, rsc wrote:
> s/test_go/test.go/?

Done.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b