...

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

View as plain text