Commit 6780042f authored by Rob Pike's avatar Rob Pike

testing/cover: improve comments on CoverBlock

The previous CL (https://go-review.googlesource.com/c/go/+/96756)
added comments that didn't really say much, but there is something
so say: what the units are and that they are indexed starting at 1.

Add a more helpful comment on the type, and also follow proper
style by using initial capitals and a period.

Change-Id: Id19cd5f392faf7c7bac034073f276cc770589075
Reviewed-on: https://go-review.googlesource.com/121875Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
parent 0dc814cd
......@@ -13,14 +13,17 @@ import (
)
// CoverBlock records the coverage data for a single basic block.
// The fields are 1-indexed, as in an editor: The opening line of
// the file is number 1, for example. Columns are measured
// in bytes.
// NOTE: This struct is internal to the testing infrastructure and may change.
// It is not covered (yet) by the Go 1 compatibility guidelines.
type CoverBlock struct {
Line0 uint32 // line number for block start
Col0 uint16 // column number for block start
Line1 uint32 // line number for block end
Col1 uint16 // column number for block end
Stmts uint16 // number of statements included in this block
Line0 uint32 // Line number for block start.
Col0 uint16 // Column number for block start.
Line1 uint32 // Line number for block end.
Col1 uint16 // Column number for block end.
Stmts uint16 // Number of statements included in this block.
}
var cover Cover
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment