tree: 770d68412b75cc79f330b8c999134be5cab45c32 [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_make_non_const.go
  135. escape_map.go
  136. escape_mutations.go
  137. escape_param.go
  138. escape_reflect.go
  139. escape_runtime_atomic.go
  140. escape_selfassign.go
  141. escape_slice.go
  142. escape_struct_param1.go
  143. escape_struct_param2.go
  144. escape_struct_return.go
  145. escape_sync_atomic.go
  146. escape_unsafe.go
  147. fibo.go
  148. finprofiled.go
  149. float_lit.go
  150. float_lit2.go
  151. float_lit3.go
  152. floatcmp.go
  153. for.go
  154. func.go
  155. func1.go
  156. func2.go
  157. func3.go
  158. func4.go
  159. func5.go
  160. func6.go
  161. func7.go
  162. func8.go
  163. funcdup.go
  164. funcdup2.go
  165. fuse.go
  166. gc.go
  167. gc1.go
  168. gc2.go
  169. gcgort.go
  170. gcstring.go
  171. goprint.go
  172. goprint.out
  173. goto.go
  174. heapsampling.go
  175. helloworld.go
  176. helloworld.out
  177. if.go
  178. import.go
  179. import1.go
  180. import2.go
  181. import4.go
  182. import5.go
  183. import6.go
  184. index.go
  185. index0.go
  186. index1.go
  187. index2.go
  188. indirect.go
  189. indirect1.go
  190. init.go
  191. init1.go
  192. initcomma.go
  193. initexp.go
  194. initialize.go
  195. initializerr.go
  196. initloop.go
  197. inline.go
  198. inline_big.go
  199. inline_caller.go
  200. inline_callers.go
  201. inline_endian.go
  202. inline_literal.go
  203. inline_math_bits_rotate.go
  204. inline_sync.go
  205. inline_testingbloop.go
  206. inline_variadic.go
  207. int_lit.go
  208. intcvt.go
  209. intrinsic.go
  210. intrinsic_atomic.go
  211. iota.go
  212. label.go
  213. label1.go
  214. linkmain.go
  215. linkmain_run.go
  216. linkname.go
  217. linkname3.go
  218. linknameasm.go
  219. linkobj.go
  220. linkx.go
  221. linkx_run.go
  222. literal.go
  223. literal2.go
  224. live.go
  225. live1.go
  226. live2.go
  227. live_regabi.go
  228. live_uintptrkeepalive.go
  229. loopbce.go
  230. mainsig.go
  231. makechan.go
  232. makemap.go
  233. makenew.go
  234. makeslice.go
  235. mallocfin.go
  236. map.go
  237. map1.go
  238. mapclear.go
  239. maplinear.go
  240. maymorestack.go
  241. mergemul.go
  242. method.go
  243. method1.go
  244. method2.go
  245. method3.go
  246. method4.go
  247. method5.go
  248. method6.go
  249. method7.go
  250. named.go
  251. named1.go
  252. newinline.go
  253. nil.go
  254. nilcheck.go
  255. nilptr.go
  256. nilptr2.go
  257. nilptr3.go
  258. nilptr4.go
  259. nilptr5.go
  260. nilptr5_aix.go
  261. nilptr5_wasm.go
  262. nilptr_aix.go
  263. noinit.go
  264. nosplit.go
  265. nowritebarrier.go
  266. nul1.go
  267. opt_branchlikely.go
  268. parentype.go
  269. peano.go
  270. phiopt.go
  271. print.go
  272. print.out
  273. printbig.go
  274. printbig.out
  275. prove.go
  276. prove_constant_folding.go
  277. prove_invert_loop_with_unused_iterators.go
  278. range.go
  279. range2.go
  280. range3.go
  281. range4.go
  282. rangegen.go
  283. README.md
  284. recover.go
  285. recover1.go
  286. recover2.go
  287. recover3.go
  288. recover4.go
  289. recover5.go
  290. reflectmethod1.go
  291. reflectmethod2.go
  292. reflectmethod3.go
  293. reflectmethod4.go
  294. reflectmethod5.go
  295. reflectmethod6.go
  296. reflectmethod7.go
  297. reflectmethod8.go
  298. rename.go
  299. rename1.go
  300. reorder.go
  301. reorder2.go
  302. retjmp.go
  303. return.go
  304. rotate.go
  305. rotate0.go
  306. rotate1.go
  307. rotate2.go
  308. rotate3.go
  309. rune.go
  310. runtime.go
  311. shift1.go
  312. shift2.go
  313. shift3.go
  314. sieve.go
  315. sigchld.go
  316. sigchld.out
  317. simassign.go
  318. sizeof.go
  319. slice3.go
  320. slice3err.go
  321. slicecap.go
  322. sliceopt.go
  323. solitaire.go
  324. stack.go
  325. stackobj.go
  326. stackobj2.go
  327. stackobj3.go
  328. strcopy.go
  329. strength.go
  330. string_lit.go
  331. stringrange.go
  332. struct0.go
  333. switch.go
  334. switch2.go
  335. switch3.go
  336. switch4.go
  337. switch5.go
  338. switch6.go
  339. switch7.go
  340. tailcall.go
  341. tighten.go
  342. tinyfin.go
  343. torture.go
  344. turing.go
  345. typecheck.go
  346. typecheckloop.go
  347. typeswitch.go
  348. typeswitch1.go
  349. typeswitch2.go
  350. typeswitch2b.go
  351. typeswitch3.go
  352. uintptrescapes.go
  353. uintptrescapes2.go
  354. uintptrescapes3.go
  355. uintptrkeepalive.go
  356. undef.go
  357. unsafe_slice_data.go
  358. unsafe_string.go
  359. unsafe_string_data.go
  360. unsafebuiltins.go
  361. used.go
  362. utf.go
  363. varerr.go
  364. varinit.go
  365. wasmexport.go
  366. wasmexport2.go
  367. wasmmemsize.go
  368. weak.go
  369. winbatch.go
  370. writebarrier.go
  371. zerodivide.go
  372. 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.