go/test
Keith Randall 2fbf6aafe7 [dev.typeparams] cmd/compile: handle interface type parameters in type switches
Change-Id: I9bba21a64d7e9f42395b6fcdf8aa3ca01cf131dc
Reviewed-on: https://go-review.googlesource.com/c/go/+/340912
Trust: Keith Randall <khr@golang.org>
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dan Scales <danscales@google.com>
2021-08-10 01:56:50 +00:00
..
abi
alias3.dir
bench
chan
closure3.dir cmd/compile: don't emit inltree for closure within body of inlined func 2021-05-18 20:04:57 +00:00
closure5.dir
codegen
ddd2.dir
dwarf
fixedbugs [dev.typeparams] cmd/compile: simplify interface conversions 2021-08-09 16:10:20 +00:00
import2.dir
import4.dir
interface
intrinsic.dir
ken
linkname.dir
method4.dir
oldescape_linkname.dir
retjmp.dir
runtime
stress
syntax
typeparam [dev.typeparams] cmd/compile: handle interface type parameters in type switches 2021-08-10 01:56:50 +00:00
uintptrescapes.dir cmd/compile, syscall: add //go:uintptrescapes comment, and use it 2016-07-06 20:48:41 +00:00
64bit.go cmd/gc: Error out on division by constant zero. 2013-01-30 20:21:08 +01:00
235.go
alg.go test: add test that required algs get generated 2016-04-24 21:36:52 +00:00
alias.go
alias1.go
alias2.go
alias3.go [dev.typealias] cmd/compile: export/import test cases for type aliases 2017-01-20 05:55:53 +00:00
align.go
append.go
append1.go
args.go
armimm.go
assign.go
assign1.go
atomicload.go
bigalg.go
bigmap.go
blank.go
blank1.go [dev.typeparams] merge: merge branch 'dev.regabi' into 'dev.typeparams' 2020-12-14 12:13:36 -08:00
bom.go
bombad.go
bounds.go
cannotassign.go
chancap.go runtime: handle 64bits addresses for AIX 2018-11-26 14:06:28 +00:00
chanlinear.go
char_lit.go
char_lit1.go
checkbce.go cmd/compile: fix ordering for short-circuiting ops 2019-03-06 20:04:07 +00:00
clearfat.go
closedchan.go
closure.go test: enforce 1 proc in the test 2012-07-01 21:59:50 +04:00
closure1.go
closure2.go
closure3.go cmd/compile: disable inlining functions with closures for now 2021-02-24 21:34:21 +00:00
closure4.go
closure5.go
closure6.go
closure7.go
cmp.go
cmp6.go
cmplx.go
cmplxdivide.c
cmplxdivide.go
cmplxdivide1.go
complit.go
complit1.go
compos.go
const.go
const1.go
const2.go [dev.typeparams] test: add scaffolding to run.go to check compiler with -G flag 2020-12-01 21:49:31 +00:00
const3.go test: [a-c]: add introductory comments to tests 2012-02-19 13:19:43 +11:00
const4.go
const5.go
const6.go
const7.go
convert.go
convert1.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
convert2.go
convert3.go
convert4.go
convlit.go
convlit1.go
convT2X.go
copy.go test: ensure all failing tests exit nonzero. 2013-02-12 13:17:49 -05:00
copy1.go
crlf.go
ddd.go
ddd1.go
ddd2.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
decl.go test: ensure all failing tests exit nonzero. 2013-02-12 13:17:49 -05:00
declbad.go cmd/compile: rewrite a, b = f() to use temporaries when type not identical 2021-06-14 07:12:37 +00:00
defer.go
defererrcheck.go
deferfin.go
defernil.go
deferprint.go
deferprint.out
devirt.go [dev.typeparams] cmd/compile: simplify interface conversions 2021-08-09 16:10:20 +00:00
directive.go
divide.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
divmod.go
embedfunc.go
embedvers.go
empty.go
env.go
eof.go
eof1.go
escape.go
escape2.go
escape2n.go
escape3.go
escape4.go
escape5.go
escape_array.go
escape_calls.go
escape_closure.go
escape_field.go
escape_goto.go
escape_hash_maphash.go
escape_iface.go cmd/compile: fix devirtualization of promoted interface methods 2020-10-30 00:47:37 +00:00
escape_indir.go
escape_level.go
escape_map.go cmd/compile: use clearer error message for stuct literal 2020-09-12 08:31:49 +00:00
escape_param.go
escape_runtime_atomic.go
escape_selfassign.go
escape_slice.go
escape_struct_param1.go
escape_struct_param2.go
escape_struct_return.go
escape_sync_atomic.go
escape_unsafe.go
fibo.go
finprofiled.go
float_lit.go
float_lit2.go
float_lit3.go
floatcmp.go
for.go
func.go test: explanatory comments [c-g]* 2012-02-19 14:28:53 +11:00
func1.go
func2.go
func3.go
func4.go
func5.go
func6.go
func7.go
func8.go
funcdup.go
funcdup2.go
fuse.go
gc.go
gc1.go
gc2.go
gcgort.go test: fast GC+concurrency+types verification 2018-05-08 21:15:48 +00:00
gcstring.go
goprint.go
goprint.out
goto.go
heapsampling.go
helloworld.go
helloworld.out
if.go
import.go test: commentary for [h-m]*.go 2012-02-23 18:47:26 +11:00
import1.go
import2.go
import4.go
import5.go
import6.go
index.go
index0.go
index1.go
index2.go
indirect.go
indirect1.go
init.go
init1.go
initcomma.go
initempty.go
initexp.go
initialize.go test: commentary for [h-m]*.go 2012-02-23 18:47:26 +11:00
initializerr.go
initloop.go
inline.go
inline_big.go
inline_caller.go runtime: make FuncForPC return the innermost inlined frame 2019-01-08 21:54:04 +00:00
inline_callers.go
inline_literal.go cmd/compile: copy literals when inlining 2017-03-03 21:29:32 +00:00
inline_math_bits_rotate.go
inline_sync.go
inline_variadic.go
int_lit.go
intcvt.go
intrinsic.go
intrinsic_atomic.go
iota.go
label.go
label1.go
linkmain.go
linkmain_run.go test: avoid writing temporary files to GOROOT 2019-11-18 14:40:07 +00:00
linkname.go
linkname2.go [dev.regabi] cmd/compile: comment out //go:linkname warning 2020-12-02 06:49:37 +00:00
linkobj.go
linkx.go [dev.link] all: clean up some TODOs 2019-11-01 20:13:05 +00:00
linkx_run.go
literal.go
literal2.go
live.go [dev.typeparams] cmd/compile: simplify interface conversions 2021-08-09 16:10:20 +00:00
live1.go
live2.go
live_regabi.go [dev.typeparams] cmd/compile: simplify interface conversions 2021-08-09 16:10:20 +00:00
live_syscall.go
locklinear.go
loopbce.go
mainsig.go
makechan.go
makemap.go
makenew.go
makeslice.go cmd/compile: optimize make+copy pattern to avoid memclr 2020-05-07 17:50:24 +00:00
mallocfin.go
map.go
map1.go
mapclear.go
maplinear.go
mergemul.go
method.go
method1.go
method2.go
method3.go
method4.go
method5.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
method6.go
method7.go
named.go
named1.go
nil.go
nilcheck.go
nilptr.go test: disable nilptr on windows/arm64 2021-02-19 00:40:22 +00:00
nilptr2.go
nilptr3.go
nilptr4.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
nilptr5.go
nilptr5_aix.go
nilptr5_wasm.go
nilptr_aix.go
nosplit.go
notinheap.go
notinheap2.go cmd/compile: propagate go:notinheap implicitly 2020-09-17 19:35:53 +00:00
notinheap3.go
nowritebarrier.go cmd/compile: allow mid-stack inlining when there is a cycle of recursion 2020-04-03 21:43:52 +00:00
nul1.go
opt_branchlikely.go
parentype.go
peano.go
phiopt.go cmd/compile/internal/ssa: strengthen phiopt pass 2021-03-29 05:50:11 +00:00
print.go
print.out
printbig.go
printbig.out
prove.go docs: fix spelling 2021-02-24 04:11:43 +00:00
range.go cmd/compile: improve single blank variable handling in walkrange 2017-09-12 05:50:54 +00:00
README.md test: document specifying individual test files as operands 2020-08-28 21:23:32 +00:00
recover.go
recover1.go
recover2.go
recover3.go
recover4.go
recover5.go
reflectmethod1.go
reflectmethod2.go cmd/compile: track reflect.Type.Method in deadcode 2016-03-11 21:19:20 +00:00
reflectmethod3.go
reflectmethod4.go
reflectmethod5.go
reflectmethod6.go
reflectmethod7.go
reflectmethod8.go
rename.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
rename1.go
reorder.go
reorder2.go
retjmp.go
return.go
rotate.go
rotate0.go
rotate1.go
rotate2.go
rotate3.go
run.go
rune.go
runtime.go
shift1.go
shift2.go
sieve.go
sigchld.go
sigchld.out
simassign.go
sinit.go
sinit_run.go
sizeof.go
slice3.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
slice3err.go
slicecap.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
sliceopt.go cmd/compile: make prove pass use unsatisfiability 2018-03-08 22:25:25 +00:00
solitaire.go
stack.go
stackobj.go
stackobj2.go
stackobj3.go
strcopy.go
strength.go all: fix typos 2019-09-08 17:28:20 +00:00
string_lit.go
stringrange.go
struct0.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
switch.go
switch2.go
switch3.go
switch4.go
switch5.go
switch6.go [dev.typeparams] test: finish triaging all outstanding failing tests 2020-12-14 21:28:48 +00:00
switch7.go
tinyfin.go runtime: fix finalization and profiling of tiny allocations 2015-11-03 18:57:18 +00:00
torture.go
turing.go test/[n-z]*.go: add documentation 2012-02-24 11:48:19 +11:00
typecheck.go
typecheckloop.go
typeswitch.go
typeswitch1.go
typeswitch2.go
typeswitch2b.go
typeswitch3.go
uintptrescapes.go
uintptrescapes2.go
uintptrescapes3.go
undef.go
unsafebuiltins.go
used.go
utf.go
varerr.go
varinit.go
winbatch.go all: update to use filepath.WalkDir instead of filepath.Walk 2020-12-02 16:33:57 +00:00
writebarrier.go
zerodivide.go test: lock in test for _ assignment evaluation/zerodivide panic 2016-12-23 17:35:24 +00:00

The test directory contains tests of the Go tool chain and runtime. It includes black box tests, regression tests, and error output tests. They are run as part of all.bash.

To run just these tests, execute:

../bin/go run run.go

To run just tests from specified files in this directory, execute:

../bin/go run run.go -- file1.go file2.go ...

Standard library tests should be written as regular Go tests in the appropriate package.

The tool chain and runtime also have regular Go tests in their packages. The main reasons to add a new test to this directory are:

  • it is most naturally expressed using the test runner; or
  • it is also applicable to gccgo and other Go tool chains.