...

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

Documentation: cmd/go/testdata/script

     1# Tests that invalid examples are ignored.
     2# Verifies golang.org/issue/35284
     3go test x_test.go
     4
     5-- x_test.go --
     6package  x
     7
     8import "fmt"
     9
    10func ExampleThisShouldNotHaveAParameter(thisShouldntExist int) {
    11	fmt.Println("X")
    12	// Output:
    13}

View as plain text