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

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

View as plain text