-
Notifications
You must be signed in to change notification settings - Fork 17.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmd/go: convert TestGoTestBuildsAnXtestContainingOnly... to the scrip…
…t framework The name of the test is too long to fit on the first line. It's TestGoTestBuildsAnXtestContainingOnlyNonRunnableExamples. Part of converting all tests to script framework to improve test parallelism. Updates #36320 Updates #17751 Change-Id: I490748271b10a85cbe1d34f9dbecb86ccf0101a7 Reviewed-on: https://go-review.googlesource.com/c/go/+/214423 Reviewed-by: Jay Conrod <[email protected]>
- Loading branch information
Showing
4 changed files
with
26 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
go test -v norunexample | ||
stdout 'File with non-runnable example was built.' | ||
|
||
-- norunexample/example_test.go -- | ||
package pkg_test | ||
|
||
import "os" | ||
|
||
func init() { | ||
os.Stdout.Write([]byte("File with non-runnable example was built.\n")) | ||
} | ||
|
||
func Example_test() { | ||
// This test will not be run, it has no "Output:" comment. | ||
} | ||
-- norunexample/test_test.go -- | ||
package pkg | ||
|
||
import ( | ||
"os" | ||
"testing" | ||
) | ||
|
||
func TestBuilt(t *testing.T) { | ||
os.Stdout.Write([]byte("A normal test was executed.\n")) | ||
} |