mirror of https://github.com/golang/go.git
Corrected test case
This commit is contained in:
parent
58eb10ba10
commit
d76060814e
|
|
@ -354,21 +354,20 @@ func main() {
|
||||||
|
|
||||||
const exampleWholeFileExternalFunction = `package foo_test
|
const exampleWholeFileExternalFunction = `package foo_test
|
||||||
|
|
||||||
func foo(x int)
|
func foo(int)
|
||||||
|
|
||||||
func Example() {
|
func Example() {
|
||||||
foo(42) // External function reference
|
foo(42)
|
||||||
fmt.Println("Hello, world!")
|
// Output:
|
||||||
// Output: Hello, world!
|
|
||||||
}
|
}
|
||||||
`
|
`
|
||||||
|
|
||||||
const exampleWholeFileExternalFunctionOutput = `package main
|
const exampleWholeFileExternalFunctionOutput = `package main
|
||||||
|
|
||||||
func foo(x int)
|
func foo(int)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
fmt.Println("Hello, world!")
|
foo(42)
|
||||||
}
|
}
|
||||||
`
|
`
|
||||||
|
|
||||||
|
|
@ -391,7 +390,7 @@ var exampleWholeFileTestCases = []struct {
|
||||||
"ExternalFunction",
|
"ExternalFunction",
|
||||||
exampleWholeFileExternalFunction,
|
exampleWholeFileExternalFunction,
|
||||||
exampleWholeFileExternalFunctionOutput,
|
exampleWholeFileExternalFunctionOutput,
|
||||||
"Hello, world!\n",
|
"",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue