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