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