blob: 7e3948f94749df3a6526a00ab35bc920dde955b9 [file] [log] [blame] [view]
Josh Bleecher Snydere157fac2017-07-24 10:17:15 -07001The test directory contains tests of the Go tool chain and runtime.
2It includes black box tests, regression tests, and error output tests.
3They are run as part of all.bash.
4
5To run just these tests, execute:
6
Dmitri Shuralyov7a0799b2023-02-08 11:40:06 -05007 ../bin/go test internal/testdir
Josh Bleecher Snydere157fac2017-07-24 10:17:15 -07008
zdjonesa58a8d22020-07-16 12:33:25 +01009To run just tests from specified files in this directory, execute:
10
Dmitri Shuralyov7a0799b2023-02-08 11:40:06 -050011 ../bin/go test internal/testdir -run='Test/(file1.go|file2.go|...)'
zdjonesa58a8d22020-07-16 12:33:25 +010012
Josh Bleecher Snydere157fac2017-07-24 10:17:15 -070013Standard library tests should be written as regular Go tests in the appropriate package.
14
15The tool chain and runtime also have regular Go tests in their packages.
16The main reasons to add a new test to this directory are:
17
18* it is most naturally expressed using the test runner; or
19* it is also applicable to `gccgo` and other Go tool chains.