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