...

Text file src/cmd/go/testdata/script/cover_sync_atomic_import.txt

Documentation: cmd/go/testdata/script

     1[short] skip
     2[compiler:gccgo] skip # gccgo has no cover tool
     3
     4go test -short -cover -covermode=atomic -coverpkg=coverdep/p1 coverdep
     5
     6# In addition to the above, test to make sure there is no funny
     7# business if we try "go test -cover" in atomic mode targeting
     8# sync/atomic itself (see #57445). Just a short test run is needed
     9# since we're mainly interested in making sure the test builds and can
    10# execute at least one test.
    11
    12go test -short -covermode=atomic -run=TestStoreInt64 sync/atomic
    13go test -short -covermode=atomic -run=TestAnd8 internal/runtime/atomic
    14
    15# Skip remainder if no race detector support.
    16[!race] skip
    17
    18go test -short -cover -race -run=TestStoreInt64 sync/atomic
    19go test -short -cover -race -run=TestAnd8 internal/runtime/atomic
    20
    21-- go.mod --
    22module coverdep
    23
    24go 1.16
    25-- p.go --
    26package p
    27
    28import _ "coverdep/p1"
    29
    30func F() {
    31}
    32-- p1/p1.go --
    33package p1
    34
    35import _ "errors"
    36-- p_test.go --
    37package p
    38
    39import "testing"
    40
    41func Test(t *testing.T) {
    42	F()
    43}

View as plain text