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