mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
internal/coverage: add apis for reading/writing counter data
Add utilities for reading and writing of counter data files as part of the new code coverage implementation. Trivia note: currently the contents of counter data files are emitted in little-endian form, which for the counters is somewhat painful in that we need to visit each counter value and properly encode it. It might be better to instead emit counters in native endianity and then teach the tools to decode properly in the case of an endianity mismatch. Updates #51430. Change-Id: I124fdcb40fc339a48b64b35264bf24c3be50ddd4 Reviewed-on: https://go-review.googlesource.com/c/go/+/359403 TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: David Chase <drchase@google.com> Run-TryBot: Than McIntosh <thanm@google.com>
This commit is contained in:
parent
63668a5155
commit
efa3f1749f
6 changed files with 935 additions and 10 deletions
|
|
@ -178,7 +178,7 @@ func createMetaDataBlobs(t *testing.T, nb int) [][]byte {
|
|||
return res
|
||||
}
|
||||
|
||||
func TestMetaDataFileWriterReader(t *testing.T) {
|
||||
func TestMetaDataWriterReader(t *testing.T) {
|
||||
d := t.TempDir()
|
||||
|
||||
// Emit a meta-file...
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue