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