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