tree: 30de867431799aefd147fa352f5ede310f216685 [path history] [tgz]
  1. abi/
  2. alias3.dir/
  3. arenas/
  4. asmhdr.dir/
  5. chan/
  6. closure3.dir/
  7. closure5.dir/
  8. codegen/
  9. ddd2.dir/
  10. dwarf/
  11. fixedbugs/
  12. import2.dir/
  13. import4.dir/
  14. interface/
  15. intrinsic.dir/
  16. ken/
  17. linkname.dir/
  18. linknameasm.dir/
  19. method4.dir/
  20. retjmp.dir/
  21. runtime/
  22. stress/
  23. syntax/
  24. typeparam/
  25. uintptrescapes.dir/
  26. 235.go
  27. 64bit.go
  28. alg.go
  29. alias.go
  30. alias1.go
  31. alias2.go
  32. alias3.go
  33. align.go
  34. append.go
  35. append1.go
  36. args.go
  37. armimm.go
  38. asmhdr.go
  39. assign.go
  40. assign1.go
  41. atomicload.go
  42. bigalg.go
  43. bigmap.go
  44. blank.go
  45. blank1.go
  46. bom.go
  47. bombad.go
  48. bounds.go
  49. cannotassign.go
  50. chancap.go
  51. chanlinear.go
  52. char_lit.go
  53. char_lit1.go
  54. checkbce.go
  55. clear.go
  56. clearfat.go
  57. closedchan.go
  58. closure.go
  59. closure1.go
  60. closure2.go
  61. closure3.go
  62. closure4.go
  63. closure5.go
  64. closure6.go
  65. closure7.go
  66. cmp.go
  67. cmp6.go
  68. cmplx.go
  69. cmplxdivide.c
  70. cmplxdivide.go
  71. cmplxdivide1.go
  72. complit.go
  73. complit1.go
  74. compos.go
  75. const.go
  76. const1.go
  77. const2.go
  78. const3.go
  79. const4.go
  80. const5.go
  81. const6.go
  82. const7.go
  83. const8.go
  84. convert.go
  85. convert1.go
  86. convert2.go
  87. convert3.go
  88. convert4.go
  89. convinline.go
  90. convlit.go
  91. convlit1.go
  92. convT2X.go
  93. copy.go
  94. copy1.go
  95. crlf.go
  96. ddd.go
  97. ddd1.go
  98. ddd2.go
  99. decl.go
  100. declbad.go
  101. defer.go
  102. defererrcheck.go
  103. deferfin.go
  104. defernil.go
  105. deferprint.go
  106. deferprint.out
  107. devirt.go
  108. directive.go
  109. directive2.go
  110. divide.go
  111. divmod.go
  112. embedfunc.go
  113. embedvers.go
  114. empty.go
  115. env.go
  116. eof.go
  117. eof1.go
  118. escape.go
  119. escape2.go
  120. escape2n.go
  121. escape3.go
  122. escape4.go
  123. escape5.go
  124. escape_array.go
  125. escape_calls.go
  126. escape_closure.go
  127. escape_field.go
  128. escape_goto.go
  129. escape_hash_maphash.go
  130. escape_iface.go
  131. escape_indir.go
  132. escape_level.go
  133. escape_map.go
  134. escape_mutations.go
  135. escape_param.go
  136. escape_reflect.go
  137. escape_runtime_atomic.go
  138. escape_selfassign.go
  139. escape_slice.go
  140. escape_struct_param1.go
  141. escape_struct_param2.go
  142. escape_struct_return.go
  143. escape_sync_atomic.go
  144. escape_unsafe.go
  145. fibo.go
  146. finprofiled.go
  147. float_lit.go
  148. float_lit2.go
  149. float_lit3.go
  150. floatcmp.go
  151. for.go
  152. func.go
  153. func1.go
  154. func2.go
  155. func3.go
  156. func4.go
  157. func5.go
  158. func6.go
  159. func7.go
  160. func8.go
  161. funcdup.go
  162. funcdup2.go
  163. fuse.go
  164. gc.go
  165. gc1.go
  166. gc2.go
  167. gcgort.go
  168. gcstring.go
  169. goprint.go
  170. goprint.out
  171. goto.go
  172. heapsampling.go
  173. helloworld.go
  174. helloworld.out
  175. if.go
  176. import.go
  177. import1.go
  178. import2.go
  179. import4.go
  180. import5.go
  181. import6.go
  182. index.go
  183. index0.go
  184. index1.go
  185. index2.go
  186. indirect.go
  187. indirect1.go
  188. init.go
  189. init1.go
  190. initcomma.go
  191. initexp.go
  192. initialize.go
  193. initializerr.go
  194. initloop.go
  195. inline.go
  196. inline_big.go
  197. inline_caller.go
  198. inline_callers.go
  199. inline_endian.go
  200. inline_literal.go
  201. inline_math_bits_rotate.go
  202. inline_sync.go
  203. inline_variadic.go
  204. int_lit.go
  205. intcvt.go
  206. intrinsic.go
  207. intrinsic_atomic.go
  208. iota.go
  209. label.go
  210. label1.go
  211. linkmain.go
  212. linkmain_run.go
  213. linkname.go
  214. linkname3.go
  215. linknameasm.go
  216. linkobj.go
  217. linkx.go
  218. linkx_run.go
  219. literal.go
  220. literal2.go
  221. live.go
  222. live1.go
  223. live2.go
  224. live_regabi.go
  225. live_uintptrkeepalive.go
  226. loopbce.go
  227. mainsig.go
  228. makechan.go
  229. makemap.go
  230. makenew.go
  231. makeslice.go
  232. mallocfin.go
  233. map.go
  234. map1.go
  235. mapclear.go
  236. maplinear.go
  237. maymorestack.go
  238. mergemul.go
  239. method.go
  240. method1.go
  241. method2.go
  242. method3.go
  243. method4.go
  244. method5.go
  245. method6.go
  246. method7.go
  247. named.go
  248. named1.go
  249. newinline.go
  250. nil.go
  251. nilcheck.go
  252. nilptr.go
  253. nilptr2.go
  254. nilptr3.go
  255. nilptr4.go
  256. nilptr5.go
  257. nilptr5_aix.go
  258. nilptr5_wasm.go
  259. nilptr_aix.go
  260. noinit.go
  261. nosplit.go
  262. nowritebarrier.go
  263. nul1.go
  264. opt_branchlikely.go
  265. parentype.go
  266. peano.go
  267. phiopt.go
  268. print.go
  269. print.out
  270. printbig.go
  271. printbig.out
  272. prove.go
  273. prove_constant_folding.go
  274. prove_invert_loop_with_unused_iterators.go
  275. range.go
  276. range2.go
  277. range3.go
  278. range4.go
  279. rangegen.go
  280. README.md
  281. recover.go
  282. recover1.go
  283. recover2.go
  284. recover3.go
  285. recover4.go
  286. recover5.go
  287. reflectmethod1.go
  288. reflectmethod2.go
  289. reflectmethod3.go
  290. reflectmethod4.go
  291. reflectmethod5.go
  292. reflectmethod6.go
  293. reflectmethod7.go
  294. reflectmethod8.go
  295. rename.go
  296. rename1.go
  297. reorder.go
  298. reorder2.go
  299. retjmp.go
  300. return.go
  301. rotate.go
  302. rotate0.go
  303. rotate1.go
  304. rotate2.go
  305. rotate3.go
  306. rune.go
  307. runtime.go
  308. shift1.go
  309. shift2.go
  310. shift3.go
  311. sieve.go
  312. sigchld.go
  313. sigchld.out
  314. simassign.go
  315. sizeof.go
  316. slice3.go
  317. slice3err.go
  318. slicecap.go
  319. sliceopt.go
  320. solitaire.go
  321. stack.go
  322. stackobj.go
  323. stackobj2.go
  324. stackobj3.go
  325. strcopy.go
  326. strength.go
  327. string_lit.go
  328. stringrange.go
  329. struct0.go
  330. switch.go
  331. switch2.go
  332. switch3.go
  333. switch4.go
  334. switch5.go
  335. switch6.go
  336. switch7.go
  337. tighten.go
  338. tinyfin.go
  339. torture.go
  340. turing.go
  341. typecheck.go
  342. typecheckloop.go
  343. typeswitch.go
  344. typeswitch1.go
  345. typeswitch2.go
  346. typeswitch2b.go
  347. typeswitch3.go
  348. uintptrescapes.go
  349. uintptrescapes2.go
  350. uintptrescapes3.go
  351. uintptrkeepalive.go
  352. undef.go
  353. unsafe_slice_data.go
  354. unsafe_string.go
  355. unsafe_string_data.go
  356. unsafebuiltins.go
  357. used.go
  358. utf.go
  359. varerr.go
  360. varinit.go
  361. winbatch.go
  362. writebarrier.go
  363. zerodivide.go
  364. zerosize.go
test/README.md

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 test cmd/internal/testdir

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

../bin/go test cmd/internal/testdir -run='Test/(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.