...

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

Documentation: cmd/go/testdata/script

     1[!fuzz] skip
     2
     3! go test -fuzz=FuzzTrivial -coverprofile=prof
     4! stdout .
     5stderr '^cannot use -coverprofile flag with -fuzz flag$'
     6
     7! go test -fuzz=FuzzTrivial -blockprofile=prof
     8! stdout .
     9stderr '^cannot use -blockprofile flag with -fuzz flag$'
    10
    11! go test -fuzz=FuzzTrivial -cpuprofile=prof
    12! stdout .
    13stderr '^cannot use -cpuprofile flag with -fuzz flag$'
    14
    15! go test -fuzz=FuzzTrivial -memprofile=prof
    16! stdout .
    17stderr '^cannot use -memprofile flag with -fuzz flag$'
    18
    19! go test -fuzz=FuzzTrivial -mutexprofile=prof
    20! stdout .
    21stderr '^cannot use -mutexprofile flag with -fuzz flag$'
    22
    23! go test -fuzz=FuzzTrivial -trace=prof
    24! stdout .
    25stderr '^cannot use -trace flag with -fuzz flag$'
    26
    27-- go.mod --
    28module example
    29
    30go 1.18
    31-- fuzz_test.go --
    32package example
    33
    34import "testing"
    35
    36func FuzzTrivial(f *testing.F) {
    37	f.Fuzz(func(t *testing.T, _ []byte) {})
    38}

View as plain text