summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOndřej Surý <ondrej@sury.org>2012-02-29 11:23:13 +0100
committerOndřej Surý <ondrej@sury.org>2012-02-29 11:23:13 +0100
commitb6d7097a0d6072199f2cd74d67404890697cf78a (patch)
treea2193c528a79fd5606507568859ee5067c6b86e4 /test
parent4cecda6c347bd6902b960c6a35a967add7070b0d (diff)
downloadgolang-b6d7097a0d6072199f2cd74d67404890697cf78a.tar.gz
Imported Upstream version 2012.02.22upstream-weekly/2012.02.22
Diffstat (limited to 'test')
-rw-r--r--test/235.go5
-rw-r--r--test/alias.go7
-rw-r--r--test/alias1.go6
-rw-r--r--test/append.go19
-rw-r--r--test/args.go2
-rw-r--r--test/assign.go5
-rw-r--r--test/assign1.go5
-rw-r--r--test/bench/garbage/parser.go20
-rw-r--r--test/bench/garbage/peano.go2
-rw-r--r--test/bench/garbage/stats.go3
-rw-r--r--test/bench/garbage/tree2.go15
-rw-r--r--test/bench/go1/Makefile3
-rw-r--r--test/bigalg.go4
-rw-r--r--test/bigmap.go4
-rw-r--r--test/blank.go4
-rw-r--r--test/blank1.go5
-rw-r--r--test/chan/doubleselect.go5
-rw-r--r--test/chan/fifo.go4
-rw-r--r--test/chan/goroutines.go6
-rw-r--r--test/chan/nonblock.go6
-rw-r--r--test/chan/perm.go6
-rw-r--r--test/chan/powser1.go4
-rw-r--r--test/chan/powser2.go11
-rw-r--r--test/chan/select.go4
-rw-r--r--test/chan/select2.go13
-rw-r--r--test/chan/select3.go8
-rw-r--r--test/chan/select4.go4
-rw-r--r--test/chan/select5.go5
-rw-r--r--test/chan/select6.go4
-rw-r--r--test/chan/select7.go2
-rw-r--r--test/chan/sendstmt.go2
-rw-r--r--test/chan/sieve1.go4
-rw-r--r--test/chan/sieve2.go4
-rw-r--r--test/chan/zerosize.go4
-rw-r--r--test/chancap.go4
-rw-r--r--test/char_lit.go4
-rw-r--r--test/char_lit1.go5
-rw-r--r--test/closedchan.go2
-rw-r--r--test/closure.go15
-rw-r--r--test/cmp.go23
-rw-r--r--test/cmp6.go10
-rw-r--r--test/cmplx.go5
-rw-r--r--test/complit.go4
-rw-r--r--test/complit1.go9
-rw-r--r--test/compos.go4
-rw-r--r--test/const.go4
-rw-r--r--test/const1.go60
-rw-r--r--test/const2.go11
-rw-r--r--test/const3.go4
-rw-r--r--test/convert.go4
-rw-r--r--test/convert1.go69
-rw-r--r--test/convert3.go5
-rw-r--r--test/convlit.go9
-rw-r--r--test/convlit1.go5
-rw-r--r--test/copy.go4
-rw-r--r--test/ddd.go4
-rw-r--r--test/ddd1.go5
-rw-r--r--test/ddd2.go2
-rw-r--r--test/ddd3.go2
-rw-r--r--test/decl.go4
-rw-r--r--test/declbad.go5
-rw-r--r--test/defer.go4
-rw-r--r--test/deferprint.go5
-rw-r--r--test/divide.go4
-rw-r--r--test/dwarf/linedirectives.go2
-rw-r--r--test/empty.go5
-rw-r--r--test/env.go17
-rw-r--r--test/eof.go5
-rw-r--r--test/eof1.go7
-rw-r--r--test/escape.go6
-rw-r--r--test/escape2.go3
-rw-r--r--test/escape3.go4
-rw-r--r--test/fixedbugs/bug000.go2
-rw-r--r--test/fixedbugs/bug002.go2
-rw-r--r--test/fixedbugs/bug003.go2
-rw-r--r--test/fixedbugs/bug004.go2
-rw-r--r--test/fixedbugs/bug005.go2
-rw-r--r--test/fixedbugs/bug006.go2
-rw-r--r--test/fixedbugs/bug007.go2
-rw-r--r--test/fixedbugs/bug008.go2
-rw-r--r--test/fixedbugs/bug009.go2
-rw-r--r--test/fixedbugs/bug010.go2
-rw-r--r--test/fixedbugs/bug011.go2
-rw-r--r--test/fixedbugs/bug012.go2
-rw-r--r--test/fixedbugs/bug013.go2
-rw-r--r--test/fixedbugs/bug014.go2
-rw-r--r--test/fixedbugs/bug015.go2
-rw-r--r--test/fixedbugs/bug016.go2
-rw-r--r--test/fixedbugs/bug017.go2
-rw-r--r--test/fixedbugs/bug020.go2
-rw-r--r--test/fixedbugs/bug021.go2
-rw-r--r--test/fixedbugs/bug022.go2
-rw-r--r--test/fixedbugs/bug023.go2
-rw-r--r--test/fixedbugs/bug024.go2
-rw-r--r--test/fixedbugs/bug026.go2
-rw-r--r--test/fixedbugs/bug027.go2
-rw-r--r--test/fixedbugs/bug028.go2
-rw-r--r--test/fixedbugs/bug030.go2
-rw-r--r--test/fixedbugs/bug031.go2
-rw-r--r--test/fixedbugs/bug035.go2
-rw-r--r--test/fixedbugs/bug037.go2
-rw-r--r--test/fixedbugs/bug038.go13
-rw-r--r--test/fixedbugs/bug039.go2
-rw-r--r--test/fixedbugs/bug040.go6
-rw-r--r--test/fixedbugs/bug045.go2
-rw-r--r--test/fixedbugs/bug046.go2
-rw-r--r--test/fixedbugs/bug047.go2
-rw-r--r--test/fixedbugs/bug048.go2
-rw-r--r--test/fixedbugs/bug049.go2
-rw-r--r--test/fixedbugs/bug050.go2
-rw-r--r--test/fixedbugs/bug051.go2
-rw-r--r--test/fixedbugs/bug052.go2
-rw-r--r--test/fixedbugs/bug053.go2
-rw-r--r--test/fixedbugs/bug054.go2
-rw-r--r--test/fixedbugs/bug055.go2
-rw-r--r--test/fixedbugs/bug056.go2
-rw-r--r--test/fixedbugs/bug057.go2
-rw-r--r--test/fixedbugs/bug058.go2
-rw-r--r--test/fixedbugs/bug059.go2
-rw-r--r--test/fixedbugs/bug060.go2
-rw-r--r--test/fixedbugs/bug061.go2
-rw-r--r--test/fixedbugs/bug062.go2
-rw-r--r--test/fixedbugs/bug063.go4
-rw-r--r--test/fixedbugs/bug064.go2
-rw-r--r--test/fixedbugs/bug065.go2
-rw-r--r--test/fixedbugs/bug066.go4
-rw-r--r--test/fixedbugs/bug067.go2
-rw-r--r--test/fixedbugs/bug068.go2
-rw-r--r--test/fixedbugs/bug069.go2
-rw-r--r--test/fixedbugs/bug070.go2
-rw-r--r--test/fixedbugs/bug071.go4
-rw-r--r--test/fixedbugs/bug072.go2
-rw-r--r--test/fixedbugs/bug073.go2
-rw-r--r--test/fixedbugs/bug074.go2
-rw-r--r--test/fixedbugs/bug075.go2
-rw-r--r--test/fixedbugs/bug076.go2
-rw-r--r--test/fixedbugs/bug077.go2
-rw-r--r--test/fixedbugs/bug078.go2
-rw-r--r--test/fixedbugs/bug080.go2
-rw-r--r--test/fixedbugs/bug081.go2
-rw-r--r--test/fixedbugs/bug082.go2
-rw-r--r--test/fixedbugs/bug084.go2
-rw-r--r--test/fixedbugs/bug085.go2
-rw-r--r--test/fixedbugs/bug086.go2
-rw-r--r--test/fixedbugs/bug087.go2
-rw-r--r--test/fixedbugs/bug089.go2
-rw-r--r--test/fixedbugs/bug090.go2
-rw-r--r--test/fixedbugs/bug091.go2
-rw-r--r--test/fixedbugs/bug092.go2
-rw-r--r--test/fixedbugs/bug093.go2
-rw-r--r--test/fixedbugs/bug094.go2
-rw-r--r--test/fixedbugs/bug096.go2
-rw-r--r--test/fixedbugs/bug097.go2
-rw-r--r--test/fixedbugs/bug098.go2
-rw-r--r--test/fixedbugs/bug099.go2
-rw-r--r--test/fixedbugs/bug101.go2
-rw-r--r--test/fixedbugs/bug102.go2
-rw-r--r--test/fixedbugs/bug103.go2
-rw-r--r--test/fixedbugs/bug104.go2
-rw-r--r--test/fixedbugs/bug107.go2
-rw-r--r--test/fixedbugs/bug108.go2
-rw-r--r--test/fixedbugs/bug109.go4
-rw-r--r--test/fixedbugs/bug110.go2
-rw-r--r--test/fixedbugs/bug111.go2
-rw-r--r--test/fixedbugs/bug112.go2
-rw-r--r--test/fixedbugs/bug113.go2
-rw-r--r--test/fixedbugs/bug114.go2
-rw-r--r--test/fixedbugs/bug115.go2
-rw-r--r--test/fixedbugs/bug116.go2
-rw-r--r--test/fixedbugs/bug117.go2
-rw-r--r--test/fixedbugs/bug118.go4
-rw-r--r--test/fixedbugs/bug119.go2
-rw-r--r--test/fixedbugs/bug120.go2
-rw-r--r--test/fixedbugs/bug121.go2
-rw-r--r--test/fixedbugs/bug122.go2
-rw-r--r--test/fixedbugs/bug123.go2
-rw-r--r--test/fixedbugs/bug126.go2
-rw-r--r--test/fixedbugs/bug127.go2
-rw-r--r--test/fixedbugs/bug128.go2
-rw-r--r--test/fixedbugs/bug129.go2
-rw-r--r--test/fixedbugs/bug130.go2
-rw-r--r--test/fixedbugs/bug131.go2
-rw-r--r--test/fixedbugs/bug132.go2
-rw-r--r--test/fixedbugs/bug135.go2
-rw-r--r--test/fixedbugs/bug136.go2
-rw-r--r--test/fixedbugs/bug137.go2
-rw-r--r--test/fixedbugs/bug139.go2
-rw-r--r--test/fixedbugs/bug140.go2
-rw-r--r--test/fixedbugs/bug141.go2
-rw-r--r--test/fixedbugs/bug142.go2
-rw-r--r--test/fixedbugs/bug143.go2
-rw-r--r--test/fixedbugs/bug144.go2
-rw-r--r--test/fixedbugs/bug145.go2
-rw-r--r--test/fixedbugs/bug146.go2
-rw-r--r--test/fixedbugs/bug147.go2
-rw-r--r--test/fixedbugs/bug148.go2
-rw-r--r--test/fixedbugs/bug149.go2
-rw-r--r--test/fixedbugs/bug150.go4
-rw-r--r--test/fixedbugs/bug151.go4
-rw-r--r--test/fixedbugs/bug1515.go2
-rw-r--r--test/fixedbugs/bug152.go2
-rw-r--r--test/fixedbugs/bug154.go2
-rw-r--r--test/fixedbugs/bug155.go2
-rw-r--r--test/fixedbugs/bug156.go2
-rw-r--r--test/fixedbugs/bug157.go2
-rw-r--r--test/fixedbugs/bug158.go2
-rw-r--r--test/fixedbugs/bug159.go2
-rw-r--r--test/fixedbugs/bug161.go2
-rw-r--r--test/fixedbugs/bug163.go2
-rw-r--r--test/fixedbugs/bug164.go2
-rw-r--r--test/fixedbugs/bug165.go2
-rw-r--r--test/fixedbugs/bug167.go2
-rw-r--r--test/fixedbugs/bug168.go2
-rw-r--r--test/fixedbugs/bug169.go2
-rw-r--r--test/fixedbugs/bug170.go2
-rw-r--r--test/fixedbugs/bug171.go2
-rw-r--r--test/fixedbugs/bug172.go2
-rw-r--r--test/fixedbugs/bug173.go2
-rw-r--r--test/fixedbugs/bug174.go2
-rw-r--r--test/fixedbugs/bug175.go2
-rw-r--r--test/fixedbugs/bug176.go2
-rw-r--r--test/fixedbugs/bug177.go2
-rw-r--r--test/fixedbugs/bug178.go2
-rw-r--r--test/fixedbugs/bug179.go2
-rw-r--r--test/fixedbugs/bug180.go2
-rw-r--r--test/fixedbugs/bug181.go2
-rw-r--r--test/fixedbugs/bug182.go2
-rw-r--r--test/fixedbugs/bug183.go2
-rw-r--r--test/fixedbugs/bug184.go2
-rw-r--r--test/fixedbugs/bug185.go2
-rw-r--r--test/fixedbugs/bug186.go2
-rw-r--r--test/fixedbugs/bug187.go2
-rw-r--r--test/fixedbugs/bug188.go2
-rw-r--r--test/fixedbugs/bug189.go2
-rw-r--r--test/fixedbugs/bug190.go2
-rw-r--r--test/fixedbugs/bug192.go2
-rw-r--r--test/fixedbugs/bug193.go2
-rw-r--r--test/fixedbugs/bug194.go2
-rw-r--r--test/fixedbugs/bug195.go4
-rw-r--r--test/fixedbugs/bug196.go2
-rw-r--r--test/fixedbugs/bug197.go2
-rw-r--r--test/fixedbugs/bug198.go2
-rw-r--r--test/fixedbugs/bug199.go2
-rw-r--r--test/fixedbugs/bug200.go2
-rw-r--r--test/fixedbugs/bug201.go2
-rw-r--r--test/fixedbugs/bug202.go2
-rw-r--r--test/fixedbugs/bug203.go2
-rw-r--r--test/fixedbugs/bug204.go2
-rw-r--r--test/fixedbugs/bug205.go2
-rw-r--r--test/fixedbugs/bug207.go2
-rw-r--r--test/fixedbugs/bug208.go2
-rw-r--r--test/fixedbugs/bug209.go2
-rw-r--r--test/fixedbugs/bug211.go2
-rw-r--r--test/fixedbugs/bug212.go2
-rw-r--r--test/fixedbugs/bug213.go2
-rw-r--r--test/fixedbugs/bug214.go2
-rw-r--r--test/fixedbugs/bug215.go2
-rw-r--r--test/fixedbugs/bug216.go2
-rw-r--r--test/fixedbugs/bug217.go2
-rw-r--r--test/fixedbugs/bug218.go2
-rw-r--r--test/fixedbugs/bug219.go4
-rw-r--r--test/fixedbugs/bug221.go2
-rw-r--r--test/fixedbugs/bug224.go2
-rw-r--r--test/fixedbugs/bug225.go2
-rw-r--r--test/fixedbugs/bug227.go2
-rw-r--r--test/fixedbugs/bug228.go2
-rw-r--r--test/fixedbugs/bug229.go2
-rw-r--r--test/fixedbugs/bug230.go2
-rw-r--r--test/fixedbugs/bug231.go2
-rw-r--r--test/fixedbugs/bug232.go4
-rw-r--r--test/fixedbugs/bug233.go4
-rw-r--r--test/fixedbugs/bug234.go2
-rw-r--r--test/fixedbugs/bug235.go4
-rw-r--r--test/fixedbugs/bug236.go2
-rw-r--r--test/fixedbugs/bug237.go2
-rw-r--r--test/fixedbugs/bug238.go2
-rw-r--r--test/fixedbugs/bug239.go2
-rw-r--r--test/fixedbugs/bug240.go2
-rw-r--r--test/fixedbugs/bug241.go2
-rw-r--r--test/fixedbugs/bug242.go2
-rw-r--r--test/fixedbugs/bug243.go2
-rw-r--r--test/fixedbugs/bug244.go2
-rw-r--r--test/fixedbugs/bug245.go2
-rw-r--r--test/fixedbugs/bug246.go2
-rw-r--r--test/fixedbugs/bug247.go2
-rw-r--r--test/fixedbugs/bug249.go2
-rw-r--r--test/fixedbugs/bug250.go4
-rw-r--r--test/fixedbugs/bug251.go4
-rw-r--r--test/fixedbugs/bug252.go2
-rw-r--r--test/fixedbugs/bug253.go2
-rw-r--r--test/fixedbugs/bug254.go2
-rw-r--r--test/fixedbugs/bug255.go2
-rw-r--r--test/fixedbugs/bug256.go2
-rw-r--r--test/fixedbugs/bug257.go2
-rw-r--r--test/fixedbugs/bug258.go2
-rw-r--r--test/fixedbugs/bug259.go2
-rw-r--r--test/fixedbugs/bug260.go2
-rw-r--r--test/fixedbugs/bug261.go2
-rw-r--r--test/fixedbugs/bug262.go6
-rw-r--r--test/fixedbugs/bug263.go2
-rw-r--r--test/fixedbugs/bug264.go2
-rw-r--r--test/fixedbugs/bug265.go2
-rw-r--r--test/fixedbugs/bug266.go2
-rw-r--r--test/fixedbugs/bug267.go4
-rw-r--r--test/fixedbugs/bug269.go2
-rw-r--r--test/fixedbugs/bug271.go2
-rw-r--r--test/fixedbugs/bug272.go2
-rw-r--r--test/fixedbugs/bug273.go2
-rw-r--r--test/fixedbugs/bug274.go2
-rw-r--r--test/fixedbugs/bug275.go2
-rw-r--r--test/fixedbugs/bug276.go2
-rw-r--r--test/fixedbugs/bug277.go2
-rw-r--r--test/fixedbugs/bug278.go2
-rw-r--r--test/fixedbugs/bug279.go2
-rw-r--r--test/fixedbugs/bug280.go2
-rw-r--r--test/fixedbugs/bug281.go2
-rw-r--r--test/fixedbugs/bug283.go4
-rw-r--r--test/fixedbugs/bug284.go2
-rw-r--r--test/fixedbugs/bug285.go2
-rw-r--r--test/fixedbugs/bug286.go2
-rw-r--r--test/fixedbugs/bug287.go2
-rw-r--r--test/fixedbugs/bug288.go2
-rw-r--r--test/fixedbugs/bug289.go2
-rw-r--r--test/fixedbugs/bug290.go2
-rw-r--r--test/fixedbugs/bug291.go2
-rw-r--r--test/fixedbugs/bug292.go2
-rw-r--r--test/fixedbugs/bug293.go2
-rw-r--r--test/fixedbugs/bug294.go2
-rw-r--r--test/fixedbugs/bug295.go2
-rw-r--r--test/fixedbugs/bug296.go2
-rw-r--r--test/fixedbugs/bug297.go2
-rw-r--r--test/fixedbugs/bug298.go2
-rw-r--r--test/fixedbugs/bug299.go2
-rw-r--r--test/fixedbugs/bug300.go2
-rw-r--r--test/fixedbugs/bug301.go2
-rw-r--r--test/fixedbugs/bug302.go2
-rw-r--r--test/fixedbugs/bug303.go2
-rw-r--r--test/fixedbugs/bug304.go2
-rw-r--r--test/fixedbugs/bug305.go2
-rw-r--r--test/fixedbugs/bug307.go2
-rw-r--r--test/fixedbugs/bug308.go2
-rw-r--r--test/fixedbugs/bug309.go4
-rw-r--r--test/fixedbugs/bug311.go2
-rw-r--r--test/fixedbugs/bug312.go2
-rw-r--r--test/fixedbugs/bug314.go2
-rw-r--r--test/fixedbugs/bug315.go2
-rw-r--r--test/fixedbugs/bug316.go2
-rw-r--r--test/fixedbugs/bug317.go2
-rw-r--r--test/fixedbugs/bug318.go2
-rw-r--r--test/fixedbugs/bug319.go2
-rw-r--r--test/fixedbugs/bug320.go2
-rw-r--r--test/fixedbugs/bug321.go2
-rw-r--r--test/fixedbugs/bug323.go2
-rw-r--r--test/fixedbugs/bug325.go2
-rw-r--r--test/fixedbugs/bug326.go2
-rw-r--r--test/fixedbugs/bug327.go2
-rw-r--r--test/fixedbugs/bug329.go2
-rw-r--r--test/fixedbugs/bug330.go2
-rw-r--r--test/fixedbugs/bug331.go2
-rw-r--r--test/fixedbugs/bug332.go2
-rw-r--r--test/fixedbugs/bug333.go2
-rw-r--r--test/fixedbugs/bug334.go2
-rw-r--r--test/fixedbugs/bug336.go2
-rw-r--r--test/fixedbugs/bug337.go2
-rw-r--r--test/fixedbugs/bug338.go2
-rw-r--r--test/fixedbugs/bug339.go2
-rw-r--r--test/fixedbugs/bug340.go2
-rw-r--r--test/fixedbugs/bug341.go2
-rw-r--r--test/fixedbugs/bug342.go2
-rw-r--r--test/fixedbugs/bug343.go2
-rw-r--r--test/fixedbugs/bug344.go2
-rw-r--r--test/fixedbugs/bug346.go2
-rw-r--r--test/fixedbugs/bug347.go2
-rw-r--r--test/fixedbugs/bug348.go2
-rw-r--r--test/fixedbugs/bug349.go2
-rw-r--r--test/fixedbugs/bug350.go2
-rw-r--r--test/fixedbugs/bug351.go2
-rw-r--r--test/fixedbugs/bug352.go2
-rw-r--r--test/fixedbugs/bug353.go2
-rw-r--r--test/fixedbugs/bug354.go4
-rw-r--r--test/fixedbugs/bug355.go2
-rw-r--r--test/fixedbugs/bug356.go2
-rw-r--r--test/fixedbugs/bug357.go2
-rw-r--r--test/fixedbugs/bug358.go2
-rw-r--r--test/fixedbugs/bug361.go2
-rw-r--r--test/fixedbugs/bug362.go2
-rw-r--r--test/fixedbugs/bug363.go2
-rw-r--r--test/fixedbugs/bug364.go2
-rw-r--r--test/fixedbugs/bug365.go2
-rw-r--r--test/fixedbugs/bug366.go2
-rw-r--r--test/fixedbugs/bug368.go2
-rw-r--r--test/fixedbugs/bug369.go2
-rw-r--r--test/fixedbugs/bug370.go2
-rw-r--r--test/fixedbugs/bug371.go2
-rw-r--r--test/fixedbugs/bug372.go2
-rw-r--r--test/fixedbugs/bug373.go2
-rw-r--r--test/fixedbugs/bug374.go6
-rw-r--r--test/fixedbugs/bug375.go2
-rw-r--r--test/fixedbugs/bug376.go2
-rw-r--r--test/fixedbugs/bug378.go2
-rw-r--r--test/fixedbugs/bug379.go2
-rw-r--r--test/fixedbugs/bug380.go2
-rw-r--r--test/fixedbugs/bug381.go19
-rw-r--r--test/fixedbugs/bug383.go8
-rw-r--r--test/fixedbugs/bug384.go2
-rw-r--r--test/fixedbugs/bug385_32.go2
-rw-r--r--test/fixedbugs/bug385_64.go2
-rw-r--r--test/fixedbugs/bug386.go6
-rw-r--r--test/fixedbugs/bug387.go2
-rw-r--r--test/fixedbugs/bug388.go16
-rw-r--r--test/fixedbugs/bug389.go4
-rw-r--r--test/fixedbugs/bug390.go4
-rw-r--r--test/fixedbugs/bug391.go2
-rw-r--r--test/fixedbugs/bug392.dir/one.go21
-rw-r--r--test/fixedbugs/bug392.dir/three.go13
-rw-r--r--test/fixedbugs/bug392.dir/two.go5
-rw-r--r--test/fixedbugs/bug392.go2
-rw-r--r--test/fixedbugs/bug393.go4
-rw-r--r--test/fixedbugs/bug394.go4
-rw-r--r--test/fixedbugs/bug397.go4
-rw-r--r--test/fixedbugs/bug398.go2
-rw-r--r--test/fixedbugs/bug399.go2
-rw-r--r--test/fixedbugs/bug401.go2
-rw-r--r--test/fixedbugs/bug402.go31
-rw-r--r--test/fixedbugs/bug403.go23
-rw-r--r--test/fixedbugs/bug404.dir/one.go19
-rw-r--r--test/fixedbugs/bug404.dir/two.go12
-rw-r--r--test/fixedbugs/bug404.go7
-rw-r--r--test/fixedbugs/bug405.go24
-rw-r--r--test/fixedbugs/bug406.go25
-rw-r--r--test/fixedbugs/bug407.dir/one.go20
-rw-r--r--test/fixedbugs/bug407.dir/two.go15
-rw-r--r--test/fixedbugs/bug407.go7
-rw-r--r--test/fixedbugs/bug409.go20
-rw-r--r--test/fixedbugs/bug409.out1
-rw-r--r--test/fixedbugs/bug410.go24
-rw-r--r--test/fixedbugs/bug411.go19
-rw-r--r--test/fixedbugs/bug412.go16
-rw-r--r--test/fixedbugs/bug413.go11
-rw-r--r--test/fixedbugs/bug414.dir/main.go18
-rw-r--r--test/fixedbugs/bug414.dir/p1.go21
-rw-r--r--test/fixedbugs/bug414.go7
-rw-r--r--test/fixedbugs/bug415.dir/main.go9
-rw-r--r--test/fixedbugs/bug415.dir/p.go14
-rw-r--r--test/fixedbugs/bug415.go9
-rw-r--r--test/fixedbugs/bug416.go13
-rw-r--r--test/fixedbugs/bug417.go32
-rw-r--r--test/fixedbugs/bug418.go22
-rw-r--r--test/fixedbugs/bug419.go17
-rw-r--r--test/fixedbugs/bug420.go14
-rw-r--r--test/fixedbugs/bug421.go17
-rw-r--r--test/fixedbugs/bug422.go11
-rw-r--r--test/fixedbugs/bug423.go277
-rw-r--r--test/float_lit.go4
-rw-r--r--test/floatcmp.go4
-rw-r--r--test/for.go4
-rw-r--r--test/func.go3
-rw-r--r--test/func1.go7
-rw-r--r--test/func2.go5
-rw-r--r--test/func3.go5
-rw-r--r--test/func4.go5
-rw-r--r--test/func5.go4
-rw-r--r--test/func6.go4
-rw-r--r--test/func7.go4
-rw-r--r--test/func8.go4
-rw-r--r--test/gc.go4
-rw-r--r--test/gc1.go4
-rw-r--r--test/gc2.go12
-rw-r--r--test/golden.out2
-rw-r--r--test/goprint.go2
-rw-r--r--test/goto.go5
-rw-r--r--test/hashmap.go181
-rw-r--r--test/if.go2
-rw-r--r--test/import.go2
-rw-r--r--test/import1.go2
-rw-r--r--test/import5.go (renamed from test/fixedbugs/bug036.go)10
-rw-r--r--test/indirect.go2
-rw-r--r--test/indirect1.go2
-rw-r--r--test/init.go2
-rw-r--r--test/init1.go16
-rw-r--r--test/initcomma.go12
-rw-r--r--test/initialize.go2
-rw-r--r--test/initializerr.go2
-rw-r--r--test/initsyscall.go26
-rw-r--r--test/int_lit.go2
-rw-r--r--test/intcvt.go2
-rw-r--r--test/interface/bigdata.go5
-rw-r--r--test/interface/convert.go5
-rw-r--r--test/interface/convert1.go5
-rw-r--r--test/interface/convert2.go5
-rw-r--r--test/interface/embed.go4
-rw-r--r--test/interface/embed0.go2
-rw-r--r--test/interface/embed1.go2
-rw-r--r--test/interface/embed2.go4
-rw-r--r--test/interface/explicit.go5
-rw-r--r--test/interface/fail.go4
-rw-r--r--test/interface/fake.go4
-rw-r--r--test/interface/noeq.go5
-rw-r--r--test/interface/pointer.go5
-rw-r--r--test/interface/private.go3
-rw-r--r--test/interface/private1.go2
-rw-r--r--test/interface/receiver.go6
-rw-r--r--test/interface/receiver1.go5
-rw-r--r--test/interface/recursive.go4
-rw-r--r--test/interface/recursive1.go2
-rw-r--r--test/interface/recursive2.go2
-rw-r--r--test/interface/returntype.go4
-rw-r--r--test/interface/struct.go4
-rw-r--r--test/iota.go2
-rw-r--r--test/ken/array.go5
-rw-r--r--test/ken/chan.go2
-rw-r--r--test/ken/chan1.go2
-rw-r--r--test/ken/complit.go2
-rw-r--r--test/ken/convert.go2
-rw-r--r--test/ken/cplx1.go2
-rw-r--r--test/ken/cplx2.go2
-rw-r--r--test/ken/cplx3.go2
-rw-r--r--test/ken/cplx4.go2
-rw-r--r--test/ken/cplx5.go2
-rw-r--r--test/ken/divconst.go2
-rw-r--r--test/ken/divmod.go2
-rw-r--r--test/ken/embed.go2
-rw-r--r--test/ken/for.go2
-rw-r--r--test/ken/interbasic.go2
-rw-r--r--test/ken/interfun.go2
-rw-r--r--test/ken/intervar.go2
-rw-r--r--test/ken/label.go2
-rw-r--r--test/ken/litfun.go2
-rw-r--r--test/ken/mfunc.go2
-rw-r--r--test/ken/modconst.go2
-rw-r--r--test/ken/ptrfun.go2
-rw-r--r--test/ken/ptrvar.go2
-rw-r--r--test/ken/range.go2
-rw-r--r--test/ken/rob1.go2
-rw-r--r--test/ken/rob2.go2
-rw-r--r--test/ken/robfor.go2
-rw-r--r--test/ken/robfunc.go2
-rw-r--r--test/ken/shift.go2
-rw-r--r--test/ken/simparray.go2
-rw-r--r--test/ken/simpbool.go2
-rw-r--r--test/ken/simpconv.go2
-rw-r--r--test/ken/simpfun.go2
-rw-r--r--test/ken/simpswitch.go2
-rw-r--r--test/ken/simpvar.go2
-rw-r--r--test/ken/slicearray.go2
-rw-r--r--test/ken/sliceslice.go2
-rw-r--r--test/ken/strvar.go2
-rw-r--r--test/label.go2
-rw-r--r--test/label1.go2
-rw-r--r--test/linkx.go15
-rw-r--r--test/literal.go2
-rw-r--r--test/malloc1.go25
-rw-r--r--test/mallocfin.go2
-rw-r--r--test/mallocrand.go92
-rw-r--r--test/mallocrep.go70
-rw-r--r--test/mallocrep1.go143
-rw-r--r--test/map.go51
-rw-r--r--test/map1.go2
-rw-r--r--test/method.go2
-rw-r--r--test/method1.go2
-rw-r--r--test/method2.go2
-rw-r--r--test/method3.go2
-rw-r--r--test/method4.go106
-rw-r--r--test/method4a.go40
-rw-r--r--test/named.go2
-rw-r--r--test/named1.go6
-rw-r--r--test/nil.go2
-rw-r--r--test/nilptr.go2
-rw-r--r--test/parentype.go2
-rw-r--r--test/peano.go2
-rw-r--r--test/range.go2
-rw-r--r--test/recover.go2
-rw-r--r--test/recover1.go2
-rw-r--r--test/recover2.go2
-rw-r--r--test/recover3.go2
-rw-r--r--test/rename.go2
-rw-r--r--test/rename1.go2
-rw-r--r--test/reorder.go2
-rw-r--r--test/reorder2.go2
-rwxr-xr-xtest/run18
-rw-r--r--test/run.go454
-rw-r--r--test/rune.go4
-rw-r--r--test/runtime.go2
-rw-r--r--test/safe/main.go14
-rw-r--r--test/safe/nousesafe.go8
-rw-r--r--test/safe/pkg.go16
-rw-r--r--test/safe/usesafe.go8
-rw-r--r--test/shift1.go2
-rw-r--r--test/shift2.go2
-rw-r--r--test/sieve.go4
-rw-r--r--test/simassign.go2
-rw-r--r--test/sizeof.go2
-rw-r--r--test/solitaire.go4
-rw-r--r--test/stack.go2
-rw-r--r--test/string_lit.go2
-rw-r--r--test/stringrange.go2
-rw-r--r--test/struct0.go2
-rw-r--r--test/switch.go2
-rw-r--r--test/switch1.go2
-rw-r--r--test/switch3.go12
-rw-r--r--test/syntax/chan.go2
-rw-r--r--test/syntax/chan1.go2
-rw-r--r--test/syntax/else.go4
-rw-r--r--test/syntax/forvar.go2
-rw-r--r--test/syntax/if.go2
-rw-r--r--test/syntax/import.go2
-rw-r--r--test/syntax/interface.go2
-rw-r--r--test/syntax/semi1.go2
-rw-r--r--test/syntax/semi2.go2
-rw-r--r--test/syntax/semi3.go2
-rw-r--r--test/syntax/semi4.go2
-rw-r--r--test/syntax/semi5.go2
-rw-r--r--test/syntax/semi6.go2
-rw-r--r--test/syntax/semi7.go2
-rw-r--r--test/syntax/topexpr.go2
-rw-r--r--test/syntax/typesw.go2
-rw-r--r--test/syntax/vareq.go2
-rw-r--r--test/syntax/vareq1.go2
-rw-r--r--test/test0.go2
-rw-r--r--test/testlib22
-rw-r--r--test/turing.go2
-rw-r--r--test/typeswitch.go2
-rw-r--r--test/typeswitch1.go2
-rw-r--r--test/typeswitch2.go6
-rw-r--r--test/typeswitch3.go6
-rw-r--r--test/undef.go2
-rw-r--r--test/utf.go2
-rw-r--r--test/varerr.go2
-rw-r--r--test/varinit.go2
-rw-r--r--test/zerodivide.go4
630 files changed, 2564 insertions, 1350 deletions
diff --git a/test/235.go b/test/235.go
index 03143a60d..6745dde41 100644
--- a/test/235.go
+++ b/test/235.go
@@ -1,9 +1,12 @@
-// $G $F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Solve the 2,3,5 problem (print all numbers with 2, 3, or 5 as factor) using channels.
+// Test the solution, silently.
+
package main
type T chan uint64
diff --git a/test/alias.go b/test/alias.go
index 639a9cabb..ec93a2d10 100644
--- a/test/alias.go
+++ b/test/alias.go
@@ -1,13 +1,14 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-package main
-
// Test that error messages say what the source file says
// (uint8 vs byte, int32 vs. rune).
+// Does not compile.
+
+package main
import (
"fmt"
diff --git a/test/alias1.go b/test/alias1.go
index e8ef8a23f..4219af8cd 100644
--- a/test/alias1.go
+++ b/test/alias1.go
@@ -1,14 +1,14 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-package main
-
// Test that dynamic interface checks treat byte=uint8
// and rune=int or rune=int32.
+package main
+
func main() {
var x interface{}
diff --git a/test/append.go b/test/append.go
index e178f4699..3f6251ee5 100644
--- a/test/append.go
+++ b/test/append.go
@@ -1,10 +1,10 @@
-// $G $F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// Semi-exhaustive test for append()
+// Semi-exhaustive test for the append predeclared function.
package main
@@ -27,6 +27,7 @@ func main() {
}
verifyStruct()
verifyInterface()
+ verifyType()
}
@@ -230,3 +231,17 @@ func verifyInterface() {
verify("interface l", append(s), s)
verify("interface m", append(s, e...), r)
}
+
+type T1 []int
+type T2 []int
+
+func verifyType() {
+ // The second argument to append has type []E where E is the
+ // element type of the first argument. Test that the compiler
+ // accepts two slice types that meet that requirement but are
+ // not assignment compatible. The return type of append is
+ // the type of the first argument.
+ t1 := T1{1}
+ t2 := T2{2}
+ verify("T1", append(t1, t2...), T1{1, 2})
+}
diff --git a/test/args.go b/test/args.go
index ba9a377a6..db624e9c2 100644
--- a/test/args.go
+++ b/test/args.go
@@ -4,6 +4,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test os.Args.
+
package main
import "os"
diff --git a/test/assign.go b/test/assign.go
index 2192f9ede..da0192f83 100644
--- a/test/assign.go
+++ b/test/assign.go
@@ -1,9 +1,12 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Verify simple assignment errors are caught by the compiler.
+// Does not compile.
+
package main
import "sync"
diff --git a/test/assign1.go b/test/assign1.go
index 71e5b4064..b9e0325ce 100644
--- a/test/assign1.go
+++ b/test/assign1.go
@@ -1,9 +1,12 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Verify assignment rules are enforced by the compiler.
+// Does not compile.
+
package main
type (
diff --git a/test/bench/garbage/parser.go b/test/bench/garbage/parser.go
index 9e15f6c0f..d66281b6b 100644
--- a/test/bench/garbage/parser.go
+++ b/test/bench/garbage/parser.go
@@ -73,7 +73,7 @@ func parseDir(dirpath string) map[string]*ast.Package {
}
func main() {
- st := &runtime.MemStats
+ st := new(runtime.MemStats)
packages = append(packages, packages...)
packages = append(packages, packages...)
n := flag.Int("n", 4, "iterations")
@@ -83,14 +83,17 @@ func main() {
var lastParsed []map[string]*ast.Package
var t0 time.Time
+ var numGC uint32
+ var pauseTotalNs uint64
pkgroot := runtime.GOROOT() + "/src/pkg/"
for pass := 0; pass < 2; pass++ {
// Once the heap is grown to full size, reset counters.
// This hides the start-up pauses, which are much smaller
// than the normal pauses and would otherwise make
// the average look much better than it actually is.
- st.NumGC = 0
- st.PauseTotalNs = 0
+ runtime.ReadMemStats(st)
+ numGC = st.NumGC
+ pauseTotalNs = st.PauseTotalNs
t0 = time.Now()
for i := 0; i < *n; i++ {
@@ -107,6 +110,9 @@ func main() {
}
t1 := time.Now()
+ runtime.ReadMemStats(st)
+ st.NumGC -= numGC
+ st.PauseTotalNs -= pauseTotalNs
fmt.Printf("Alloc=%d/%d Heap=%d Mallocs=%d PauseTime=%.3f/%d = %.3f\n",
st.Alloc, st.TotalAlloc,
st.Sys,
@@ -142,9 +148,7 @@ var packages = []string{
"container/list",
"container/ring",
"crypto/aes",
- "crypto/blowfish",
"crypto/hmac",
- "crypto/md4",
"crypto/md5",
"crypto/rand",
"crypto/rc4",
@@ -155,7 +159,6 @@ var packages = []string{
"crypto/subtle",
"crypto/tls",
"crypto/x509",
- "crypto/xtea",
"debug/dwarf",
"debug/macho",
"debug/elf",
@@ -164,7 +167,6 @@ var packages = []string{
"encoding/ascii85",
"encoding/base64",
"encoding/binary",
- "encoding/git85",
"encoding/hex",
"encoding/pem",
"os/exec",
@@ -193,8 +195,7 @@ var packages = []string{
"mime",
"net",
"os",
- "os/signal",
- "patch",
+ "exp/signal",
"path",
"math/rand",
"reflect",
@@ -219,6 +220,5 @@ var packages = []string{
"unicode",
"unicode/utf8",
"unicode/utf16",
- "websocket",
"encoding/xml",
}
diff --git a/test/bench/garbage/peano.go b/test/bench/garbage/peano.go
index f1ad6ed69..6c7e52314 100644
--- a/test/bench/garbage/peano.go
+++ b/test/bench/garbage/peano.go
@@ -1,4 +1,4 @@
-// $G $F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/bench/garbage/stats.go b/test/bench/garbage/stats.go
index 985e7eaf5..cdcb32f9b 100644
--- a/test/bench/garbage/stats.go
+++ b/test/bench/garbage/stats.go
@@ -12,7 +12,8 @@ import (
)
func gcstats(name string, n int, t time.Duration) {
- st := &runtime.MemStats
+ st := new(runtime.MemStats)
+ runtime.ReadMemStats(st)
fmt.Printf("garbage.%sMem Alloc=%d/%d Heap=%d NextGC=%d Mallocs=%d\n", name, st.Alloc, st.TotalAlloc, st.Sys, st.NextGC, st.Mallocs)
fmt.Printf("garbage.%s %d %d ns/op\n", name, n, t.Nanoseconds()/int64(n))
fmt.Printf("garbage.%sLastPause 1 %d ns/op\n", name, st.PauseNs[(st.NumGC-1)%uint32(len(st.PauseNs))])
diff --git a/test/bench/garbage/tree2.go b/test/bench/garbage/tree2.go
index 6d78f72c5..3db0a0ba3 100644
--- a/test/bench/garbage/tree2.go
+++ b/test/bench/garbage/tree2.go
@@ -30,6 +30,7 @@ var (
heap *Object
calls [20]int
numobjects int64
+ memstats runtime.MemStats
)
func buildHeap() {
@@ -55,10 +56,10 @@ func buildTree(objsize, size float64, depth int) (*Object, float64) {
func gc() {
runtime.GC()
- runtime.UpdateMemStats()
- pause := runtime.MemStats.PauseTotalNs
- inuse := runtime.MemStats.Alloc
- free := runtime.MemStats.TotalAlloc - inuse
+ runtime.ReadMemStats(&memstats)
+ pause := memstats.PauseTotalNs
+ inuse := memstats.Alloc
+ free := memstats.TotalAlloc - inuse
fmt.Printf("gc pause: %8.3f ms; collect: %8.0f MB; heapsize: %8.0f MB\n",
float64(pause-lastPauseNs)/1e6,
float64(free-lastFree)/1048576,
@@ -71,9 +72,9 @@ func main() {
flag.Parse()
buildHeap()
runtime.GOMAXPROCS(*cpus)
- runtime.UpdateMemStats()
- lastPauseNs = runtime.MemStats.PauseTotalNs
- lastFree = runtime.MemStats.TotalAlloc - runtime.MemStats.Alloc
+ runtime.ReadMemStats(&memstats)
+ lastPauseNs = memstats.PauseTotalNs
+ lastFree = memstats.TotalAlloc - memstats.Alloc
if *cpuprofile != "" {
f, err := os.Create(*cpuprofile)
if err != nil {
diff --git a/test/bench/go1/Makefile b/test/bench/go1/Makefile
index 94847438f..aa5585335 100644
--- a/test/bench/go1/Makefile
+++ b/test/bench/go1/Makefile
@@ -5,3 +5,6 @@ GOFILES=\
dummy.go\
include $(GOROOT)/src/Make.pkg
+
+test:
+ echo go1: tests disabled for now TODO
diff --git a/test/bigalg.go b/test/bigalg.go
index 902ba8410..55a15c30a 100644
--- a/test/bigalg.go
+++ b/test/bigalg.go
@@ -1,9 +1,11 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test the internal "algorithms" for objects larger than a word: hashing, equality etc.
+
package main
type T struct {
diff --git a/test/bigmap.go b/test/bigmap.go
index 843a15174..37e049846 100644
--- a/test/bigmap.go
+++ b/test/bigmap.go
@@ -1,9 +1,11 @@
-// $G $F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test behavior of maps with large elements.
+
package main
func seq(x, y int) [1000]byte {
diff --git a/test/blank.go b/test/blank.go
index d6c9e79c6..961ed153b 100644
--- a/test/blank.go
+++ b/test/blank.go
@@ -1,9 +1,11 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test behavior of the blank identifier (_).
+
package main
import _ "fmt"
diff --git a/test/blank1.go b/test/blank1.go
index bcc78466d..c6e038a0d 100644
--- a/test/blank1.go
+++ b/test/blank1.go
@@ -1,9 +1,12 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test that incorrect uses of the blank identifer are caught.
+// Does not compile.
+
package _ // ERROR "invalid package name _"
func main() {
diff --git a/test/chan/doubleselect.go b/test/chan/doubleselect.go
index f8d50c90c..ac559302d 100644
--- a/test/chan/doubleselect.go
+++ b/test/chan/doubleselect.go
@@ -1,11 +1,12 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// This test is designed to flush out the case where two cases of a select can
+// Test the situation in which two cases of a select can
// both end up running. See http://codereview.appspot.com/180068.
+
package main
import (
diff --git a/test/chan/fifo.go b/test/chan/fifo.go
index 0dddfcaa0..70d20b31f 100644
--- a/test/chan/fifo.go
+++ b/test/chan/fifo.go
@@ -1,10 +1,10 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// Verify that unbuffered channels act as pure fifos.
+// Test that unbuffered channels act as pure fifos.
package main
diff --git a/test/chan/goroutines.go b/test/chan/goroutines.go
index 371a17387..6ffae7df6 100644
--- a/test/chan/goroutines.go
+++ b/test/chan/goroutines.go
@@ -1,11 +1,11 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// make a lot of goroutines, threaded together.
-// tear them down cleanly.
+// Torture test for goroutines.
+// Make a lot of goroutines, threaded together, and tear them down cleanly.
package main
diff --git a/test/chan/nonblock.go b/test/chan/nonblock.go
index 9addf12e9..7e3c0c74d 100644
--- a/test/chan/nonblock.go
+++ b/test/chan/nonblock.go
@@ -1,11 +1,11 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// Verify channel operations that test for blocking
-// Use several sizes and types of operands
+// Test channel operations that test for blocking.
+// Use several sizes and types of operands.
package main
diff --git a/test/chan/perm.go b/test/chan/perm.go
index a43df1982..7e152c5eb 100644
--- a/test/chan/perm.go
+++ b/test/chan/perm.go
@@ -1,9 +1,13 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test various correct and incorrect permutations of send-only,
+// receive-only, and bidirectional channels.
+// Does not compile.
+
package main
var (
diff --git a/test/chan/powser1.go b/test/chan/powser1.go
index dc4ff5325..6bf2a9111 100644
--- a/test/chan/powser1.go
+++ b/test/chan/powser1.go
@@ -1,9 +1,11 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test concurrency primitives: power series.
+
// Power series package
// A power series is a channel, along which flow rational
// coefficients. A denominator of zero signifies the end.
diff --git a/test/chan/powser2.go b/test/chan/powser2.go
index bc329270d..33abd5c53 100644
--- a/test/chan/powser2.go
+++ b/test/chan/powser2.go
@@ -1,18 +1,21 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test concurrency primitives: power series.
+
+// Like powser1.go but uses channels of interfaces.
+// Has not been cleaned up as much as powser1.go, to keep
+// it distinct and therefore a different test.
+
// Power series package
// A power series is a channel, along which flow rational
// coefficients. A denominator of zero signifies the end.
// Original code in Newsqueak by Doug McIlroy.
// See Squinting at Power Series by Doug McIlroy,
// http://www.cs.bell-labs.com/who/rsc/thread/squint.pdf
-// Like powser1.go but uses channels of interfaces.
-// Has not been cleaned up as much as powser1.go, to keep
-// it distinct and therefore a different test.
package main
diff --git a/test/chan/select.go b/test/chan/select.go
index be4eb3f42..38fa7e1e3 100644
--- a/test/chan/select.go
+++ b/test/chan/select.go
@@ -1,9 +1,11 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test simple select.
+
package main
var counter uint
diff --git a/test/chan/select2.go b/test/chan/select2.go
index e24c51ed1..40bc357b5 100644
--- a/test/chan/select2.go
+++ b/test/chan/select2.go
@@ -1,9 +1,11 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test that selects do not consume undue memory.
+
package main
import "runtime"
@@ -35,14 +37,17 @@ func main() {
go sender(c, 100000)
receiver(c, dummy, 100000)
runtime.GC()
- runtime.MemStats.Alloc = 0
+ memstats := new(runtime.MemStats)
+ runtime.ReadMemStats(memstats)
+ alloc := memstats.Alloc
// second time shouldn't increase footprint by much
go sender(c, 100000)
receiver(c, dummy, 100000)
runtime.GC()
+ runtime.ReadMemStats(memstats)
- if runtime.MemStats.Alloc > 1e5 {
- println("BUG: too much memory for 100,000 selects:", runtime.MemStats.Alloc)
+ if memstats.Alloc-alloc > 1e5 {
+ println("BUG: too much memory for 100,000 selects:", memstats.Alloc-alloc)
}
}
diff --git a/test/chan/select3.go b/test/chan/select3.go
index d919de3e0..847d8ed37 100644
--- a/test/chan/select3.go
+++ b/test/chan/select3.go
@@ -1,10 +1,10 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// Tests verifying the semantics of the select statement
+// Test the semantics of the select statement
// for basic empty/non-empty cases.
package main
@@ -197,13 +197,13 @@ func main() {
})
testBlock(never, func() {
select {
- case x := <-closedch:
+ case x := (<-closedch):
_ = x
}
})
testBlock(never, func() {
select {
- case x, ok := <-closedch:
+ case x, ok := (<-closedch):
_, _ = x, ok
}
})
diff --git a/test/chan/select4.go b/test/chan/select4.go
index 26a55e6d4..500364038 100644
--- a/test/chan/select4.go
+++ b/test/chan/select4.go
@@ -1,9 +1,11 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file
+// Test that a select statement proceeds when a value is ready.
+
package main
func f() *int {
diff --git a/test/chan/select5.go b/test/chan/select5.go
index cc2cc7100..13cde1afe 100644
--- a/test/chan/select5.go
+++ b/test/chan/select5.go
@@ -7,7 +7,10 @@
// license that can be found in the LICENSE file.
// Generate test of channel operations and simple selects.
-// Only doing one real send or receive at a time, but phrased
+// The output of this program is compiled and run to do the
+// actual test.
+
+// Each test does only one real send or receive at a time, but phrased
// in various ways that the compiler may or may not rewrite
// into simpler expressions.
diff --git a/test/chan/select6.go b/test/chan/select6.go
index 2ba6810ac..af470a0d0 100644
--- a/test/chan/select6.go
+++ b/test/chan/select6.go
@@ -1,10 +1,10 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// Issue 2075
+// Test for select: Issue 2075
// A bug in select corrupts channel queues of failed cases
// if there are multiple waiters on those channels and the
// select is the last in the queue. If further waits are made
diff --git a/test/chan/select7.go b/test/chan/select7.go
index 5fed6cbd4..20456a9d6 100644
--- a/test/chan/select7.go
+++ b/test/chan/select7.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/chan/sendstmt.go b/test/chan/sendstmt.go
index ee6f765cf..a92c4f63a 100644
--- a/test/chan/sendstmt.go
+++ b/test/chan/sendstmt.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/chan/sieve1.go b/test/chan/sieve1.go
index 55076c925..acc310f6c 100644
--- a/test/chan/sieve1.go
+++ b/test/chan/sieve1.go
@@ -1,9 +1,11 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test concurrency primitives: classical inefficient concurrent prime sieve.
+
// Generate primes up to 100 using channels, checking the results.
// This sieve consists of a linear chain of divisibility filters,
// equivalent to trial-dividing each n by all primes p ≤ n.
diff --git a/test/chan/sieve2.go b/test/chan/sieve2.go
index 9a7ab1540..09e5c527b 100644
--- a/test/chan/sieve2.go
+++ b/test/chan/sieve2.go
@@ -1,9 +1,11 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test concurrency primitives: prime sieve of Eratosthenes.
+
// Generate primes up to 100 using channels, checking the results.
// This sieve is Eratosthenesque and only considers odd candidates.
// See discussion at <http://blog.onideas.ws/eratosthenes.go>.
diff --git a/test/chan/zerosize.go b/test/chan/zerosize.go
index 617c9dab3..50aca857c 100644
--- a/test/chan/zerosize.go
+++ b/test/chan/zerosize.go
@@ -1,10 +1,10 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// Making channels of a zero-sized type should not panic.
+// Test making channels of a zero-sized type.
package main
diff --git a/test/chancap.go b/test/chancap.go
index 3f3789fbc..b3e40233f 100644
--- a/test/chancap.go
+++ b/test/chancap.go
@@ -1,9 +1,11 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test the cap predeclared function applied to channels.
+
package main
func main() {
diff --git a/test/char_lit.go b/test/char_lit.go
index 99be77a57..836c3c1a2 100644
--- a/test/char_lit.go
+++ b/test/char_lit.go
@@ -1,9 +1,11 @@
-// $G $F.go && $L $F.$A &&./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test character literal syntax.
+
package main
import "os"
diff --git a/test/char_lit1.go b/test/char_lit1.go
index dc5385291..489744b6e 100644
--- a/test/char_lit1.go
+++ b/test/char_lit1.go
@@ -1,9 +1,12 @@
-// errchk $G -e $F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Verify that illegal character literals are detected.
+// Does not compile.
+
package main
const (
diff --git a/test/closedchan.go b/test/closedchan.go
index c2bbec59d..043a92d38 100644
--- a/test/closedchan.go
+++ b/test/closedchan.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/closure.go b/test/closure.go
index 97da1dd23..ae38900ba 100644
--- a/test/closure.go
+++ b/test/closure.go
@@ -1,9 +1,11 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test the behavior of closures.
+
package main
import "runtime"
@@ -92,8 +94,9 @@ func main() {
go h()
check([]int{100, 200, 101, 201, 500, 101, 201, 500})
- runtime.UpdateMemStats()
- n0 := runtime.MemStats.Mallocs
+ memstats := new(runtime.MemStats)
+ runtime.ReadMemStats(memstats)
+ n0 := memstats.Mallocs
x, y := newfunc(), newfunc()
if x(1) != 1 || y(2) != 2 {
@@ -101,8 +104,8 @@ func main() {
fail = true
}
- runtime.UpdateMemStats()
- if n0 != runtime.MemStats.Mallocs {
+ runtime.ReadMemStats(memstats)
+ if n0 != memstats.Mallocs {
println("newfunc allocated unexpectedly")
fail = true
}
@@ -110,7 +113,7 @@ func main() {
ff(1)
if fail {
- panic("fail")
+ panic("fail")
}
}
diff --git a/test/cmp.go b/test/cmp.go
index d51a11aa2..a56ca6ead 100644
--- a/test/cmp.go
+++ b/test/cmp.go
@@ -1,9 +1,11 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test equality and inequality operations.
+
package main
import "unsafe"
@@ -281,6 +283,25 @@ func main() {
isfalse(ix != z)
isfalse(iz != x)
}
+
+ // structs with _ fields
+ {
+ var x = struct {
+ x int
+ _ []int
+ y float64
+ _ float64
+ z int
+ }{
+ x: 1, y: 2, z: 3,
+ }
+ var ix interface{} = x
+
+ istrue(x == x)
+ istrue(x == ix)
+ istrue(ix == x)
+ istrue(ix == ix)
+ }
// arrays
{
diff --git a/test/cmp6.go b/test/cmp6.go
index 0113a69dd..7d99aae18 100644
--- a/test/cmp6.go
+++ b/test/cmp6.go
@@ -1,9 +1,12 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Verify that incorrect comparisons are detected.
+// Does not compile.
+
package main
func use(bool) {}
@@ -15,6 +18,10 @@ type T3 struct{ z []int }
var t3 T3
+type T4 struct { _ []int; a float64 }
+
+var t4 T4
+
func main() {
// Arguments to comparison must be
// assignable one to the other (or vice versa)
@@ -46,6 +53,7 @@ func main() {
// Comparison of structs should have a good message
use(t3 == t3) // ERROR "struct|expected"
+ use(t4 == t4) // ok; the []int is a blank field
// Slices, functions, and maps too.
var x []int
diff --git a/test/cmplx.go b/test/cmplx.go
index d5a77d684..248672e7d 100644
--- a/test/cmplx.go
+++ b/test/cmplx.go
@@ -1,9 +1,12 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Verify that incorrect invocations of the complex predeclared function are detected.
+// Does not compile.
+
package main
var (
diff --git a/test/complit.go b/test/complit.go
index 8dfc71dcb..649be6d4d 100644
--- a/test/complit.go
+++ b/test/complit.go
@@ -1,9 +1,11 @@
-// $G $F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test composite literals.
+
package main
type T struct {
diff --git a/test/complit1.go b/test/complit1.go
index aaf701f73..521401d73 100644
--- a/test/complit1.go
+++ b/test/complit1.go
@@ -1,9 +1,12 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Verify that illegal composite literals are detected.
+// Does not compile.
+
package main
var m map[int][3]int
@@ -34,6 +37,6 @@ type T struct {
var (
_ = &T{0, 0, "", nil} // ok
- _ = &T{i: 0, f: 0, s: "", next: {}} // ERROR "missing type in composite literal"
- _ = &T{0, 0, "", {}} // ERROR "missing type in composite literal"
+ _ = &T{i: 0, f: 0, s: "", next: {}} // ERROR "missing type in composite literal|omit types within composite literal"
+ _ = &T{0, 0, "", {}} // ERROR "missing type in composite literal|omit types within composite literal"
)
diff --git a/test/compos.go b/test/compos.go
index 70f90f379..de688b39b 100644
--- a/test/compos.go
+++ b/test/compos.go
@@ -1,9 +1,11 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG: compos
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test that returning &T{} from a function causes an allocation.
+
package main
type T struct {
diff --git a/test/const.go b/test/const.go
index a55e13a40..80fbfaf3e 100644
--- a/test/const.go
+++ b/test/const.go
@@ -1,9 +1,11 @@
-// $G $F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test simple boolean and numeric constants.
+
package main
const (
diff --git a/test/const1.go b/test/const1.go
index 67f36e4fd..f944cde96 100644
--- a/test/const1.go
+++ b/test/const1.go
@@ -1,9 +1,12 @@
-// errchk $G -e $F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Verify overflow is detected when using numeric constants.
+// Does not compile.
+
package main
type I interface{}
@@ -13,11 +16,11 @@ const (
Int8 int8 = 101
Minus1 int8 = -1
Uint8 uint8 = 102
- Const = 103
+ Const = 103
Float32 float32 = 104.5
Float64 float64 = 105.5
- ConstFloat = 106.5
+ ConstFloat = 106.5
Big float64 = 1e300
String = "abc"
@@ -35,32 +38,33 @@ var (
a8 = Int8 * Const / 100 // ERROR "overflow"
a9 = Int8 * (Const / 100) // OK
- b1 = Uint8 * Uint8 // ERROR "overflow"
- b2 = Uint8 * -1 // ERROR "overflow"
- b3 = Uint8 - Uint8 // OK
- b4 = Uint8 - Uint8 - Uint8 // ERROR "overflow"
- b5 = uint8(^0) // ERROR "overflow"
- b6 = ^uint8(0) // OK
- b7 = uint8(Minus1) // ERROR "overflow"
- b8 = uint8(int8(-1)) // ERROR "overflow"
- b8a = uint8(-1) // ERROR "overflow"
- b9 byte = (1 << 10) >> 8 // OK
- b10 byte = (1 << 10) // ERROR "overflow"
- b11 byte = (byte(1) << 10) >> 8 // ERROR "overflow"
- b12 byte = 1000 // ERROR "overflow"
- b13 byte = byte(1000) // ERROR "overflow"
- b14 byte = byte(100) * byte(100) // ERROR "overflow"
- b15 byte = byte(100) * 100 // ERROR "overflow"
- b16 byte = byte(0) * 1000 // ERROR "overflow"
- b16a byte = 0 * 1000 // OK
- b17 byte = byte(0) * byte(1000) // ERROR "overflow"
- b18 byte = Uint8 / 0 // ERROR "division by zero"
+ b1 = Uint8 * Uint8 // ERROR "overflow"
+ b2 = Uint8 * -1 // ERROR "overflow"
+ b3 = Uint8 - Uint8 // OK
+ b4 = Uint8 - Uint8 - Uint8 // ERROR "overflow"
+ b5 = uint8(^0) // ERROR "overflow"
+ b6 = ^uint8(0) // OK
+ b7 = uint8(Minus1) // ERROR "overflow"
+ b8 = uint8(int8(-1)) // ERROR "overflow"
+ b8a = uint8(-1) // ERROR "overflow"
+ b9 byte = (1 << 10) >> 8 // OK
+ b10 byte = (1 << 10) // ERROR "overflow"
+ b11 byte = (byte(1) << 10) >> 8 // ERROR "overflow"
+ b12 byte = 1000 // ERROR "overflow"
+ b13 byte = byte(1000) // ERROR "overflow"
+ b14 byte = byte(100) * byte(100) // ERROR "overflow"
+ b15 byte = byte(100) * 100 // ERROR "overflow"
+ b16 byte = byte(0) * 1000 // ERROR "overflow"
+ b16a byte = 0 * 1000 // OK
+ b17 byte = byte(0) * byte(1000) // ERROR "overflow"
+ b18 byte = Uint8 / 0 // ERROR "division by zero"
- c1 float64 = Big
- c2 float64 = Big * Big // ERROR "overflow"
- c3 float64 = float64(Big) * Big // ERROR "overflow"
- c4 = Big * Big // ERROR "overflow"
- c5 = Big / 0 // ERROR "division by zero"
+ c1 float64 = Big
+ c2 float64 = Big * Big // ERROR "overflow"
+ c3 float64 = float64(Big) * Big // ERROR "overflow"
+ c4 = Big * Big // ERROR "overflow"
+ c5 = Big / 0 // ERROR "division by zero"
+ c6 = 1000 % 1e3 // ERROR "floating-point % operation"
)
func f(int)
diff --git a/test/const2.go b/test/const2.go
index bea1b9912..97d3d4c7d 100644
--- a/test/const2.go
+++ b/test/const2.go
@@ -1,12 +1,21 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Verify that large integer constant expressions cause overflow.
+// Does not compile.
+
package main
const (
A int = 1
B byte; // ERROR "type without expr|expected .=."
)
+
+const LargeA = 1000000000000000000
+const LargeB = LargeA * LargeA * LargeA
+const LargeC = LargeB * LargeB * LargeB // ERROR "constant multiplication overflow"
+
+const AlsoLargeA = LargeA << 400 << 400 >> 400 >> 400 // ERROR "constant shift overflow"
diff --git a/test/const3.go b/test/const3.go
index 9bba6ced0..3f4e3d1ae 100644
--- a/test/const3.go
+++ b/test/const3.go
@@ -1,9 +1,11 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test typed integer constants.
+
package main
import "fmt"
diff --git a/test/convert.go b/test/convert.go
index 0a75663d0..7280edf33 100644
--- a/test/convert.go
+++ b/test/convert.go
@@ -1,9 +1,11 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test types of constant expressions, using reflect.
+
package main
import "reflect"
diff --git a/test/convert1.go b/test/convert1.go
index 9de1b7e01..0f417a338 100644
--- a/test/convert1.go
+++ b/test/convert1.go
@@ -1,9 +1,12 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Verify that illegal conversions involving strings are detected.
+// Does not compile.
+
package main
type Tbyte []byte
@@ -25,72 +28,72 @@ func main() {
_ = string(s)
_ = []byte(s)
_ = []rune(s)
- _ = []int64(s) // ERROR "cannot convert.*\[\]int64"
+ _ = []int64(s) // ERROR "cannot convert.*\[\]int64|invalid type conversion"
_ = Tstring(s)
_ = Tbyte(s)
_ = Trune(s)
- _ = Tint64(s) // ERROR "cannot convert.*Tint64"
+ _ = Tint64(s) // ERROR "cannot convert.*Tint64|invalid type conversion"
_ = string(sb)
_ = []byte(sb)
- _ = []rune(sb) // ERROR "cannot convert.*\[\]rune"
- _ = []int64(sb) // ERROR "cannot convert.*\[\]int64"
+ _ = []rune(sb) // ERROR "cannot convert.*\[\]rune|invalid type conversion"
+ _ = []int64(sb) // ERROR "cannot convert.*\[\]int64|invalid type conversion"
_ = Tstring(sb)
_ = Tbyte(sb)
- _ = Trune(sb) // ERROR "cannot convert.*Trune"
- _ = Tint64(sb) // ERROR "cannot convert.*Tint64"
+ _ = Trune(sb) // ERROR "cannot convert.*Trune|invalid type conversion"
+ _ = Tint64(sb) // ERROR "cannot convert.*Tint64|invalid type conversion"
_ = string(sr)
- _ = []byte(sr) // ERROR "cannot convert.*\[\]byte"
+ _ = []byte(sr) // ERROR "cannot convert.*\[\]byte|invalid type conversion"
_ = []rune(sr)
- _ = []int64(sr) // ERROR "cannot convert.*\[\]int64"
+ _ = []int64(sr) // ERROR "cannot convert.*\[\]int64|invalid type conversion"
_ = Tstring(sr)
- _ = Tbyte(sr) // ERROR "cannot convert.*Tbyte"
+ _ = Tbyte(sr) // ERROR "cannot convert.*Tbyte|invalid type conversion"
_ = Trune(sr)
- _ = Tint64(sr) // ERROR "cannot convert.*Tint64"
+ _ = Tint64(sr) // ERROR "cannot convert.*Tint64|invalid type conversion"
- _ = string(si) // ERROR "cannot convert.* string"
- _ = []byte(si) // ERROR "cannot convert.*\[\]byte"
- _ = []rune(si) // ERROR "cannot convert.*\[\]rune"
+ _ = string(si) // ERROR "cannot convert.* string|invalid type conversion"
+ _ = []byte(si) // ERROR "cannot convert.*\[\]byte|invalid type conversion"
+ _ = []rune(si) // ERROR "cannot convert.*\[\]rune|invalid type conversion"
_ = []int64(si)
- _ = Tstring(si) // ERROR "cannot convert.*Tstring"
- _ = Tbyte(si) // ERROR "cannot convert.*Tbyte"
- _ = Trune(si) // ERROR "cannot convert.*Trune"
+ _ = Tstring(si) // ERROR "cannot convert.*Tstring|invalid type conversion"
+ _ = Tbyte(si) // ERROR "cannot convert.*Tbyte|invalid type conversion"
+ _ = Trune(si) // ERROR "cannot convert.*Trune|invalid type conversion"
_ = Tint64(si)
_ = string(ts)
_ = []byte(ts)
_ = []rune(ts)
- _ = []int64(ts) // ERROR "cannot convert.*\[\]int64"
+ _ = []int64(ts) // ERROR "cannot convert.*\[\]int64|invalid type conversion"
_ = Tstring(ts)
_ = Tbyte(ts)
_ = Trune(ts)
- _ = Tint64(ts) // ERROR "cannot convert.*Tint64"
+ _ = Tint64(ts) // ERROR "cannot convert.*Tint64|invalid type conversion"
_ = string(tsb)
_ = []byte(tsb)
- _ = []rune(tsb) // ERROR "cannot convert.*\[\]rune"
- _ = []int64(tsb) // ERROR "cannot convert.*\[\]int64"
+ _ = []rune(tsb) // ERROR "cannot convert.*\[\]rune|invalid type conversion"
+ _ = []int64(tsb) // ERROR "cannot convert.*\[\]int64|invalid type conversion"
_ = Tstring(tsb)
_ = Tbyte(tsb)
- _ = Trune(tsb) // ERROR "cannot convert.*Trune"
- _ = Tint64(tsb) // ERROR "cannot convert.*Tint64"
+ _ = Trune(tsb) // ERROR "cannot convert.*Trune|invalid type conversion"
+ _ = Tint64(tsb) // ERROR "cannot convert.*Tint64|invalid type conversion"
_ = string(tsr)
- _ = []byte(tsr) // ERROR "cannot convert.*\[\]byte"
+ _ = []byte(tsr) // ERROR "cannot convert.*\[\]byte|invalid type conversion"
_ = []rune(tsr)
- _ = []int64(tsr) // ERROR "cannot convert.*\[\]int64"
+ _ = []int64(tsr) // ERROR "cannot convert.*\[\]int64|invalid type conversion"
_ = Tstring(tsr)
- _ = Tbyte(tsr) // ERROR "cannot convert.*Tbyte"
+ _ = Tbyte(tsr) // ERROR "cannot convert.*Tbyte|invalid type conversion"
_ = Trune(tsr)
- _ = Tint64(tsr) // ERROR "cannot convert.*Tint64"
+ _ = Tint64(tsr) // ERROR "cannot convert.*Tint64|invalid type conversion"
- _ = string(tsi) // ERROR "cannot convert.* string"
- _ = []byte(tsi) // ERROR "cannot convert.*\[\]byte"
- _ = []rune(tsi) // ERROR "cannot convert.*\[\]rune"
+ _ = string(tsi) // ERROR "cannot convert.* string|invalid type conversion"
+ _ = []byte(tsi) // ERROR "cannot convert.*\[\]byte|invalid type conversion"
+ _ = []rune(tsi) // ERROR "cannot convert.*\[\]rune|invalid type conversion"
_ = []int64(tsi)
- _ = Tstring(tsi) // ERROR "cannot convert.*Tstring"
- _ = Tbyte(tsi) // ERROR "cannot convert.*Tbyte"
- _ = Trune(tsi) // ERROR "cannot convert.*Trune"
+ _ = Tstring(tsi) // ERROR "cannot convert.*Tstring|invalid type conversion"
+ _ = Tbyte(tsi) // ERROR "cannot convert.*Tbyte|invalid type conversion"
+ _ = Trune(tsi) // ERROR "cannot convert.*Trune|invalid type conversion"
_ = Tint64(tsi)
}
diff --git a/test/convert3.go b/test/convert3.go
index be68c95b3..143aff04f 100644
--- a/test/convert3.go
+++ b/test/convert3.go
@@ -1,9 +1,12 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Verify allowed and disallowed conversions.
+// Does not compile.
+
package main
// everything here is legal except the ERROR line
diff --git a/test/convlit.go b/test/convlit.go
index 1e82d1f2f..8a6145d2a 100644
--- a/test/convlit.go
+++ b/test/convlit.go
@@ -1,14 +1,15 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Verify that illegal assignments with both explicit and implicit conversions of literals are detected.
+// Does not compile.
+
package main
-// explicit conversion of constants is work in progress.
-// the ERRORs in this block are debatable, but they're what
-// the language spec says for now.
+// explicit conversion of constants
var x1 = string(1)
var x2 string = string(1)
var x3 = int(1.5) // ERROR "convert|truncate"
diff --git a/test/convlit1.go b/test/convlit1.go
index 1e6673cb6..c06bd7443 100644
--- a/test/convlit1.go
+++ b/test/convlit1.go
@@ -1,9 +1,12 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Verify that illegal uses of composite literals are detected.
+// Does not compile.
+
package main
var a = []int { "a" }; // ERROR "conver|incompatible|cannot"
diff --git a/test/copy.go b/test/copy.go
index 0b5bddbed..65ffb6ff8 100644
--- a/test/copy.go
+++ b/test/copy.go
@@ -1,10 +1,10 @@
-// $G $F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// Semi-exhaustive test for copy()
+// Semi-exhaustive test for the copy predeclared function.
package main
diff --git a/test/ddd.go b/test/ddd.go
index b95d6e883..f35836331 100644
--- a/test/ddd.go
+++ b/test/ddd.go
@@ -1,9 +1,11 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test variadic functions and calls (dot-dot-dot).
+
package main
func sum(args ...int) int {
diff --git a/test/ddd1.go b/test/ddd1.go
index 6d84248e5..1e070093c 100644
--- a/test/ddd1.go
+++ b/test/ddd1.go
@@ -1,9 +1,12 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Verify that illegal uses of ... are detected.
+// Does not compile.
+
package main
import "unsafe"
diff --git a/test/ddd2.go b/test/ddd2.go
index a06af0c06..2edae36b1 100644
--- a/test/ddd2.go
+++ b/test/ddd2.go
@@ -4,6 +4,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// This file is compiled and then imported by ddd3.go.
+
package ddd
func Sum(args ...int) int {
diff --git a/test/ddd3.go b/test/ddd3.go
index 5d5ebdf0f..82fce3149 100644
--- a/test/ddd3.go
+++ b/test/ddd3.go
@@ -4,6 +4,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test that variadic functions work across package boundaries.
+
package main
import "./ddd2"
diff --git a/test/decl.go b/test/decl.go
index 95b6346c3..6f84245f1 100644
--- a/test/decl.go
+++ b/test/decl.go
@@ -1,10 +1,10 @@
-// $G $F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// Correct short declarations and redeclarations.
+// Test correct short declarations and redeclarations.
package main
diff --git a/test/declbad.go b/test/declbad.go
index 09f1dfb57..32d68e7ea 100644
--- a/test/declbad.go
+++ b/test/declbad.go
@@ -1,10 +1,11 @@
-// errchk $G -e $F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// Incorrect short declarations and redeclarations.
+// Test that incorrect short declarations and redeclarations are detected.
+// Does not compile.
package main
diff --git a/test/defer.go b/test/defer.go
index bef8fbe26..2f67d3560 100644
--- a/test/defer.go
+++ b/test/defer.go
@@ -1,9 +1,11 @@
-// $G $F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test defer.
+
package main
import "fmt"
diff --git a/test/deferprint.go b/test/deferprint.go
index 0e0c61821..eab7ed465 100644
--- a/test/deferprint.go
+++ b/test/deferprint.go
@@ -4,11 +4,14 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test that we can defer the predeclared functions print and println.
+
package main
func main() {
defer println(42, true, false, true, 1.5, "world", (chan int)(nil), []int(nil), (map[string]int)(nil), (func())(nil), byte(255))
defer println(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20)
-// defer panic("dead")
+ // Disabled so the test doesn't crash but left here for reference.
+ // defer panic("dead")
defer print("printing: ")
}
diff --git a/test/divide.go b/test/divide.go
index 5c0f45059..c91a33e9d 100644
--- a/test/divide.go
+++ b/test/divide.go
@@ -1,10 +1,10 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// divide corner cases
+// Test divide corner cases.
package main
diff --git a/test/dwarf/linedirectives.go b/test/dwarf/linedirectives.go
index 68434f0ab..cc4ffb000 100644
--- a/test/dwarf/linedirectives.go
+++ b/test/dwarf/linedirectives.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/empty.go b/test/empty.go
index fa10d6931..92a79a4e0 100644
--- a/test/empty.go
+++ b/test/empty.go
@@ -1,9 +1,12 @@
-// $G $D/$F.go
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test that top-level parenthesized declarations can be empty.
+// Compiles but does not run.
+
package P
import ( )
diff --git a/test/env.go b/test/env.go
index a4b9d05d8..972374679 100644
--- a/test/env.go
+++ b/test/env.go
@@ -1,9 +1,12 @@
-// $G $F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test that the Go environment variables are present and accessible through
+// package os and package runtime.
+
package main
import (
@@ -12,18 +15,14 @@ import (
)
func main() {
- ga, e0 := os.Getenverror("GOARCH")
- if e0 != nil {
- print("$GOARCH: ", e0.Error(), "\n")
- os.Exit(1)
- }
+ ga := os.Getenv("GOARCH")
if ga != runtime.GOARCH {
print("$GOARCH=", ga, "!= runtime.GOARCH=", runtime.GOARCH, "\n")
os.Exit(1)
}
- xxx, e1 := os.Getenverror("DOES_NOT_EXIST")
- if e1 != os.ENOENV {
- print("$DOES_NOT_EXIST=", xxx, "; err = ", e1.Error(), "\n")
+ xxx := os.Getenv("DOES_NOT_EXIST")
+ if xxx != "" {
+ print("$DOES_NOT_EXIST=", xxx, "\n")
os.Exit(1)
}
}
diff --git a/test/eof.go b/test/eof.go
index 81f9fd028..06c779046 100644
--- a/test/eof.go
+++ b/test/eof.go
@@ -1,9 +1,12 @@
-// $G $D/$F.go
+// compile
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test a source file does not need a final newline.
+// Compiles but does not run.
+
// No newline at the end of this file.
package main \ No newline at end of file
diff --git a/test/eof1.go b/test/eof1.go
index c39a3cfdb..2105b8908 100644
--- a/test/eof1.go
+++ b/test/eof1.go
@@ -1,9 +1,12 @@
-// $G $D/$F.go
+// compile
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-package main
+// Test that a comment ending a source file does not need a final newline.
+// Compiles but does not run.
+
+package eof1
// No newline at the end of this comment. \ No newline at end of file
diff --git a/test/escape.go b/test/escape.go
index d4d844704..e487bb895 100644
--- a/test/escape.go
+++ b/test/escape.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
@@ -6,8 +6,8 @@
package main
-// check for correct heap-moving of escaped variables.
-// it is hard to check for the allocations, but it is easy
+// Test for correct heap-moving of escaped variables.
+// It is hard to check for the allocations, but it is easy
// to check that if you call the function twice at the
// same stack level, the pointers returned should be
// different.
diff --git a/test/escape2.go b/test/escape2.go
index 73b2a7e58..dde96bcc1 100644
--- a/test/escape2.go
+++ b/test/escape2.go
@@ -4,6 +4,9 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test, using compiler diagnostic flags, that the escape analysis is working.
+// Compiles but does not run.
+
package foo
import (
diff --git a/test/escape3.go b/test/escape3.go
index fc2d6ebbe..4c1989151 100644
--- a/test/escape3.go
+++ b/test/escape3.go
@@ -1,10 +1,10 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// Test run-time behavior of escape analysis-related optimizations.
+// Test the run-time behavior of escape analysis-related optimizations.
package main
diff --git a/test/fixedbugs/bug000.go b/test/fixedbugs/bug000.go
index ccb24e8e9..9104a57aa 100644
--- a/test/fixedbugs/bug000.go
+++ b/test/fixedbugs/bug000.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug002.go b/test/fixedbugs/bug002.go
index 230841974..3493426d3 100644
--- a/test/fixedbugs/bug002.go
+++ b/test/fixedbugs/bug002.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug003.go b/test/fixedbugs/bug003.go
index e45975be4..7165d9d20 100644
--- a/test/fixedbugs/bug003.go
+++ b/test/fixedbugs/bug003.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug004.go b/test/fixedbugs/bug004.go
index 20f467a5f..fb207e9bc 100644
--- a/test/fixedbugs/bug004.go
+++ b/test/fixedbugs/bug004.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug005.go b/test/fixedbugs/bug005.go
index 3bd2fe815..3798f8321 100644
--- a/test/fixedbugs/bug005.go
+++ b/test/fixedbugs/bug005.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug006.go b/test/fixedbugs/bug006.go
index 43b5dfb12..6761682b3 100644
--- a/test/fixedbugs/bug006.go
+++ b/test/fixedbugs/bug006.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug007.go b/test/fixedbugs/bug007.go
index d65f6da45..3d9fcb9e0 100644
--- a/test/fixedbugs/bug007.go
+++ b/test/fixedbugs/bug007.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug008.go b/test/fixedbugs/bug008.go
index 2baead11e..48f74a52d 100644
--- a/test/fixedbugs/bug008.go
+++ b/test/fixedbugs/bug008.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug009.go b/test/fixedbugs/bug009.go
index ef8263bb2..0467b297a 100644
--- a/test/fixedbugs/bug009.go
+++ b/test/fixedbugs/bug009.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug010.go b/test/fixedbugs/bug010.go
index 7d96988d4..f54b1d54a 100644
--- a/test/fixedbugs/bug010.go
+++ b/test/fixedbugs/bug010.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug011.go b/test/fixedbugs/bug011.go
index ce627472c..519c3585f 100644
--- a/test/fixedbugs/bug011.go
+++ b/test/fixedbugs/bug011.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug012.go b/test/fixedbugs/bug012.go
index ffd5b5570..38efb6d97 100644
--- a/test/fixedbugs/bug012.go
+++ b/test/fixedbugs/bug012.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug013.go b/test/fixedbugs/bug013.go
index 4b106775c..045786bf7 100644
--- a/test/fixedbugs/bug013.go
+++ b/test/fixedbugs/bug013.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug014.go b/test/fixedbugs/bug014.go
index 38a6e51ab..a20f0310e 100644
--- a/test/fixedbugs/bug014.go
+++ b/test/fixedbugs/bug014.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug015.go b/test/fixedbugs/bug015.go
index 9178f626f..d3a9f22ed 100644
--- a/test/fixedbugs/bug015.go
+++ b/test/fixedbugs/bug015.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug016.go b/test/fixedbugs/bug016.go
index 4fbfd48fd..18fac78f3 100644
--- a/test/fixedbugs/bug016.go
+++ b/test/fixedbugs/bug016.go
@@ -1,4 +1,4 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug017.go b/test/fixedbugs/bug017.go
index fdc986d9d..2f5960d10 100644
--- a/test/fixedbugs/bug017.go
+++ b/test/fixedbugs/bug017.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug020.go b/test/fixedbugs/bug020.go
index 896bf5707..cde3f8679 100644
--- a/test/fixedbugs/bug020.go
+++ b/test/fixedbugs/bug020.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo BUG should compile
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug021.go b/test/fixedbugs/bug021.go
index 201fa5f03..bf936e875 100644
--- a/test/fixedbugs/bug021.go
+++ b/test/fixedbugs/bug021.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug022.go b/test/fixedbugs/bug022.go
index f94a58569..65a8bfe9a 100644
--- a/test/fixedbugs/bug022.go
+++ b/test/fixedbugs/bug022.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug023.go b/test/fixedbugs/bug023.go
index b3d3d4a3c..9b211cd54 100644
--- a/test/fixedbugs/bug023.go
+++ b/test/fixedbugs/bug023.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug024.go b/test/fixedbugs/bug024.go
index c7b17b7c0..2e235b7b4 100644
--- a/test/fixedbugs/bug024.go
+++ b/test/fixedbugs/bug024.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug026.go b/test/fixedbugs/bug026.go
index eacea3745..bfd03cc95 100644
--- a/test/fixedbugs/bug026.go
+++ b/test/fixedbugs/bug026.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug027.go b/test/fixedbugs/bug027.go
index cf2daaecf..874b47e7a 100644
--- a/test/fixedbugs/bug027.go
+++ b/test/fixedbugs/bug027.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug028.go b/test/fixedbugs/bug028.go
index 0488ad2cb..2edf5a910 100644
--- a/test/fixedbugs/bug028.go
+++ b/test/fixedbugs/bug028.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug030.go b/test/fixedbugs/bug030.go
index 7efde9b44..ffd29e057 100644
--- a/test/fixedbugs/bug030.go
+++ b/test/fixedbugs/bug030.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug031.go b/test/fixedbugs/bug031.go
index acb4741e9..529e5ce84 100644
--- a/test/fixedbugs/bug031.go
+++ b/test/fixedbugs/bug031.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug035.go b/test/fixedbugs/bug035.go
index bd2a633f2..ae41a1795 100644
--- a/test/fixedbugs/bug035.go
+++ b/test/fixedbugs/bug035.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug037.go b/test/fixedbugs/bug037.go
index ff7d28710..f17fb3fd7 100644
--- a/test/fixedbugs/bug037.go
+++ b/test/fixedbugs/bug037.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug038.go b/test/fixedbugs/bug038.go
deleted file mode 100644
index 7585376a3..000000000
--- a/test/fixedbugs/bug038.go
+++ /dev/null
@@ -1,13 +0,0 @@
-// ! $G $D/$F.go >/dev/null
-// # ignoring error messages...
-
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package main
-
-func main() {
- var z [3]byte;
- z := new([3]byte); // BUG redeclaration
-}
diff --git a/test/fixedbugs/bug039.go b/test/fixedbugs/bug039.go
index 7ac02ceeb..d34f5e62e 100644
--- a/test/fixedbugs/bug039.go
+++ b/test/fixedbugs/bug039.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug040.go b/test/fixedbugs/bug040.go
index 912316cb6..007f47f9f 100644
--- a/test/fixedbugs/bug040.go
+++ b/test/fixedbugs/bug040.go
@@ -1,5 +1,4 @@
-// ! $G $D/$F.go >/dev/null
-// # ignoring error messages...
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
@@ -7,5 +6,6 @@
package main
-func main (x, x int) { // BUG redeclaration error
+func f (x, // GCCGO_ERROR "previous"
+ x int) { // ERROR "redeclared|redefinition" "duplicate"
}
diff --git a/test/fixedbugs/bug045.go b/test/fixedbugs/bug045.go
index 94888c40e..c66a2411a 100644
--- a/test/fixedbugs/bug045.go
+++ b/test/fixedbugs/bug045.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug046.go b/test/fixedbugs/bug046.go
index 8a9b79707..219e91d53 100644
--- a/test/fixedbugs/bug046.go
+++ b/test/fixedbugs/bug046.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug047.go b/test/fixedbugs/bug047.go
index 5a776abce..7619ae73c 100644
--- a/test/fixedbugs/bug047.go
+++ b/test/fixedbugs/bug047.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug048.go b/test/fixedbugs/bug048.go
index b9fee7899..48ad751e2 100644
--- a/test/fixedbugs/bug048.go
+++ b/test/fixedbugs/bug048.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug049.go b/test/fixedbugs/bug049.go
index 8fd67ccd5..51990f2df 100644
--- a/test/fixedbugs/bug049.go
+++ b/test/fixedbugs/bug049.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug050.go b/test/fixedbugs/bug050.go
index 585c44623..aba68b1dc 100644
--- a/test/fixedbugs/bug050.go
+++ b/test/fixedbugs/bug050.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug051.go b/test/fixedbugs/bug051.go
index dd1662306..c4ba2eff6 100644
--- a/test/fixedbugs/bug051.go
+++ b/test/fixedbugs/bug051.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug052.go b/test/fixedbugs/bug052.go
index d2c1b5061..440a00ebe 100644
--- a/test/fixedbugs/bug052.go
+++ b/test/fixedbugs/bug052.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug053.go b/test/fixedbugs/bug053.go
index c981403ed..00625fd7c 100644
--- a/test/fixedbugs/bug053.go
+++ b/test/fixedbugs/bug053.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug054.go b/test/fixedbugs/bug054.go
index c8a2272c2..01590585c 100644
--- a/test/fixedbugs/bug054.go
+++ b/test/fixedbugs/bug054.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug055.go b/test/fixedbugs/bug055.go
index 861739610..c3073cc1e 100644
--- a/test/fixedbugs/bug055.go
+++ b/test/fixedbugs/bug055.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug056.go b/test/fixedbugs/bug056.go
index 050a4a5c5..13eac2920 100644
--- a/test/fixedbugs/bug056.go
+++ b/test/fixedbugs/bug056.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug057.go b/test/fixedbugs/bug057.go
index d5d0f1d62..19b8651a5 100644
--- a/test/fixedbugs/bug057.go
+++ b/test/fixedbugs/bug057.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug058.go b/test/fixedbugs/bug058.go
index e2b4a241a..2b97dbf7c 100644
--- a/test/fixedbugs/bug058.go
+++ b/test/fixedbugs/bug058.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug059.go b/test/fixedbugs/bug059.go
index 6a77367d6..6f64b9e0b 100644
--- a/test/fixedbugs/bug059.go
+++ b/test/fixedbugs/bug059.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug060.go b/test/fixedbugs/bug060.go
index 82778b838..826072905 100644
--- a/test/fixedbugs/bug060.go
+++ b/test/fixedbugs/bug060.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug061.go b/test/fixedbugs/bug061.go
index aedcf70fe..ae99b186d 100644
--- a/test/fixedbugs/bug061.go
+++ b/test/fixedbugs/bug061.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug062.go b/test/fixedbugs/bug062.go
index 8ee5c84cb..1cc500365 100644
--- a/test/fixedbugs/bug062.go
+++ b/test/fixedbugs/bug062.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug063.go b/test/fixedbugs/bug063.go
index 543e0b726..a3ae3f096 100644
--- a/test/fixedbugs/bug063.go
+++ b/test/fixedbugs/bug063.go
@@ -1,8 +1,8 @@
-// $G $D/$F.go
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-package main
+package bug063
const c = 0 ^ 0
diff --git a/test/fixedbugs/bug064.go b/test/fixedbugs/bug064.go
index 92d215423..d8b3bea9a 100644
--- a/test/fixedbugs/bug064.go
+++ b/test/fixedbugs/bug064.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo BUG: compilation should succeed
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug065.go b/test/fixedbugs/bug065.go
index a5d1beddd..a1e3b08bb 100644
--- a/test/fixedbugs/bug065.go
+++ b/test/fixedbugs/bug065.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug066.go b/test/fixedbugs/bug066.go
index 2fa5048f1..db3d7f860 100644
--- a/test/fixedbugs/bug066.go
+++ b/test/fixedbugs/bug066.go
@@ -1,10 +1,10 @@
-// $G $D/$F.go
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-package main
+package bug066
type Scope struct {
entries map[string] *Object;
diff --git a/test/fixedbugs/bug067.go b/test/fixedbugs/bug067.go
index 328d191bb..aaeefb0ba 100644
--- a/test/fixedbugs/bug067.go
+++ b/test/fixedbugs/bug067.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug068.go b/test/fixedbugs/bug068.go
index a7cf4239c..2cb10ab3a 100644
--- a/test/fixedbugs/bug068.go
+++ b/test/fixedbugs/bug068.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug069.go b/test/fixedbugs/bug069.go
index 9038387ac..7b07b773d 100644
--- a/test/fixedbugs/bug069.go
+++ b/test/fixedbugs/bug069.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug070.go b/test/fixedbugs/bug070.go
index 24ac77988..3f3ffcf61 100644
--- a/test/fixedbugs/bug070.go
+++ b/test/fixedbugs/bug070.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug071.go b/test/fixedbugs/bug071.go
index a5003ffb9..ec38f7a97 100644
--- a/test/fixedbugs/bug071.go
+++ b/test/fixedbugs/bug071.go
@@ -1,10 +1,10 @@
-// $G $D/$F.go || echo BUG: compiler crashes
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-package main
+package bug071
type rat struct {
den int;
diff --git a/test/fixedbugs/bug072.go b/test/fixedbugs/bug072.go
index efe5626db..05ad93dac 100644
--- a/test/fixedbugs/bug072.go
+++ b/test/fixedbugs/bug072.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug073.go b/test/fixedbugs/bug073.go
index 99e7cd19e..49b47ae46 100644
--- a/test/fixedbugs/bug073.go
+++ b/test/fixedbugs/bug073.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug074.go b/test/fixedbugs/bug074.go
index 7b6d14e7e..fb789cb4c 100644
--- a/test/fixedbugs/bug074.go
+++ b/test/fixedbugs/bug074.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug075.go b/test/fixedbugs/bug075.go
index 7aed13089..d0b7d14e7 100644
--- a/test/fixedbugs/bug075.go
+++ b/test/fixedbugs/bug075.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug076.go b/test/fixedbugs/bug076.go
index 2ca518d76..60aaa9760 100644
--- a/test/fixedbugs/bug076.go
+++ b/test/fixedbugs/bug076.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A
+// build
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug077.go b/test/fixedbugs/bug077.go
index 2cbf96d98..80581a8a3 100644
--- a/test/fixedbugs/bug077.go
+++ b/test/fixedbugs/bug077.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo BUG: should compile
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug078.go b/test/fixedbugs/bug078.go
index ddd3faeba..1041b858c 100644
--- a/test/fixedbugs/bug078.go
+++ b/test/fixedbugs/bug078.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug080.go b/test/fixedbugs/bug080.go
index bae16cdb2..32b2c53b9 100644
--- a/test/fixedbugs/bug080.go
+++ b/test/fixedbugs/bug080.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo BUG: fails incorrectly
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug081.go b/test/fixedbugs/bug081.go
index 026ce8002..c25d28837 100644
--- a/test/fixedbugs/bug081.go
+++ b/test/fixedbugs/bug081.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug082.go b/test/fixedbugs/bug082.go
index 8353ec200..e184ef193 100644
--- a/test/fixedbugs/bug082.go
+++ b/test/fixedbugs/bug082.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug084.go b/test/fixedbugs/bug084.go
index c1054e550..700a67433 100644
--- a/test/fixedbugs/bug084.go
+++ b/test/fixedbugs/bug084.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug085.go b/test/fixedbugs/bug085.go
index 02be71753..93ae7e0a4 100644
--- a/test/fixedbugs/bug085.go
+++ b/test/fixedbugs/bug085.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug086.go b/test/fixedbugs/bug086.go
index f96472fbb..fc69e0e3f 100644
--- a/test/fixedbugs/bug086.go
+++ b/test/fixedbugs/bug086.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug087.go b/test/fixedbugs/bug087.go
index 4af8d976f..67e7210cd 100644
--- a/test/fixedbugs/bug087.go
+++ b/test/fixedbugs/bug087.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo BUG: fails incorrectly
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug089.go b/test/fixedbugs/bug089.go
index fd3dff3ec..e88f17bab 100644
--- a/test/fixedbugs/bug089.go
+++ b/test/fixedbugs/bug089.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug090.go b/test/fixedbugs/bug090.go
index 8318ab9c0..320bd57f5 100644
--- a/test/fixedbugs/bug090.go
+++ b/test/fixedbugs/bug090.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug091.go b/test/fixedbugs/bug091.go
index c2ede7153..dbb1287a1 100644
--- a/test/fixedbugs/bug091.go
+++ b/test/fixedbugs/bug091.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug092.go b/test/fixedbugs/bug092.go
index 8f05c478f..8027d941e 100644
--- a/test/fixedbugs/bug092.go
+++ b/test/fixedbugs/bug092.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug093.go b/test/fixedbugs/bug093.go
index 52d92c7e3..acd94466f 100644
--- a/test/fixedbugs/bug093.go
+++ b/test/fixedbugs/bug093.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG: fails incorrectly
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug094.go b/test/fixedbugs/bug094.go
index 2953eb28d..3ef11da3d 100644
--- a/test/fixedbugs/bug094.go
+++ b/test/fixedbugs/bug094.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo BUG: fails incorrectly
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug096.go b/test/fixedbugs/bug096.go
index 9be687a7b..411ba74e0 100644
--- a/test/fixedbugs/bug096.go
+++ b/test/fixedbugs/bug096.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo BUG should compile
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug097.go b/test/fixedbugs/bug097.go
index ec3c21543..a067e0f57 100644
--- a/test/fixedbugs/bug097.go
+++ b/test/fixedbugs/bug097.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG wrong result
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug098.go b/test/fixedbugs/bug098.go
index 1dad4d502..eb4ee4de0 100644
--- a/test/fixedbugs/bug098.go
+++ b/test/fixedbugs/bug098.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo BUG should compile
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug099.go b/test/fixedbugs/bug099.go
index f76f0e873..03a5c454b 100644
--- a/test/fixedbugs/bug099.go
+++ b/test/fixedbugs/bug099.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG should not crash
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug101.go b/test/fixedbugs/bug101.go
index 92487deaa..82e496a8a 100644
--- a/test/fixedbugs/bug101.go
+++ b/test/fixedbugs/bug101.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug102.go b/test/fixedbugs/bug102.go
index 1d97eb4a8..f1c2324b7 100644
--- a/test/fixedbugs/bug102.go
+++ b/test/fixedbugs/bug102.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG: should not crash
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug103.go b/test/fixedbugs/bug103.go
index b789be1c4..1cb710e36 100644
--- a/test/fixedbugs/bug103.go
+++ b/test/fixedbugs/bug103.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug104.go b/test/fixedbugs/bug104.go
index dd4bb5834..f0c19a8aa 100644
--- a/test/fixedbugs/bug104.go
+++ b/test/fixedbugs/bug104.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug107.go b/test/fixedbugs/bug107.go
index 0554bbc8b..dcd8e9d11 100644
--- a/test/fixedbugs/bug107.go
+++ b/test/fixedbugs/bug107.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug108.go b/test/fixedbugs/bug108.go
index 10e406de6..9f2a27ebd 100644
--- a/test/fixedbugs/bug108.go
+++ b/test/fixedbugs/bug108.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug109.go b/test/fixedbugs/bug109.go
index 766657723..556dc34dd 100644
--- a/test/fixedbugs/bug109.go
+++ b/test/fixedbugs/bug109.go
@@ -1,10 +1,10 @@
-// $G $D/$F.go || echo BUG: should compile
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-package main
+package bug109
func f(a float64) float64 {
e := 1.0
diff --git a/test/fixedbugs/bug110.go b/test/fixedbugs/bug110.go
index 4e43d1c01..5528ba3f1 100644
--- a/test/fixedbugs/bug110.go
+++ b/test/fixedbugs/bug110.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A || echo BUG: const bug
+// build
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug111.go b/test/fixedbugs/bug111.go
index e72b343ae..d977bd54f 100644
--- a/test/fixedbugs/bug111.go
+++ b/test/fixedbugs/bug111.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG should compile and run
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug112.go b/test/fixedbugs/bug112.go
index 3c932843c..e2ed5c0d4 100644
--- a/test/fixedbugs/bug112.go
+++ b/test/fixedbugs/bug112.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo BUG should compile
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug113.go b/test/fixedbugs/bug113.go
index 4ca07dc65..a1e61cb36 100644
--- a/test/fixedbugs/bug113.go
+++ b/test/fixedbugs/bug113.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug114.go b/test/fixedbugs/bug114.go
index 974b7cf26..99e66a2dd 100644
--- a/test/fixedbugs/bug114.go
+++ b/test/fixedbugs/bug114.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && (./$A.out || echo BUG: bug114 failed)
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug115.go b/test/fixedbugs/bug115.go
index 16b22d707..7cc3dc40a 100644
--- a/test/fixedbugs/bug115.go
+++ b/test/fixedbugs/bug115.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo BUG: bug115 should compile
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug116.go b/test/fixedbugs/bug116.go
index 42ca80343..5d8e52031 100644
--- a/test/fixedbugs/bug116.go
+++ b/test/fixedbugs/bug116.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG: bug116
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug117.go b/test/fixedbugs/bug117.go
index ad89ebf52..038826cbc 100644
--- a/test/fixedbugs/bug117.go
+++ b/test/fixedbugs/bug117.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug118.go b/test/fixedbugs/bug118.go
index 1271f5b0c..198b8ff28 100644
--- a/test/fixedbugs/bug118.go
+++ b/test/fixedbugs/bug118.go
@@ -1,10 +1,10 @@
-// $G $D/$F.go || echo BUG should compile
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-package main
+package bug118
func Send(c chan int) int {
select {
diff --git a/test/fixedbugs/bug119.go b/test/fixedbugs/bug119.go
index 750507891..6f2514c24 100644
--- a/test/fixedbugs/bug119.go
+++ b/test/fixedbugs/bug119.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG: should not fail
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug120.go b/test/fixedbugs/bug120.go
index bf401bf30..58355e53d 100644
--- a/test/fixedbugs/bug120.go
+++ b/test/fixedbugs/bug120.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG: bug120
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug121.go b/test/fixedbugs/bug121.go
index 15c8451da..5adf9827f 100644
--- a/test/fixedbugs/bug121.go
+++ b/test/fixedbugs/bug121.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug122.go b/test/fixedbugs/bug122.go
index 72bf38a83..fb4eb9f3a 100644
--- a/test/fixedbugs/bug122.go
+++ b/test/fixedbugs/bug122.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug123.go b/test/fixedbugs/bug123.go
index bdac67417..f38551a91 100644
--- a/test/fixedbugs/bug123.go
+++ b/test/fixedbugs/bug123.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug126.go b/test/fixedbugs/bug126.go
index a8d56e122..f5d976341 100644
--- a/test/fixedbugs/bug126.go
+++ b/test/fixedbugs/bug126.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug127.go b/test/fixedbugs/bug127.go
index 25b48114d..f8ea99470 100644
--- a/test/fixedbugs/bug127.go
+++ b/test/fixedbugs/bug127.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug128.go b/test/fixedbugs/bug128.go
index 3fd647c00..e8cbea079 100644
--- a/test/fixedbugs/bug128.go
+++ b/test/fixedbugs/bug128.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG: should compile
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug129.go b/test/fixedbugs/bug129.go
index d1e2d8b56..157ce78ff 100644
--- a/test/fixedbugs/bug129.go
+++ b/test/fixedbugs/bug129.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo BUG129
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug130.go b/test/fixedbugs/bug130.go
index 855c7072b..16b029af3 100644
--- a/test/fixedbugs/bug130.go
+++ b/test/fixedbugs/bug130.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG: should run
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug131.go b/test/fixedbugs/bug131.go
index e5d4ca07d..0ebbd2606 100644
--- a/test/fixedbugs/bug131.go
+++ b/test/fixedbugs/bug131.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug132.go b/test/fixedbugs/bug132.go
index bab8996f1..e334566c7 100644
--- a/test/fixedbugs/bug132.go
+++ b/test/fixedbugs/bug132.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug135.go b/test/fixedbugs/bug135.go
index 470135ed4..34d234e22 100644
--- a/test/fixedbugs/bug135.go
+++ b/test/fixedbugs/bug135.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo BUG: should compile
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug136.go b/test/fixedbugs/bug136.go
index 7491b65d8..bea9bac08 100644
--- a/test/fixedbugs/bug136.go
+++ b/test/fixedbugs/bug136.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug137.go b/test/fixedbugs/bug137.go
index 9d43f431b..48368177a 100644
--- a/test/fixedbugs/bug137.go
+++ b/test/fixedbugs/bug137.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo BUG should compile
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug139.go b/test/fixedbugs/bug139.go
index 2bdbef1c0..095e5c93c 100644
--- a/test/fixedbugs/bug139.go
+++ b/test/fixedbugs/bug139.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo BUG should compile
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug140.go b/test/fixedbugs/bug140.go
index 441c57a48..8caf1d7d9 100644
--- a/test/fixedbugs/bug140.go
+++ b/test/fixedbugs/bug140.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo BUG should compile
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug141.go b/test/fixedbugs/bug141.go
index 1b125e5d1..81ba6f1b5 100644
--- a/test/fixedbugs/bug141.go
+++ b/test/fixedbugs/bug141.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG: should run
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug142.go b/test/fixedbugs/bug142.go
index e54458baf..e28d889a9 100644
--- a/test/fixedbugs/bug142.go
+++ b/test/fixedbugs/bug142.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG: bug142
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug143.go b/test/fixedbugs/bug143.go
index 2f575fcfe..a43e40667 100644
--- a/test/fixedbugs/bug143.go
+++ b/test/fixedbugs/bug143.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo BUG should compile
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug144.go b/test/fixedbugs/bug144.go
index bab9a4402..9f8ec7667 100644
--- a/test/fixedbugs/bug144.go
+++ b/test/fixedbugs/bug144.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo BUG should compile
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug145.go b/test/fixedbugs/bug145.go
index c59bcebd6..602fe7426 100644
--- a/test/fixedbugs/bug145.go
+++ b/test/fixedbugs/bug145.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo BUG should compile
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug146.go b/test/fixedbugs/bug146.go
index 16324c741..e29f910ba 100644
--- a/test/fixedbugs/bug146.go
+++ b/test/fixedbugs/bug146.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug147.go b/test/fixedbugs/bug147.go
index a16630b87..e8b3d2439 100644
--- a/test/fixedbugs/bug147.go
+++ b/test/fixedbugs/bug147.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG: bug147
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug148.go b/test/fixedbugs/bug148.go
index 251020c96..b67870b12 100644
--- a/test/fixedbugs/bug148.go
+++ b/test/fixedbugs/bug148.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug149.go b/test/fixedbugs/bug149.go
index a40403b7d..78b687e97 100644
--- a/test/fixedbugs/bug149.go
+++ b/test/fixedbugs/bug149.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo BUG: should compile
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug150.go b/test/fixedbugs/bug150.go
index fc25444b6..b565ef73d 100644
--- a/test/fixedbugs/bug150.go
+++ b/test/fixedbugs/bug150.go
@@ -1,10 +1,10 @@
-// $G $D/$F.go || echo BUG: bug150
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-package main
+package bug150
type T int
func (t T) M()
diff --git a/test/fixedbugs/bug151.go b/test/fixedbugs/bug151.go
index 46546dfe1..d9f5e021c 100644
--- a/test/fixedbugs/bug151.go
+++ b/test/fixedbugs/bug151.go
@@ -1,10 +1,10 @@
-// $G $D/$F.go || echo BUG: bug151
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-package main
+package bug151
type S string
diff --git a/test/fixedbugs/bug1515.go b/test/fixedbugs/bug1515.go
index 740252516..a4baccda7 100644
--- a/test/fixedbugs/bug1515.go
+++ b/test/fixedbugs/bug1515.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug152.go b/test/fixedbugs/bug152.go
index 30c3cac91..45b9b3d53 100644
--- a/test/fixedbugs/bug152.go
+++ b/test/fixedbugs/bug152.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug154.go b/test/fixedbugs/bug154.go
index 4371cc5ce..a2cfd4acc 100644
--- a/test/fixedbugs/bug154.go
+++ b/test/fixedbugs/bug154.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG: should not panic
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug155.go b/test/fixedbugs/bug155.go
index 312c8e6a9..8872e978d 100644
--- a/test/fixedbugs/bug155.go
+++ b/test/fixedbugs/bug155.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A || echo BUG: bug155
+// build
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug156.go b/test/fixedbugs/bug156.go
index 0b77a72d9..f26658729 100644
--- a/test/fixedbugs/bug156.go
+++ b/test/fixedbugs/bug156.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo BUG: bug156
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug157.go b/test/fixedbugs/bug157.go
index 9bf68f7a4..1072d7df4 100644
--- a/test/fixedbugs/bug157.go
+++ b/test/fixedbugs/bug157.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo BUG: should compile
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug158.go b/test/fixedbugs/bug158.go
index cdf3195fe..496d7e0db 100644
--- a/test/fixedbugs/bug158.go
+++ b/test/fixedbugs/bug158.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo BUG: should compile
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug159.go b/test/fixedbugs/bug159.go
index 1aa64433a..92d534563 100644
--- a/test/fixedbugs/bug159.go
+++ b/test/fixedbugs/bug159.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG: bug159
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug161.go b/test/fixedbugs/bug161.go
index e5f25f746..aab58ee89 100644
--- a/test/fixedbugs/bug161.go
+++ b/test/fixedbugs/bug161.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo BUG: should compile
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug163.go b/test/fixedbugs/bug163.go
index 919298e6f..d69f6bef0 100644
--- a/test/fixedbugs/bug163.go
+++ b/test/fixedbugs/bug163.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug164.go b/test/fixedbugs/bug164.go
index 746f631ae..888b495ee 100644
--- a/test/fixedbugs/bug164.go
+++ b/test/fixedbugs/bug164.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug165.go b/test/fixedbugs/bug165.go
index 8ce67a46d..f8d50af13 100644
--- a/test/fixedbugs/bug165.go
+++ b/test/fixedbugs/bug165.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug167.go b/test/fixedbugs/bug167.go
index 33eb3cb1a..3a50e6ff0 100644
--- a/test/fixedbugs/bug167.go
+++ b/test/fixedbugs/bug167.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A || echo BUG: bug167
+// build
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug168.go b/test/fixedbugs/bug168.go
index e25eb56b0..53301fa81 100644
--- a/test/fixedbugs/bug168.go
+++ b/test/fixedbugs/bug168.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG: bug168
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug169.go b/test/fixedbugs/bug169.go
index c42727f38..f63c2f3e1 100644
--- a/test/fixedbugs/bug169.go
+++ b/test/fixedbugs/bug169.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug170.go b/test/fixedbugs/bug170.go
index e7f1c5120..11ff5ff3c 100644
--- a/test/fixedbugs/bug170.go
+++ b/test/fixedbugs/bug170.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug171.go b/test/fixedbugs/bug171.go
index 5357b2adc..49bbb3b89 100644
--- a/test/fixedbugs/bug171.go
+++ b/test/fixedbugs/bug171.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug172.go b/test/fixedbugs/bug172.go
index 1837a1158..4dbe7930f 100644
--- a/test/fixedbugs/bug172.go
+++ b/test/fixedbugs/bug172.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug173.go b/test/fixedbugs/bug173.go
index 898b8400b..6479bb253 100644
--- a/test/fixedbugs/bug173.go
+++ b/test/fixedbugs/bug173.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo BUG: bug173
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug174.go b/test/fixedbugs/bug174.go
index 7ff865513..448f63086 100644
--- a/test/fixedbugs/bug174.go
+++ b/test/fixedbugs/bug174.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo BUG: bug174
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug175.go b/test/fixedbugs/bug175.go
index 1ca141507..5fca4b22b 100644
--- a/test/fixedbugs/bug175.go
+++ b/test/fixedbugs/bug175.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug176.go b/test/fixedbugs/bug176.go
index 5820df308..82f8dba0a 100644
--- a/test/fixedbugs/bug176.go
+++ b/test/fixedbugs/bug176.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug177.go b/test/fixedbugs/bug177.go
index a120ad0ab..9f2c1ea52 100644
--- a/test/fixedbugs/bug177.go
+++ b/test/fixedbugs/bug177.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug178.go b/test/fixedbugs/bug178.go
index a7ff09dae..2bae5a1c5 100644
--- a/test/fixedbugs/bug178.go
+++ b/test/fixedbugs/bug178.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug179.go b/test/fixedbugs/bug179.go
index 3347613d8..dea82fe0a 100644
--- a/test/fixedbugs/bug179.go
+++ b/test/fixedbugs/bug179.go
@@ -1,4 +1,4 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug180.go b/test/fixedbugs/bug180.go
index 96823fb3a..cfdcfab26 100644
--- a/test/fixedbugs/bug180.go
+++ b/test/fixedbugs/bug180.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug181.go b/test/fixedbugs/bug181.go
index f87bc9d4e..4827e9cf0 100644
--- a/test/fixedbugs/bug181.go
+++ b/test/fixedbugs/bug181.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug182.go b/test/fixedbugs/bug182.go
index 81df2ca13..e02dc59f8 100644
--- a/test/fixedbugs/bug182.go
+++ b/test/fixedbugs/bug182.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug183.go b/test/fixedbugs/bug183.go
index 7fd6e4942..dc9f5356e 100644
--- a/test/fixedbugs/bug183.go
+++ b/test/fixedbugs/bug183.go
@@ -1,4 +1,4 @@
-//errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug184.go b/test/fixedbugs/bug184.go
index 3cc984535..c084ea5cf 100644
--- a/test/fixedbugs/bug184.go
+++ b/test/fixedbugs/bug184.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug185.go b/test/fixedbugs/bug185.go
index acae174f4..890900600 100644
--- a/test/fixedbugs/bug185.go
+++ b/test/fixedbugs/bug185.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug186.go b/test/fixedbugs/bug186.go
index dde794a5d..5aefd7e5c 100644
--- a/test/fixedbugs/bug186.go
+++ b/test/fixedbugs/bug186.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug187.go b/test/fixedbugs/bug187.go
index 66aa5f024..5c3c2bb1e 100644
--- a/test/fixedbugs/bug187.go
+++ b/test/fixedbugs/bug187.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug188.go b/test/fixedbugs/bug188.go
index e1cbce05d..550614789 100644
--- a/test/fixedbugs/bug188.go
+++ b/test/fixedbugs/bug188.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug189.go b/test/fixedbugs/bug189.go
index ce338305c..9e412c66d 100644
--- a/test/fixedbugs/bug189.go
+++ b/test/fixedbugs/bug189.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug190.go b/test/fixedbugs/bug190.go
index da0bfde0f..bb2d81cbb 100644
--- a/test/fixedbugs/bug190.go
+++ b/test/fixedbugs/bug190.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo BUG: should compile
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug192.go b/test/fixedbugs/bug192.go
index 282ed30d3..679aaed1f 100644
--- a/test/fixedbugs/bug192.go
+++ b/test/fixedbugs/bug192.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug193.go b/test/fixedbugs/bug193.go
index 5ef02b1c1..64e06da89 100644
--- a/test/fixedbugs/bug193.go
+++ b/test/fixedbugs/bug193.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug194.go b/test/fixedbugs/bug194.go
index dcd633dde..297652903 100644
--- a/test/fixedbugs/bug194.go
+++ b/test/fixedbugs/bug194.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG should compile and run
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug195.go b/test/fixedbugs/bug195.go
index 65ab02a03..85367cb88 100644
--- a/test/fixedbugs/bug195.go
+++ b/test/fixedbugs/bug195.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
@@ -23,5 +23,5 @@ type I5 interface {
}
type I6 interface {
- I5 // GC_ERROR "interface"
+ I5 // ERROR "interface"
}
diff --git a/test/fixedbugs/bug196.go b/test/fixedbugs/bug196.go
index ea8ab0dc1..5255de189 100644
--- a/test/fixedbugs/bug196.go
+++ b/test/fixedbugs/bug196.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG: bug196
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug197.go b/test/fixedbugs/bug197.go
index c205c5bca..4a9f103ea 100644
--- a/test/fixedbugs/bug197.go
+++ b/test/fixedbugs/bug197.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug198.go b/test/fixedbugs/bug198.go
index ea71fad58..73bb64688 100644
--- a/test/fixedbugs/bug198.go
+++ b/test/fixedbugs/bug198.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug199.go b/test/fixedbugs/bug199.go
index 71226290f..f69f23b59 100644
--- a/test/fixedbugs/bug199.go
+++ b/test/fixedbugs/bug199.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug200.go b/test/fixedbugs/bug200.go
index 63b8633bd..da628faf5 100644
--- a/test/fixedbugs/bug200.go
+++ b/test/fixedbugs/bug200.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug201.go b/test/fixedbugs/bug201.go
index f7db62fc9..59248231a 100644
--- a/test/fixedbugs/bug201.go
+++ b/test/fixedbugs/bug201.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug202.go b/test/fixedbugs/bug202.go
index 2fc91b520..49871e3e0 100644
--- a/test/fixedbugs/bug202.go
+++ b/test/fixedbugs/bug202.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG should run
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug203.go b/test/fixedbugs/bug203.go
index bf86ee912..2fb084bd6 100644
--- a/test/fixedbugs/bug203.go
+++ b/test/fixedbugs/bug203.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug204.go b/test/fixedbugs/bug204.go
index adf0aafd6..8810a5f92 100644
--- a/test/fixedbugs/bug204.go
+++ b/test/fixedbugs/bug204.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug205.go b/test/fixedbugs/bug205.go
index e12be72f9..de17cb698 100644
--- a/test/fixedbugs/bug205.go
+++ b/test/fixedbugs/bug205.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug207.go b/test/fixedbugs/bug207.go
index 5810d6690..50923df1c 100644
--- a/test/fixedbugs/bug207.go
+++ b/test/fixedbugs/bug207.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug208.go b/test/fixedbugs/bug208.go
index 13b040084..09ec0afbe 100644
--- a/test/fixedbugs/bug208.go
+++ b/test/fixedbugs/bug208.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug209.go b/test/fixedbugs/bug209.go
index ae6f10f60..52faf1fb9 100644
--- a/test/fixedbugs/bug209.go
+++ b/test/fixedbugs/bug209.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug211.go b/test/fixedbugs/bug211.go
index 69aeeeeac..b15047927 100644
--- a/test/fixedbugs/bug211.go
+++ b/test/fixedbugs/bug211.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug212.go b/test/fixedbugs/bug212.go
index 51df9b8ae..4e58b91ec 100644
--- a/test/fixedbugs/bug212.go
+++ b/test/fixedbugs/bug212.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug213.go b/test/fixedbugs/bug213.go
index 4d81dbb4d..7f4786b52 100644
--- a/test/fixedbugs/bug213.go
+++ b/test/fixedbugs/bug213.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug214.go b/test/fixedbugs/bug214.go
index 502e69826..5420058c4 100644
--- a/test/fixedbugs/bug214.go
+++ b/test/fixedbugs/bug214.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo BUG: bug214
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug215.go b/test/fixedbugs/bug215.go
index 8f7fb2d3c..08ed662c6 100644
--- a/test/fixedbugs/bug215.go
+++ b/test/fixedbugs/bug215.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug216.go b/test/fixedbugs/bug216.go
index 76f85464a..c83a522bf 100644
--- a/test/fixedbugs/bug216.go
+++ b/test/fixedbugs/bug216.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo BUG: bug216
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug217.go b/test/fixedbugs/bug217.go
index 98334c4ce..ec93c25d9 100644
--- a/test/fixedbugs/bug217.go
+++ b/test/fixedbugs/bug217.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug218.go b/test/fixedbugs/bug218.go
index b2c9ede75..0e008db17 100644
--- a/test/fixedbugs/bug218.go
+++ b/test/fixedbugs/bug218.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo BUG: bug218
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug219.go b/test/fixedbugs/bug219.go
index 966d3fcf3..290c691ea 100644
--- a/test/fixedbugs/bug219.go
+++ b/test/fixedbugs/bug219.go
@@ -1,10 +1,10 @@
-// $G $D/$F.go || echo BUG: bug219
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-package main
+package bug219
func f(func()) int { return 0 }
diff --git a/test/fixedbugs/bug221.go b/test/fixedbugs/bug221.go
index b64583114..86fda2035 100644
--- a/test/fixedbugs/bug221.go
+++ b/test/fixedbugs/bug221.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug224.go b/test/fixedbugs/bug224.go
index 11ee57ecf..d2fd67cf3 100644
--- a/test/fixedbugs/bug224.go
+++ b/test/fixedbugs/bug224.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug225.go b/test/fixedbugs/bug225.go
index 8acf66c4e..1bda9ab4b 100644
--- a/test/fixedbugs/bug225.go
+++ b/test/fixedbugs/bug225.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug227.go b/test/fixedbugs/bug227.go
index a60866044..ea8d02d10 100644
--- a/test/fixedbugs/bug227.go
+++ b/test/fixedbugs/bug227.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug228.go b/test/fixedbugs/bug228.go
index da335dbc0..3d23609dd 100644
--- a/test/fixedbugs/bug228.go
+++ b/test/fixedbugs/bug228.go
@@ -1,4 +1,4 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug229.go b/test/fixedbugs/bug229.go
index a70a926da..19776881d 100644
--- a/test/fixedbugs/bug229.go
+++ b/test/fixedbugs/bug229.go
@@ -1,4 +1,4 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug230.go b/test/fixedbugs/bug230.go
index c7ad1a366..210acc430 100644
--- a/test/fixedbugs/bug230.go
+++ b/test/fixedbugs/bug230.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug231.go b/test/fixedbugs/bug231.go
index 9500e582b..a9d409b7d 100644
--- a/test/fixedbugs/bug231.go
+++ b/test/fixedbugs/bug231.go
@@ -1,4 +1,4 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug232.go b/test/fixedbugs/bug232.go
index 99bd02ff6..d18727e90 100644
--- a/test/fixedbugs/bug232.go
+++ b/test/fixedbugs/bug232.go
@@ -1,8 +1,8 @@
-// $G $D/$F.go
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-package main
+package bug232
type I interface { X(...int) }
diff --git a/test/fixedbugs/bug233.go b/test/fixedbugs/bug233.go
index 31bb673eb..63f8ee2e9 100644
--- a/test/fixedbugs/bug233.go
+++ b/test/fixedbugs/bug233.go
@@ -1,10 +1,10 @@
-// $G $D/$F.go
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-package main
+package bug233
import p "fmt"
var _ = p.Print
var fmt = 10
diff --git a/test/fixedbugs/bug234.go b/test/fixedbugs/bug234.go
index 562109a05..9f503f04a 100644
--- a/test/fixedbugs/bug234.go
+++ b/test/fixedbugs/bug234.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug235.go b/test/fixedbugs/bug235.go
index 8cecd9d04..d12d9e736 100644
--- a/test/fixedbugs/bug235.go
+++ b/test/fixedbugs/bug235.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
@@ -6,7 +6,7 @@
// used to crash the compiler
-package main
+package bug235
type T struct {
x [4]byte
diff --git a/test/fixedbugs/bug236.go b/test/fixedbugs/bug236.go
index 895f82a23..6c245565f 100644
--- a/test/fixedbugs/bug236.go
+++ b/test/fixedbugs/bug236.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug237.go b/test/fixedbugs/bug237.go
index 55cc86ace..58996cadc 100644
--- a/test/fixedbugs/bug237.go
+++ b/test/fixedbugs/bug237.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug238.go b/test/fixedbugs/bug238.go
index 4d5a905f0..cc47189e1 100644
--- a/test/fixedbugs/bug238.go
+++ b/test/fixedbugs/bug238.go
@@ -1,4 +1,4 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug239.go b/test/fixedbugs/bug239.go
index 32c3d7e1c..e4902527d 100644
--- a/test/fixedbugs/bug239.go
+++ b/test/fixedbugs/bug239.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo BUG: bug239
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug240.go b/test/fixedbugs/bug240.go
index 6cba9c8b1..478b5b2ea 100644
--- a/test/fixedbugs/bug240.go
+++ b/test/fixedbugs/bug240.go
@@ -1,4 +1,4 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug241.go b/test/fixedbugs/bug241.go
index 172b3742e..1f4440147 100644
--- a/test/fixedbugs/bug241.go
+++ b/test/fixedbugs/bug241.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug242.go b/test/fixedbugs/bug242.go
index d80ae76a2..4791ae485 100644
--- a/test/fixedbugs/bug242.go
+++ b/test/fixedbugs/bug242.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG: tuple evaluation order
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug243.go b/test/fixedbugs/bug243.go
index e3ddf0e77..4870c3614 100644
--- a/test/fixedbugs/bug243.go
+++ b/test/fixedbugs/bug243.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug244.go b/test/fixedbugs/bug244.go
index 915c3fcd0..29bf0d58b 100644
--- a/test/fixedbugs/bug244.go
+++ b/test/fixedbugs/bug244.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug245.go b/test/fixedbugs/bug245.go
index 6e5a8b344..c607a6dc3 100644
--- a/test/fixedbugs/bug245.go
+++ b/test/fixedbugs/bug245.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo BUG: bug245
+// compile
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug246.go b/test/fixedbugs/bug246.go
index 12041eb1d..e506f8c0d 100644
--- a/test/fixedbugs/bug246.go
+++ b/test/fixedbugs/bug246.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG: bug246
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug247.go b/test/fixedbugs/bug247.go
index 2f56b88d4..b6851e1bc 100644
--- a/test/fixedbugs/bug247.go
+++ b/test/fixedbugs/bug247.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG: bug247
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug249.go b/test/fixedbugs/bug249.go
index c85708fd8..dc922455e 100644
--- a/test/fixedbugs/bug249.go
+++ b/test/fixedbugs/bug249.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug250.go b/test/fixedbugs/bug250.go
index cd28642bf..5140f3e29 100644
--- a/test/fixedbugs/bug250.go
+++ b/test/fixedbugs/bug250.go
@@ -1,10 +1,10 @@
-// $G $D/$F.go || echo BUG: bug250
+// compile
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-package main
+package bug250
type I1 interface {
m() I2
diff --git a/test/fixedbugs/bug251.go b/test/fixedbugs/bug251.go
index 385f28dd4..43d9d526f 100644
--- a/test/fixedbugs/bug251.go
+++ b/test/fixedbugs/bug251.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
@@ -12,7 +12,7 @@ type I1 interface {
}
type I2 interface {
- I1 // GC_ERROR "loop|interface"
+ I1 // ERROR "loop|interface"
}
diff --git a/test/fixedbugs/bug252.go b/test/fixedbugs/bug252.go
index a2c1dab9d..6f007fb77 100644
--- a/test/fixedbugs/bug252.go
+++ b/test/fixedbugs/bug252.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug253.go b/test/fixedbugs/bug253.go
index bb5b770f5..f6ab712ef 100644
--- a/test/fixedbugs/bug253.go
+++ b/test/fixedbugs/bug253.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG: bug253
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug254.go b/test/fixedbugs/bug254.go
index c0c7f249e..9b1c81911 100644
--- a/test/fixedbugs/bug254.go
+++ b/test/fixedbugs/bug254.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG: bug254
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug255.go b/test/fixedbugs/bug255.go
index 44427cfdb..dbd41cc6a 100644
--- a/test/fixedbugs/bug255.go
+++ b/test/fixedbugs/bug255.go
@@ -1,4 +1,4 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug256.go b/test/fixedbugs/bug256.go
index 37fa5f5c8..0498a40d5 100644
--- a/test/fixedbugs/bug256.go
+++ b/test/fixedbugs/bug256.go
@@ -1,4 +1,4 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug257.go b/test/fixedbugs/bug257.go
index 1b3247500..003f3ff94 100644
--- a/test/fixedbugs/bug257.go
+++ b/test/fixedbugs/bug257.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG: bugxxx
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug258.go b/test/fixedbugs/bug258.go
index 8984df592..d362e5a69 100644
--- a/test/fixedbugs/bug258.go
+++ b/test/fixedbugs/bug258.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug259.go b/test/fixedbugs/bug259.go
index d148fb3a0..e4dcaeb2f 100644
--- a/test/fixedbugs/bug259.go
+++ b/test/fixedbugs/bug259.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug260.go b/test/fixedbugs/bug260.go
index 39d29b430..6211c4885 100644
--- a/test/fixedbugs/bug260.go
+++ b/test/fixedbugs/bug260.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG: bug260 failed
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug261.go b/test/fixedbugs/bug261.go
index 8c3fda1e7..f7879b04c 100644
--- a/test/fixedbugs/bug261.go
+++ b/test/fixedbugs/bug261.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug262.go b/test/fixedbugs/bug262.go
index f5f2c3553..6cf248a18 100644
--- a/test/fixedbugs/bug262.go
+++ b/test/fixedbugs/bug262.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
@@ -7,7 +7,7 @@
package main
import (
- "os"
+ "errors"
"strconv"
)
@@ -44,7 +44,7 @@ func main() {
}
mm := make(map[string]error)
trace = ""
- mm["abc"] = os.EINVAL
+ mm["abc"] = errors.New("invalid")
*i(), mm[f()] = strconv.Atoi(h())
if mm["abc"] != nil || trace != "ifh" {
println("BUG1", mm["abc"], trace)
diff --git a/test/fixedbugs/bug263.go b/test/fixedbugs/bug263.go
index cab986ad5..f1cf9010d 100644
--- a/test/fixedbugs/bug263.go
+++ b/test/fixedbugs/bug263.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug264.go b/test/fixedbugs/bug264.go
index 6d86c6fe5..fcf373cce 100644
--- a/test/fixedbugs/bug264.go
+++ b/test/fixedbugs/bug264.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug265.go b/test/fixedbugs/bug265.go
index 55f32ecec..7f06fced6 100644
--- a/test/fixedbugs/bug265.go
+++ b/test/fixedbugs/bug265.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug266.go b/test/fixedbugs/bug266.go
index 25c246f7d..d4da891d3 100644
--- a/test/fixedbugs/bug266.go
+++ b/test/fixedbugs/bug266.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG: bug266
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug267.go b/test/fixedbugs/bug267.go
index 9646142f2..cf8bf841f 100644
--- a/test/fixedbugs/bug267.go
+++ b/test/fixedbugs/bug267.go
@@ -1,10 +1,10 @@
-// $G $D/$F.go || echo BUG
+// compile
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-package main
+package bug267
type T []int
diff --git a/test/fixedbugs/bug269.go b/test/fixedbugs/bug269.go
index 4cc0408c3..c13eb26ce 100644
--- a/test/fixedbugs/bug269.go
+++ b/test/fixedbugs/bug269.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug271.go b/test/fixedbugs/bug271.go
index ba93d93ed..88add7040 100644
--- a/test/fixedbugs/bug271.go
+++ b/test/fixedbugs/bug271.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug272.go b/test/fixedbugs/bug272.go
index 3b7c46674..c27f7ee44 100644
--- a/test/fixedbugs/bug272.go
+++ b/test/fixedbugs/bug272.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug273.go b/test/fixedbugs/bug273.go
index dd5aaa7b8..b35b17d2e 100644
--- a/test/fixedbugs/bug273.go
+++ b/test/fixedbugs/bug273.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug274.go b/test/fixedbugs/bug274.go
index 198544c3f..beb2d61ac 100644
--- a/test/fixedbugs/bug274.go
+++ b/test/fixedbugs/bug274.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug275.go b/test/fixedbugs/bug275.go
index 2bbc807c5..f5f6b14f0 100644
--- a/test/fixedbugs/bug275.go
+++ b/test/fixedbugs/bug275.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo BUG should compile
+// compile
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug276.go b/test/fixedbugs/bug276.go
index 844a6b238..dc2308ea6 100644
--- a/test/fixedbugs/bug276.go
+++ b/test/fixedbugs/bug276.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG code should run
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug277.go b/test/fixedbugs/bug277.go
index 22b2908c9..207556493 100644
--- a/test/fixedbugs/bug277.go
+++ b/test/fixedbugs/bug277.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo BUG should compile
+// compile
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug278.go b/test/fixedbugs/bug278.go
index 3699b9a14..68a3d811c 100644
--- a/test/fixedbugs/bug278.go
+++ b/test/fixedbugs/bug278.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug279.go b/test/fixedbugs/bug279.go
index af8e056d9..e5ec5943c 100644
--- a/test/fixedbugs/bug279.go
+++ b/test/fixedbugs/bug279.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug280.go b/test/fixedbugs/bug280.go
index 869d44626..ba594a2c4 100644
--- a/test/fixedbugs/bug280.go
+++ b/test/fixedbugs/bug280.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug281.go b/test/fixedbugs/bug281.go
index 821b02825..24d6fdce8 100644
--- a/test/fixedbugs/bug281.go
+++ b/test/fixedbugs/bug281.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug283.go b/test/fixedbugs/bug283.go
index 45ee9082f..eefed0334 100644
--- a/test/fixedbugs/bug283.go
+++ b/test/fixedbugs/bug283.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo BUG: should compile
+// compile
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
@@ -7,7 +7,7 @@
// http://code.google.com/p/go/issues/detail?id=806
// triggered out of registers on 8g
-package main
+package bug283
type Point struct {
x int
diff --git a/test/fixedbugs/bug284.go b/test/fixedbugs/bug284.go
index bcf161e3d..68208085f 100644
--- a/test/fixedbugs/bug284.go
+++ b/test/fixedbugs/bug284.go
@@ -1,4 +1,4 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug285.go b/test/fixedbugs/bug285.go
index 7eed8fb7a..0a8a0f09e 100644
--- a/test/fixedbugs/bug285.go
+++ b/test/fixedbugs/bug285.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG: bug285
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug286.go b/test/fixedbugs/bug286.go
index eb6783856..44f05153f 100644
--- a/test/fixedbugs/bug286.go
+++ b/test/fixedbugs/bug286.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG: bug286 failed
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug287.go b/test/fixedbugs/bug287.go
index a4a08eedc..2ed81c593 100644
--- a/test/fixedbugs/bug287.go
+++ b/test/fixedbugs/bug287.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug288.go b/test/fixedbugs/bug288.go
index 0105159d1..d2461e6a9 100644
--- a/test/fixedbugs/bug288.go
+++ b/test/fixedbugs/bug288.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go
+// compile
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug289.go b/test/fixedbugs/bug289.go
index f7180ff04..3c6b68767 100644
--- a/test/fixedbugs/bug289.go
+++ b/test/fixedbugs/bug289.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug290.go b/test/fixedbugs/bug290.go
index 80437c7f8..c8ff0bc45 100644
--- a/test/fixedbugs/bug290.go
+++ b/test/fixedbugs/bug290.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug291.go b/test/fixedbugs/bug291.go
index 09334c921..17a5483ef 100644
--- a/test/fixedbugs/bug291.go
+++ b/test/fixedbugs/bug291.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug292.go b/test/fixedbugs/bug292.go
index 05852cd46..07051dd3f 100644
--- a/test/fixedbugs/bug292.go
+++ b/test/fixedbugs/bug292.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug293.go b/test/fixedbugs/bug293.go
index ca9b71a3a..bf926f5a4 100644
--- a/test/fixedbugs/bug293.go
+++ b/test/fixedbugs/bug293.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug294.go b/test/fixedbugs/bug294.go
index 18f45931c..0f3e38098 100644
--- a/test/fixedbugs/bug294.go
+++ b/test/fixedbugs/bug294.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug295.go b/test/fixedbugs/bug295.go
index fec2351f3..e2e5206ca 100644
--- a/test/fixedbugs/bug295.go
+++ b/test/fixedbugs/bug295.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug296.go b/test/fixedbugs/bug296.go
index 46d8dbcfe..a7c4e0c46 100644
--- a/test/fixedbugs/bug296.go
+++ b/test/fixedbugs/bug296.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug297.go b/test/fixedbugs/bug297.go
index 8767cdfea..b5dfa8d87 100644
--- a/test/fixedbugs/bug297.go
+++ b/test/fixedbugs/bug297.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug298.go b/test/fixedbugs/bug298.go
index c16c3f98a..bd362ace2 100644
--- a/test/fixedbugs/bug298.go
+++ b/test/fixedbugs/bug298.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug299.go b/test/fixedbugs/bug299.go
index 1c7adb5f5..9646723bf 100644
--- a/test/fixedbugs/bug299.go
+++ b/test/fixedbugs/bug299.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug300.go b/test/fixedbugs/bug300.go
index 09ee3ab69..1ef43a0ad 100644
--- a/test/fixedbugs/bug300.go
+++ b/test/fixedbugs/bug300.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug301.go b/test/fixedbugs/bug301.go
index a58f4e13b..572668f19 100644
--- a/test/fixedbugs/bug301.go
+++ b/test/fixedbugs/bug301.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo BUG: bug301.go
+// compile
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug302.go b/test/fixedbugs/bug302.go
index e9edb94ac..1088b2f3c 100644
--- a/test/fixedbugs/bug302.go
+++ b/test/fixedbugs/bug302.go
@@ -1,4 +1,4 @@
-// $G $D/bug302.dir/p.go && gopack grc pp.a p.$A && $G $D/bug302.dir/main.go
+// $G $D/bug302.dir/p.go && pack grc pp.a p.$A && $G $D/bug302.dir/main.go
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug303.go b/test/fixedbugs/bug303.go
index 3bd790f13..94ca07e70 100644
--- a/test/fixedbugs/bug303.go
+++ b/test/fixedbugs/bug303.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug304.go b/test/fixedbugs/bug304.go
index adcf08a35..ad71b20f3 100644
--- a/test/fixedbugs/bug304.go
+++ b/test/fixedbugs/bug304.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go
+// compile
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug305.go b/test/fixedbugs/bug305.go
index 758fee269..d0a4b24b8 100644
--- a/test/fixedbugs/bug305.go
+++ b/test/fixedbugs/bug305.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug307.go b/test/fixedbugs/bug307.go
index 1b42c09ab..644512529 100644
--- a/test/fixedbugs/bug307.go
+++ b/test/fixedbugs/bug307.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go
+// compile
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug308.go b/test/fixedbugs/bug308.go
index c2845f042..5bea5175b 100644
--- a/test/fixedbugs/bug308.go
+++ b/test/fixedbugs/bug308.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go
+// compile
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug309.go b/test/fixedbugs/bug309.go
index d893916cd..948ca5c79 100644
--- a/test/fixedbugs/bug309.go
+++ b/test/fixedbugs/bug309.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go
+// compile
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
@@ -6,7 +6,7 @@
// issue 1016
-package main
+package bug309
func foo(t interface{}, c chan int) {
switch v := t.(type) {
diff --git a/test/fixedbugs/bug311.go b/test/fixedbugs/bug311.go
index ed937a674..edcd97596 100644
--- a/test/fixedbugs/bug311.go
+++ b/test/fixedbugs/bug311.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug312.go b/test/fixedbugs/bug312.go
index 70888dd41..c7c17e101 100644
--- a/test/fixedbugs/bug312.go
+++ b/test/fixedbugs/bug312.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug314.go b/test/fixedbugs/bug314.go
index 95d81d795..6e26d14e1 100644
--- a/test/fixedbugs/bug314.go
+++ b/test/fixedbugs/bug314.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG: bug314
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug315.go b/test/fixedbugs/bug315.go
index c59ef29e6..7b8a9e570 100644
--- a/test/fixedbugs/bug315.go
+++ b/test/fixedbugs/bug315.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo BUG: bug315
+// compile
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug316.go b/test/fixedbugs/bug316.go
index 2146408a1..e1374122d 100644
--- a/test/fixedbugs/bug316.go
+++ b/test/fixedbugs/bug316.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo BUG: bug316
+// compile
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug317.go b/test/fixedbugs/bug317.go
index 0cb26c29b..3ff4dc465 100644
--- a/test/fixedbugs/bug317.go
+++ b/test/fixedbugs/bug317.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG: bug317
+// run
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug318.go b/test/fixedbugs/bug318.go
index 9c46a0426..93de2d847 100644
--- a/test/fixedbugs/bug318.go
+++ b/test/fixedbugs/bug318.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug319.go b/test/fixedbugs/bug319.go
index f60eee4fb..f8e959a31 100644
--- a/test/fixedbugs/bug319.go
+++ b/test/fixedbugs/bug319.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go
+// compile
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug320.go b/test/fixedbugs/bug320.go
index 06d41f2ed..c2dd31b81 100644
--- a/test/fixedbugs/bug320.go
+++ b/test/fixedbugs/bug320.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug321.go b/test/fixedbugs/bug321.go
index d0595ff59..7d018271f 100644
--- a/test/fixedbugs/bug321.go
+++ b/test/fixedbugs/bug321.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG: bug321
+// run
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug323.go b/test/fixedbugs/bug323.go
index 23e2be660..9730ae5c8 100644
--- a/test/fixedbugs/bug323.go
+++ b/test/fixedbugs/bug323.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug325.go b/test/fixedbugs/bug325.go
index b86740fff..6ccd0e3c8 100644
--- a/test/fixedbugs/bug325.go
+++ b/test/fixedbugs/bug325.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug326.go b/test/fixedbugs/bug326.go
index 7e123e3a3..57f6471dc 100644
--- a/test/fixedbugs/bug326.go
+++ b/test/fixedbugs/bug326.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug327.go b/test/fixedbugs/bug327.go
index 4ba5f6072..0598d95d6 100644
--- a/test/fixedbugs/bug327.go
+++ b/test/fixedbugs/bug327.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug329.go b/test/fixedbugs/bug329.go
index 0b7074d62..74fc78198 100644
--- a/test/fixedbugs/bug329.go
+++ b/test/fixedbugs/bug329.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug330.go b/test/fixedbugs/bug330.go
index 114492aff..ef6a0777f 100644
--- a/test/fixedbugs/bug330.go
+++ b/test/fixedbugs/bug330.go
@@ -1,4 +1,4 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug331.go b/test/fixedbugs/bug331.go
index 6c5acd1f4..fac0e3628 100644
--- a/test/fixedbugs/bug331.go
+++ b/test/fixedbugs/bug331.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG: bug331
+// run
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug332.go b/test/fixedbugs/bug332.go
index be79286b8..702779ba6 100644
--- a/test/fixedbugs/bug332.go
+++ b/test/fixedbugs/bug332.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug333.go b/test/fixedbugs/bug333.go
index 515c1f3fa..bb690f0e5 100644
--- a/test/fixedbugs/bug333.go
+++ b/test/fixedbugs/bug333.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug334.go b/test/fixedbugs/bug334.go
index 870c9ae24..bd671696b 100644
--- a/test/fixedbugs/bug334.go
+++ b/test/fixedbugs/bug334.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo BUG: bug334
+// compile
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug336.go b/test/fixedbugs/bug336.go
index 8de36898f..fbf23207c 100644
--- a/test/fixedbugs/bug336.go
+++ b/test/fixedbugs/bug336.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug337.go b/test/fixedbugs/bug337.go
index ca9b4b453..38dc665fa 100644
--- a/test/fixedbugs/bug337.go
+++ b/test/fixedbugs/bug337.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug338.go b/test/fixedbugs/bug338.go
index c368a7fad..c2193fcc2 100644
--- a/test/fixedbugs/bug338.go
+++ b/test/fixedbugs/bug338.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go
+// compile
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug339.go b/test/fixedbugs/bug339.go
index eac7c5ee6..59921d41c 100644
--- a/test/fixedbugs/bug339.go
+++ b/test/fixedbugs/bug339.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug340.go b/test/fixedbugs/bug340.go
index 34cc01315..d996ab64c 100644
--- a/test/fixedbugs/bug340.go
+++ b/test/fixedbugs/bug340.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug341.go b/test/fixedbugs/bug341.go
index 8ee52e1ef..db1af3eaa 100644
--- a/test/fixedbugs/bug341.go
+++ b/test/fixedbugs/bug341.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG: bug341
+// run
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug342.go b/test/fixedbugs/bug342.go
index 0852cdd34..5f1efbdfe 100644
--- a/test/fixedbugs/bug342.go
+++ b/test/fixedbugs/bug342.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug343.go b/test/fixedbugs/bug343.go
index efc87e3d7..82201088b 100644
--- a/test/fixedbugs/bug343.go
+++ b/test/fixedbugs/bug343.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG: bug343
+// run
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug344.go b/test/fixedbugs/bug344.go
index ce953f7f2..4a92624c7 100644
--- a/test/fixedbugs/bug344.go
+++ b/test/fixedbugs/bug344.go
@@ -1,4 +1,4 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug346.go b/test/fixedbugs/bug346.go
index 31284c31a..d9203aa43 100644
--- a/test/fixedbugs/bug346.go
+++ b/test/fixedbugs/bug346.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG: issue2056
+// run
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug347.go b/test/fixedbugs/bug347.go
index 5532cee83..08edf0f4f 100644
--- a/test/fixedbugs/bug347.go
+++ b/test/fixedbugs/bug347.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug348.go b/test/fixedbugs/bug348.go
index 1a539aa3e..54a289a8d 100644
--- a/test/fixedbugs/bug348.go
+++ b/test/fixedbugs/bug348.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug349.go b/test/fixedbugs/bug349.go
index e7612edb7..a3e6bd161 100644
--- a/test/fixedbugs/bug349.go
+++ b/test/fixedbugs/bug349.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug350.go b/test/fixedbugs/bug350.go
index f8df3f58b..5ce8996ff 100644
--- a/test/fixedbugs/bug350.go
+++ b/test/fixedbugs/bug350.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug351.go b/test/fixedbugs/bug351.go
index 9625c6a50..4c5c7c327 100644
--- a/test/fixedbugs/bug351.go
+++ b/test/fixedbugs/bug351.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug352.go b/test/fixedbugs/bug352.go
index 62fd006c4..1ae2d6139 100644
--- a/test/fixedbugs/bug352.go
+++ b/test/fixedbugs/bug352.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG: bug352
+// run
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug353.go b/test/fixedbugs/bug353.go
index b59d97f33..2a532c491 100644
--- a/test/fixedbugs/bug353.go
+++ b/test/fixedbugs/bug353.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug354.go b/test/fixedbugs/bug354.go
index a95256e27..1245d91f5 100644
--- a/test/fixedbugs/bug354.go
+++ b/test/fixedbugs/bug354.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo BUG: bug354
+// compile
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
@@ -7,7 +7,7 @@
// issue 2086
// was calling makeclosure twice on the closure
-package main
+package bug354
type Inner struct {
F func() error
diff --git a/test/fixedbugs/bug355.go b/test/fixedbugs/bug355.go
index a9cf0161b..fcf859b7f 100644
--- a/test/fixedbugs/bug355.go
+++ b/test/fixedbugs/bug355.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug356.go b/test/fixedbugs/bug356.go
index d21f0cfac..273c5b8ef 100644
--- a/test/fixedbugs/bug356.go
+++ b/test/fixedbugs/bug356.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG: bug344
+// run
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug357.go b/test/fixedbugs/bug357.go
index 448d98263..2ac64a80b 100644
--- a/test/fixedbugs/bug357.go
+++ b/test/fixedbugs/bug357.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug358.go b/test/fixedbugs/bug358.go
index 82fbf7f81..6a008484f 100644
--- a/test/fixedbugs/bug358.go
+++ b/test/fixedbugs/bug358.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug361.go b/test/fixedbugs/bug361.go
index d2a64bcef..3e3b7c181 100644
--- a/test/fixedbugs/bug361.go
+++ b/test/fixedbugs/bug361.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo BUG: bug360
+// compile
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug362.go b/test/fixedbugs/bug362.go
index f38572c0d..b888ccb44 100644
--- a/test/fixedbugs/bug362.go
+++ b/test/fixedbugs/bug362.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug363.go b/test/fixedbugs/bug363.go
index 9347ec28b..615c66865 100644
--- a/test/fixedbugs/bug363.go
+++ b/test/fixedbugs/bug363.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug364.go b/test/fixedbugs/bug364.go
index a93312107..64120d164 100644
--- a/test/fixedbugs/bug364.go
+++ b/test/fixedbugs/bug364.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug365.go b/test/fixedbugs/bug365.go
index bc8c2c5e6..795323bb3 100644
--- a/test/fixedbugs/bug365.go
+++ b/test/fixedbugs/bug365.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug366.go b/test/fixedbugs/bug366.go
index 8c000f50a..33a1a5a7e 100644
--- a/test/fixedbugs/bug366.go
+++ b/test/fixedbugs/bug366.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug368.go b/test/fixedbugs/bug368.go
index 8d94f531c..c38cc7fad 100644
--- a/test/fixedbugs/bug368.go
+++ b/test/fixedbugs/bug368.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug369.go b/test/fixedbugs/bug369.go
index 8eb23eecf..4d98e8508 100644
--- a/test/fixedbugs/bug369.go
+++ b/test/fixedbugs/bug369.go
@@ -1,6 +1,6 @@
// $G -N -o slow.$A $D/bug369.dir/pkg.go &&
// $G -o fast.$A $D/bug369.dir/pkg.go &&
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug370.go b/test/fixedbugs/bug370.go
index 9cb45f6e0..246bc7c4e 100644
--- a/test/fixedbugs/bug370.go
+++ b/test/fixedbugs/bug370.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug371.go b/test/fixedbugs/bug371.go
index bf993df06..6329e9635 100644
--- a/test/fixedbugs/bug371.go
+++ b/test/fixedbugs/bug371.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug372.go b/test/fixedbugs/bug372.go
index a6f7208bb..34578565a 100644
--- a/test/fixedbugs/bug372.go
+++ b/test/fixedbugs/bug372.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG: bug372
+// run
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug373.go b/test/fixedbugs/bug373.go
index 934a6c732..e91f26d6e 100644
--- a/test/fixedbugs/bug373.go
+++ b/test/fixedbugs/bug373.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug374.go b/test/fixedbugs/bug374.go
index 2e6f27adc..4f0b721f2 100644
--- a/test/fixedbugs/bug374.go
+++ b/test/fixedbugs/bug374.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
@@ -13,8 +13,8 @@ type I interface {
type T int
-var _ I = T(0)
+var _ I = T(0) // GCCGO_ERROR "incompatible"
func (T) m(buf []byte) (a int, b xxxx) { // ERROR "xxxx"
return 0, nil
-} \ No newline at end of file
+}
diff --git a/test/fixedbugs/bug375.go b/test/fixedbugs/bug375.go
index 527358526..cb159b0d6 100644
--- a/test/fixedbugs/bug375.go
+++ b/test/fixedbugs/bug375.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG: bug375
+// run
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug376.go b/test/fixedbugs/bug376.go
index 1efbeecf2..5fbbc9cd4 100644
--- a/test/fixedbugs/bug376.go
+++ b/test/fixedbugs/bug376.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug378.go b/test/fixedbugs/bug378.go
index b393b3dc1..f3346c648 100644
--- a/test/fixedbugs/bug378.go
+++ b/test/fixedbugs/bug378.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG: bug378
+// run
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug379.go b/test/fixedbugs/bug379.go
index 3dd3d2983..81e9c266e 100644
--- a/test/fixedbugs/bug379.go
+++ b/test/fixedbugs/bug379.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug380.go b/test/fixedbugs/bug380.go
index 75b58064f..96e1edeca 100644
--- a/test/fixedbugs/bug380.go
+++ b/test/fixedbugs/bug380.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go
+// compile
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug381.go b/test/fixedbugs/bug381.go
index 3f3232bf1..0253e1446 100644
--- a/test/fixedbugs/bug381.go
+++ b/test/fixedbugs/bug381.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
@@ -7,14 +7,25 @@
// Issue 2276.
// Check that the error messages says
-// bug378.go:19: unsafe.Alignof(0) not used
+// bug381.go:29: unsafe.Alignof(0) not used
// and not
-// bug378.go:19: 4 not used
+// bug381.go:29: 4 not used
+
+// Issue 2768: previously got
+// bug381.go:30: cannot use 3 (type time.Weekday) as type int in function argument
+// want
+// bug381.go:30: cannot use time.Wednesday (type time.Weekday) as type int in function argument
package main
-import "unsafe"
+import (
+ "time"
+ "unsafe"
+)
+
+func f(int)
func main() {
unsafe.Alignof(0) // ERROR "unsafe\.Alignof|value computed is not used"
+ f(time.Wednesday) // ERROR "time.Wednesday|incompatible type"
}
diff --git a/test/fixedbugs/bug383.go b/test/fixedbugs/bug383.go
index 9dccff590..503779c37 100644
--- a/test/fixedbugs/bug383.go
+++ b/test/fixedbugs/bug383.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
@@ -8,6 +8,6 @@
package main
func main() {
- if 2e9 { } // ERROR "2e.09"
- if 3.14+1i { } // ERROR "3.14 . 1i"
-} \ No newline at end of file
+ if 2e9 { } // ERROR "2e.09|expected bool"
+ if 3.14+1i { } // ERROR "3.14 . 1i|expected bool"
+}
diff --git a/test/fixedbugs/bug384.go b/test/fixedbugs/bug384.go
index b3d646688..0233c197c 100644
--- a/test/fixedbugs/bug384.go
+++ b/test/fixedbugs/bug384.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug385_32.go b/test/fixedbugs/bug385_32.go
index a009f664e..b9ecbb4c1 100644
--- a/test/fixedbugs/bug385_32.go
+++ b/test/fixedbugs/bug385_32.go
@@ -1,4 +1,4 @@
-// [ $O == 6 ] || errchk $G -e $D/$F.go
+// [ $A == 6 ] || errchk $G -e $D/$F.go
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug385_64.go b/test/fixedbugs/bug385_64.go
index 701be0d09..7476b17d5 100644
--- a/test/fixedbugs/bug385_64.go
+++ b/test/fixedbugs/bug385_64.go
@@ -1,4 +1,4 @@
-// [ $O != 6 ] || errchk $G -e $D/$F.go
+// [ $A != 6 ] || errchk $G -e $D/$F.go
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug386.go b/test/fixedbugs/bug386.go
index 85b8d3082..ec358bd36 100644
--- a/test/fixedbugs/bug386.go
+++ b/test/fixedbugs/bug386.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
@@ -7,6 +7,6 @@
// Issue 2451, 2452
package foo
-func f() error { return 0 } // ERROR "cannot use 0 .type int."
+func f() error { return 0 } // ERROR "cannot use 0 .type int.|has no methods"
-func g() error { return -1 } // ERROR "cannot use -1 .type int." \ No newline at end of file
+func g() error { return -1 } // ERROR "cannot use -1 .type int.|has no methods"
diff --git a/test/fixedbugs/bug387.go b/test/fixedbugs/bug387.go
index c9db4aea8..59d5ef903 100644
--- a/test/fixedbugs/bug387.go
+++ b/test/fixedbugs/bug387.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo "Bug387"
+// compile
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug388.go b/test/fixedbugs/bug388.go
index d480e852f..aa4cc5a97 100644
--- a/test/fixedbugs/bug388.go
+++ b/test/fixedbugs/bug388.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
@@ -9,27 +9,27 @@
package main
import "runtime"
-func foo(runtime.UintType, i int) { // ERROR "cannot declare name runtime.UintType"
+func foo(runtime.UintType, i int) { // ERROR "cannot declare name runtime.UintType|named/anonymous mix"
println(i, runtime.UintType)
}
func bar(i int) {
- runtime.UintType := i // ERROR "cannot declare name runtime.UintType"
- println(runtime.UintType)
+ runtime.UintType := i // ERROR "cannot declare name runtime.UintType|non-name on left side"
+ println(runtime.UintType) // GCCGO_ERROR "invalid use of type"
}
func baz() {
- main.i := 1 // ERROR "non-name main.i"
- println(main.i)
+ main.i := 1 // ERROR "non-name main.i|non-name on left side"
+ println(main.i) // GCCGO_ERROR "no fields or methods"
}
func qux() {
- var main.i // ERROR "unexpected [.]"
+ var main.i // ERROR "unexpected [.]|expected type"
println(main.i)
}
func corge() {
- var foo.i int // ERROR "unexpected [.]"
+ var foo.i int // ERROR "unexpected [.]|expected type"
println(foo.i)
}
diff --git a/test/fixedbugs/bug389.go b/test/fixedbugs/bug389.go
index 40d6c419c..55a02e05c 100644
--- a/test/fixedbugs/bug389.go
+++ b/test/fixedbugs/bug389.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
@@ -9,4 +9,4 @@ package foo
func fn(a float32) {}
-var f func(arg int) = fn // ERROR "cannot use fn .type func.float32.. as type func.int. in assignment" \ No newline at end of file
+var f func(arg int) = fn // ERROR "cannot use fn .type func.float32.. as type func.int. in assignment|different parameter types"
diff --git a/test/fixedbugs/bug390.go b/test/fixedbugs/bug390.go
index 9ee5bc9d6..7ce9e1370 100644
--- a/test/fixedbugs/bug390.go
+++ b/test/fixedbugs/bug390.go
@@ -1,4 +1,4 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
@@ -12,5 +12,5 @@ import "unsafe"
func main() {
var x *int
- _ = unsafe.Pointer(x) - unsafe.Pointer(x) // ERROR "operator - not defined on unsafe.Pointer"
+ _ = unsafe.Pointer(x) - unsafe.Pointer(x) // ERROR "operator - not defined on unsafe.Pointer|expected integer, floating, or complex type"
}
diff --git a/test/fixedbugs/bug391.go b/test/fixedbugs/bug391.go
index 81507188b..07d129ddc 100644
--- a/test/fixedbugs/bug391.go
+++ b/test/fixedbugs/bug391.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo "Issue2576"
+// compile
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug392.dir/one.go b/test/fixedbugs/bug392.dir/one.go
index a7017255e..8242f2846 100644
--- a/test/fixedbugs/bug392.dir/one.go
+++ b/test/fixedbugs/bug392.dir/one.go
@@ -20,3 +20,24 @@ func F3() (ret []int) { return append(ret, 1) }
// Call of inlined method with blank receiver.
func (_ *T) M() int { return 1 }
func (t *T) MM() int { return t.M() }
+
+
+// One more like issue 2678
+type S struct { x, y int }
+type U []S
+
+func F4(S int) U { return U{{S,S}} }
+
+func F5() []*S {
+ return []*S{ {1,2}, { 3, 4} }
+}
+
+func F6(S int) *U {
+ return &U{{S,S}}
+}
+
+// Bug in the fix.
+
+type PB struct { x int }
+
+func (t *PB) Reset() { *t = PB{} }
diff --git a/test/fixedbugs/bug392.dir/three.go b/test/fixedbugs/bug392.dir/three.go
new file mode 100644
index 000000000..a6193bf91
--- /dev/null
+++ b/test/fixedbugs/bug392.dir/three.go
@@ -0,0 +1,13 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Use the functions in one.go so that the inlined
+// forms get type-checked.
+
+package three
+
+import "./two"
+
+var x = two.F()
+var v = two.V
diff --git a/test/fixedbugs/bug392.dir/two.go b/test/fixedbugs/bug392.dir/two.go
index b0ce26d39..a9033dbb0 100644
--- a/test/fixedbugs/bug392.dir/two.go
+++ b/test/fixedbugs/bug392.dir/two.go
@@ -13,8 +13,13 @@ func use() {
one.F1(nil)
one.F2(nil)
one.F3()
+ one.F4(1)
var t *one.T
t.M()
t.MM()
}
+
+var V = []one.PB{{}, {}}
+
+func F() *one.PB
diff --git a/test/fixedbugs/bug392.go b/test/fixedbugs/bug392.go
index 50af6006f..a7a4216c4 100644
--- a/test/fixedbugs/bug392.go
+++ b/test/fixedbugs/bug392.go
@@ -1,4 +1,4 @@
-// $G $D/$F.dir/one.go && $G $D/$F.dir/two.go
+// $G $D/$F.dir/one.go && $G $D/$F.dir/two.go && $G $D/$F.dir/three.go
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug393.go b/test/fixedbugs/bug393.go
index e21b9c4a4..f8a9c6578 100644
--- a/test/fixedbugs/bug393.go
+++ b/test/fixedbugs/bug393.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo BUG: bug393
+// compile
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
@@ -7,7 +7,7 @@
// issue 2672
// was trying binary search with an interface type
-package main
+package bug393
func f(x interface{}) int {
switch x {
diff --git a/test/fixedbugs/bug394.go b/test/fixedbugs/bug394.go
index 4d0f090bc..2d77156c1 100644
--- a/test/fixedbugs/bug394.go
+++ b/test/fixedbugs/bug394.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
@@ -7,4 +7,4 @@
// Issue 2598
package foo
-return nil // ERROR "non-declaration statement outside function body"
+return nil // ERROR "non-declaration statement outside function body|expected declaration"
diff --git a/test/fixedbugs/bug397.go b/test/fixedbugs/bug397.go
index cc8bfc017..56cc7cdd4 100644
--- a/test/fixedbugs/bug397.go
+++ b/test/fixedbugs/bug397.go
@@ -1,4 +1,4 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
@@ -9,5 +9,5 @@ package main
// Issue 2623
var m = map[string]int {
"abc":1,
- 1:2, // ERROR "cannot use 1.*as type string in map key"
+ 1:2, // ERROR "cannot use 1.*as type string in map key|incompatible type"
}
diff --git a/test/fixedbugs/bug398.go b/test/fixedbugs/bug398.go
index 1eee2292c..1dd3fa421 100644
--- a/test/fixedbugs/bug398.go
+++ b/test/fixedbugs/bug398.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go
+// compile
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug399.go b/test/fixedbugs/bug399.go
index 25f6351e0..94852c9ee 100644
--- a/test/fixedbugs/bug399.go
+++ b/test/fixedbugs/bug399.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo "Bug399"
+// compile
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug401.go b/test/fixedbugs/bug401.go
index 553e217b7..5589b5b1b 100644
--- a/test/fixedbugs/bug401.go
+++ b/test/fixedbugs/bug401.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo "Bug401"
+// run
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug402.go b/test/fixedbugs/bug402.go
new file mode 100644
index 000000000..db3f3da44
--- /dev/null
+++ b/test/fixedbugs/bug402.go
@@ -0,0 +1,31 @@
+// run
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+import "fmt"
+
+var a = []int64{
+ 0.0005 * 1e9,
+ 0.001 * 1e9,
+ 0.005 * 1e9,
+ 0.01 * 1e9,
+ 0.05 * 1e9,
+ 0.1 * 1e9,
+ 0.5 * 1e9,
+ 1 * 1e9,
+ 5 * 1e9,
+}
+
+func main() {
+ s := ""
+ for _, v := range a {
+ s += fmt.Sprint(v) + " "
+ }
+ if s != "500000 1000000 5000000 10000000 50000000 100000000 500000000 1000000000 5000000000 " {
+ panic(s)
+ }
+}
diff --git a/test/fixedbugs/bug403.go b/test/fixedbugs/bug403.go
new file mode 100644
index 000000000..ed7b49aea
--- /dev/null
+++ b/test/fixedbugs/bug403.go
@@ -0,0 +1,23 @@
+// compile
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Crashed gccgo.
+
+package p
+
+type S struct {
+ f interface{}
+}
+
+func F(p *S) bool {
+ v := p.f
+ switch a := v.(type) {
+ case nil:
+ _ = a
+ return true
+ }
+ return true
+}
diff --git a/test/fixedbugs/bug404.dir/one.go b/test/fixedbugs/bug404.dir/one.go
new file mode 100644
index 000000000..2024eb007
--- /dev/null
+++ b/test/fixedbugs/bug404.dir/one.go
@@ -0,0 +1,19 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package one
+
+type T1 int
+type T2 []T1
+type T3 T2
+
+func F1(T2) {
+}
+
+func (p *T1) M1() T3 {
+ return nil
+}
+
+func (p T3) M2() {
+}
diff --git a/test/fixedbugs/bug404.dir/two.go b/test/fixedbugs/bug404.dir/two.go
new file mode 100644
index 000000000..162eae712
--- /dev/null
+++ b/test/fixedbugs/bug404.dir/two.go
@@ -0,0 +1,12 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// The gccgo compiler would fail on the import statement.
+// two.go:10:13: error: use of undefined type ‘one.T2’
+
+package two
+
+import "./one"
+
+var V one.T3
diff --git a/test/fixedbugs/bug404.go b/test/fixedbugs/bug404.go
new file mode 100644
index 000000000..ac9e575bb
--- /dev/null
+++ b/test/fixedbugs/bug404.go
@@ -0,0 +1,7 @@
+// $G $D/$F.dir/one.go && $G $D/$F.dir/two.go
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package ignored
diff --git a/test/fixedbugs/bug405.go b/test/fixedbugs/bug405.go
new file mode 100644
index 000000000..e8ecc4d03
--- /dev/null
+++ b/test/fixedbugs/bug405.go
@@ -0,0 +1,24 @@
+// run
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Test using _ receiver. Failed with gccgo.
+
+package main
+
+type S struct {}
+
+func (_ S) F(i int) int {
+ return i
+}
+
+func main() {
+ s := S{}
+ const c = 123
+ i := s.F(c)
+ if i != c {
+ panic(i)
+ }
+}
diff --git a/test/fixedbugs/bug406.go b/test/fixedbugs/bug406.go
new file mode 100644
index 000000000..c6f8534c9
--- /dev/null
+++ b/test/fixedbugs/bug406.go
@@ -0,0 +1,25 @@
+// run
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 2821
+package main
+
+type matrix struct {
+ e []int
+}
+
+func (a matrix) equal() bool {
+ for _ = range a.e {
+ }
+ return true
+}
+
+func main() {
+ var a matrix
+ var i interface{}
+ i = true && a.equal()
+ _ = i
+}
diff --git a/test/fixedbugs/bug407.dir/one.go b/test/fixedbugs/bug407.dir/one.go
new file mode 100644
index 000000000..a91d90433
--- /dev/null
+++ b/test/fixedbugs/bug407.dir/one.go
@@ -0,0 +1,20 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package one
+
+// Issue 2877
+type T struct {
+ f func(t *T, arg int)
+ g func(t T, arg int)
+}
+
+func (t *T) foo(arg int) {}
+func (t T) goo(arg int) {}
+
+func (t *T) F() { t.f = (*T).foo }
+func (t *T) G() { t.g = T.goo }
+
+
+
diff --git a/test/fixedbugs/bug407.dir/two.go b/test/fixedbugs/bug407.dir/two.go
new file mode 100644
index 000000000..67e1852ea
--- /dev/null
+++ b/test/fixedbugs/bug407.dir/two.go
@@ -0,0 +1,15 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Use the functions in one.go so that the inlined
+// forms get type-checked.
+
+package two
+
+import "./one"
+
+func use() {
+ var r one.T
+ r.F()
+}
diff --git a/test/fixedbugs/bug407.go b/test/fixedbugs/bug407.go
new file mode 100644
index 000000000..50af6006f
--- /dev/null
+++ b/test/fixedbugs/bug407.go
@@ -0,0 +1,7 @@
+// $G $D/$F.dir/one.go && $G $D/$F.dir/two.go
+
+// Copyright 2011 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package ignored
diff --git a/test/fixedbugs/bug409.go b/test/fixedbugs/bug409.go
new file mode 100644
index 000000000..884d33370
--- /dev/null
+++ b/test/fixedbugs/bug409.go
@@ -0,0 +1,20 @@
+// $G $D/$F.go && $L $F.$A && ./$A.out 2>&1 | cmp - $D/$F.out
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Multiple inlined calls to a function that causes
+// redundant address loads.
+
+package main
+
+func F(v [2]float64) [2]float64 {
+ return [2]float64{v[0], v[1]}
+}
+
+func main() {
+ a := F([2]float64{1, 2})
+ b := F([2]float64{3, 4})
+ println(a[0], a[1], b[0], b[1])
+}
diff --git a/test/fixedbugs/bug409.out b/test/fixedbugs/bug409.out
new file mode 100644
index 000000000..3cb40ed59
--- /dev/null
+++ b/test/fixedbugs/bug409.out
@@ -0,0 +1 @@
++1.000000e+000 +2.000000e+000 +3.000000e+000 +4.000000e+000
diff --git a/test/fixedbugs/bug410.go b/test/fixedbugs/bug410.go
new file mode 100644
index 000000000..35ecbfc05
--- /dev/null
+++ b/test/fixedbugs/bug410.go
@@ -0,0 +1,24 @@
+// compile
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Used to run 6g out of registers. Issue 2669.
+
+package p
+
+type y struct {
+ num int
+}
+
+func zzz () {
+ k := make([]byte, 10)
+ arr := make ([]*y, 0)
+ for s := range arr {
+ x := make([]byte, 10)
+ for i := 0; i < 100 ; i++ {
+ x[i] ^= k[i-arr[s].num%0]
+ }
+ }
+}
diff --git a/test/fixedbugs/bug411.go b/test/fixedbugs/bug411.go
new file mode 100644
index 000000000..3b90db88d
--- /dev/null
+++ b/test/fixedbugs/bug411.go
@@ -0,0 +1,19 @@
+// compile
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 2588. Used to trigger internal compiler error on 8g,
+// because the compiler tried to registerize the int64 being
+// used as a memory operand of a int64->float64 move.
+
+package p
+
+func f1(a int64) {
+ f2(float64(a), float64(a))
+}
+
+func f2(a,b float64) {
+}
+
diff --git a/test/fixedbugs/bug412.go b/test/fixedbugs/bug412.go
new file mode 100644
index 000000000..9148b68e7
--- /dev/null
+++ b/test/fixedbugs/bug412.go
@@ -0,0 +1,16 @@
+// errorcheck
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package p
+
+type t struct {
+ x int // ERROR "duplicate field x"
+ x int
+}
+
+func f(t *t) int {
+ return t.x // ERROR "ambiguous selector t.x"
+}
diff --git a/test/fixedbugs/bug413.go b/test/fixedbugs/bug413.go
new file mode 100644
index 000000000..41270d906
--- /dev/null
+++ b/test/fixedbugs/bug413.go
@@ -0,0 +1,11 @@
+// errorcheck
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package p
+
+func f(i int) int { return i }
+
+var i = func() int {a := f(i); return a}() // ERROR "initialization loop" \ No newline at end of file
diff --git a/test/fixedbugs/bug414.dir/main.go b/test/fixedbugs/bug414.dir/main.go
new file mode 100644
index 000000000..52001233c
--- /dev/null
+++ b/test/fixedbugs/bug414.dir/main.go
@@ -0,0 +1,18 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+ package main
+
+ import "./p1"
+
+ type MyObject struct {
+ p1.Fer
+ }
+
+ func main() {
+ var b p1.Fer = &p1.Object{}
+ p1.PrintFer(b)
+ var c p1.Fer = &MyObject{b}
+ p1.PrintFer(c)
+ }
diff --git a/test/fixedbugs/bug414.dir/p1.go b/test/fixedbugs/bug414.dir/p1.go
new file mode 100644
index 000000000..7768818bf
--- /dev/null
+++ b/test/fixedbugs/bug414.dir/p1.go
@@ -0,0 +1,21 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+ package p1
+
+ import "fmt"
+
+ type Fer interface {
+ f() string
+ }
+
+ type Object struct {}
+
+ func (this *Object) f() string {
+ return "Object.f"
+ }
+
+ func PrintFer(fer Fer) {
+ fmt.Sprintln(fer.f())
+ }
diff --git a/test/fixedbugs/bug414.go b/test/fixedbugs/bug414.go
new file mode 100644
index 000000000..8824b1a1e
--- /dev/null
+++ b/test/fixedbugs/bug414.go
@@ -0,0 +1,7 @@
+// $G $D/$F.dir/p1.go && $G $D/$F.dir/main.go && $L main.$A && ./$A.out
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package ignored
diff --git a/test/fixedbugs/bug415.dir/main.go b/test/fixedbugs/bug415.dir/main.go
new file mode 100644
index 000000000..b894453fc
--- /dev/null
+++ b/test/fixedbugs/bug415.dir/main.go
@@ -0,0 +1,9 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+import "./p"
+func main() {}
+var _ p.A
+
diff --git a/test/fixedbugs/bug415.dir/p.go b/test/fixedbugs/bug415.dir/p.go
new file mode 100644
index 000000000..b4152d63a
--- /dev/null
+++ b/test/fixedbugs/bug415.dir/p.go
@@ -0,0 +1,14 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package p
+
+type A struct {
+ s struct{int}
+}
+
+func (a *A) f() {
+ a.s = struct{int}{0}
+}
+
diff --git a/test/fixedbugs/bug415.go b/test/fixedbugs/bug415.go
new file mode 100644
index 000000000..fbf034218
--- /dev/null
+++ b/test/fixedbugs/bug415.go
@@ -0,0 +1,9 @@
+// $G $D/$F.dir/p.go && $G $D/$F.dir/main.go
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 2716. Export metadata error made main.go not compile.
+
+package ignored
diff --git a/test/fixedbugs/bug416.go b/test/fixedbugs/bug416.go
new file mode 100644
index 000000000..c12853842
--- /dev/null
+++ b/test/fixedbugs/bug416.go
@@ -0,0 +1,13 @@
+// errorcheck
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package p
+
+type T struct {
+ X int
+}
+
+func (t *T) X() {} // ERROR "type T has both field and method named X"
diff --git a/test/fixedbugs/bug417.go b/test/fixedbugs/bug417.go
new file mode 100644
index 000000000..a9acb4238
--- /dev/null
+++ b/test/fixedbugs/bug417.go
@@ -0,0 +1,32 @@
+// compile
+
+// Copyright 2009 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Some indirect uses of types crashed gccgo, because it assumed that
+// the size of the type was known before it had been computed.
+
+package p
+
+type S1 struct {
+ p *[1]S3
+ s [][1]S3
+ m map[int][1]S3
+ c chan [1]S3
+ i interface { f([1]S3) [1]S3 }
+ f func([1]S3) [1]S3
+}
+
+type S2 struct {
+ p *struct { F S3 }
+ s []struct { F S3 }
+ m map[int]struct { F S3 }
+ c chan struct { F S3 }
+ i interface { f(struct { F S3 }) struct { F S3 } }
+ f func(struct { F S3 } ) struct { F S3 }
+}
+
+type S3 struct {
+ I int
+}
diff --git a/test/fixedbugs/bug418.go b/test/fixedbugs/bug418.go
new file mode 100644
index 000000000..64d86b340
--- /dev/null
+++ b/test/fixedbugs/bug418.go
@@ -0,0 +1,22 @@
+// errorcheck
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 3044.
+// Multiple valued expressions in return lists.
+
+package p
+
+func Two() (a, b int)
+
+// F used to compile.
+func F() (x interface{}, y int) {
+ return Two(), 0 // ERROR "single-value context"
+}
+
+// Recursive used to trigger an internal compiler error.
+func Recursive() (x interface{}, y int) {
+ return Recursive(), 0 // ERROR "single-value context"
+}
diff --git a/test/fixedbugs/bug419.go b/test/fixedbugs/bug419.go
new file mode 100644
index 000000000..cfab404eb
--- /dev/null
+++ b/test/fixedbugs/bug419.go
@@ -0,0 +1,17 @@
+// compile
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 1811.
+// gccgo failed to compile this.
+
+package p
+
+type E interface{}
+
+type I interface {
+ E
+ E
+}
diff --git a/test/fixedbugs/bug420.go b/test/fixedbugs/bug420.go
new file mode 100644
index 000000000..02b4349d8
--- /dev/null
+++ b/test/fixedbugs/bug420.go
@@ -0,0 +1,14 @@
+// compile
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 1757.
+// gccgo failed to compile this.
+
+package main
+
+func main() {
+ (_) = 0
+}
diff --git a/test/fixedbugs/bug421.go b/test/fixedbugs/bug421.go
new file mode 100644
index 000000000..1fe02375a
--- /dev/null
+++ b/test/fixedbugs/bug421.go
@@ -0,0 +1,17 @@
+// errorcheck
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 1927.
+// gccgo failed to issue the first error below.
+
+package main
+
+func main() {
+ println(int(1) == uint(1)) // ERROR "types"
+ var x int = 1
+ var y uint = 1
+ println(x == y) // ERROR "types"
+}
diff --git a/test/fixedbugs/bug422.go b/test/fixedbugs/bug422.go
new file mode 100644
index 000000000..6865fe4b6
--- /dev/null
+++ b/test/fixedbugs/bug422.go
@@ -0,0 +1,11 @@
+// compile
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// gccgo crashed compiling this file.
+
+package p
+
+var V = "a" > "b"
diff --git a/test/fixedbugs/bug423.go b/test/fixedbugs/bug423.go
new file mode 100644
index 000000000..726891245
--- /dev/null
+++ b/test/fixedbugs/bug423.go
@@ -0,0 +1,277 @@
+// run
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// gc used to overflow a counter when a variable was
+// mentioned 256 times, and generate stack corruption.
+
+package main
+
+func main() {
+ F(1)
+}
+
+func F(arg int) {
+ var X interface{}
+ _ = X // used once
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0 // used 32 times
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0 // used 64 times
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0 // used 96 times
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0 // used 128 times
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0 // used 200 times
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0 // used 256 times
+ if arg != 1 {
+ panic("argument was changed")
+ }
+}
diff --git a/test/float_lit.go b/test/float_lit.go
index 7b91d88e5..2912c3749 100644
--- a/test/float_lit.go
+++ b/test/float_lit.go
@@ -1,9 +1,11 @@
-// $G $F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test floating-point literal syntax.
+
package main
var bad bool
diff --git a/test/floatcmp.go b/test/floatcmp.go
index f51cbc277..f9f59a937 100644
--- a/test/floatcmp.go
+++ b/test/floatcmp.go
@@ -1,9 +1,11 @@
-// $G $F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test floating-point comparison involving NaN.
+
package main
import "math"
diff --git a/test/for.go b/test/for.go
index 36ad15709..8a5009065 100644
--- a/test/for.go
+++ b/test/for.go
@@ -1,9 +1,11 @@
-// $G $F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test for loops.
+
package main
func assertequal(is, shouldbe int, msg string) {
diff --git a/test/func.go b/test/func.go
index e8ed928bc..246cb56fd 100644
--- a/test/func.go
+++ b/test/func.go
@@ -1,9 +1,10 @@
-// $G $F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test simple functions.
package main
diff --git a/test/func1.go b/test/func1.go
index 056ff9877..c89f7ff2e 100644
--- a/test/func1.go
+++ b/test/func1.go
@@ -1,14 +1,15 @@
-// errchk $G $F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// does not compile and should not compile
+// Test that result parameters are in the same scope as regular parameters.
+// Does not compile.
package main
-func f1(a int) (int, float32) { // BUG (not caught by compiler): multiple return values must have names
+func f1(a int) (int, float32) {
return 7, 7.0
}
diff --git a/test/func2.go b/test/func2.go
index 87e78194e..b5966a91f 100644
--- a/test/func2.go
+++ b/test/func2.go
@@ -1,9 +1,12 @@
-// $G $F.go || echo BUG: should compile
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test function signatures.
+// Compiled but not run.
+
package main
type t1 int
diff --git a/test/func3.go b/test/func3.go
index 110b0ef1c..6be3bf018 100644
--- a/test/func3.go
+++ b/test/func3.go
@@ -1,9 +1,12 @@
-// errchk $G $F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Verify that illegal function signatures are detected.
+// Does not compile.
+
package main
type t1 int
diff --git a/test/func4.go b/test/func4.go
index 2a1a932de..85f1e4b81 100644
--- a/test/func4.go
+++ b/test/func4.go
@@ -1,9 +1,12 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Verify that it is illegal to take the address of a function.
+// Does not compile.
+
package main
var notmain func()
diff --git a/test/func5.go b/test/func5.go
index e27825c2b..2e058be7e 100644
--- a/test/func5.go
+++ b/test/func5.go
@@ -1,9 +1,11 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test functions and goroutines.
+
package main
func caller(f func(int, int) int, a, b int, c chan int) {
diff --git a/test/func6.go b/test/func6.go
index 1356b6aa8..456cb49f0 100644
--- a/test/func6.go
+++ b/test/func6.go
@@ -1,9 +1,11 @@
-// $G $D/$F.go
+// run
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test closures in if conditions.
+
package main
func main() {
diff --git a/test/func7.go b/test/func7.go
index e38b008cc..6f6766f29 100644
--- a/test/func7.go
+++ b/test/func7.go
@@ -1,9 +1,11 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test evaluation order in if condition.
+
package main
var calledf = false
diff --git a/test/func8.go b/test/func8.go
index bb6106453..7defe265b 100644
--- a/test/func8.go
+++ b/test/func8.go
@@ -1,9 +1,11 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test evaluation order.
+
package main
var calledf int
diff --git a/test/gc.go b/test/gc.go
index 3aab8fac9..6688f9fbd 100644
--- a/test/gc.go
+++ b/test/gc.go
@@ -1,9 +1,11 @@
-// $G $F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Simple test of the garbage collector.
+
package main
import "runtime"
diff --git a/test/gc1.go b/test/gc1.go
index 84034e7ce..6049ea14e 100644
--- a/test/gc1.go
+++ b/test/gc1.go
@@ -1,9 +1,11 @@
-// $G $F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// A simple test of the garbage collector.
+
package main
func main() {
diff --git a/test/gc2.go b/test/gc2.go
index c54d807df..de52a4fbf 100644
--- a/test/gc2.go
+++ b/test/gc2.go
@@ -1,10 +1,10 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// Check that buffered channels are garbage collected properly.
+// Test that buffered channels are garbage collected properly.
// An interesting case because they have finalizers and used to
// have self loops that kept them from being collected.
// (Cyclic data with finalizers is never finalized, nor collected.)
@@ -19,7 +19,9 @@ import (
func main() {
const N = 10000
- st := runtime.MemStats
+ st := new(runtime.MemStats)
+ memstats := new(runtime.MemStats)
+ runtime.ReadMemStats(st)
for i := 0; i < N; i++ {
c := make(chan int, 10)
_ = c
@@ -33,8 +35,8 @@ func main() {
}
}
- runtime.UpdateMemStats()
- obj := runtime.MemStats.HeapObjects - st.HeapObjects
+ runtime.ReadMemStats(memstats)
+ obj := memstats.HeapObjects - st.HeapObjects
if obj > N/5 {
fmt.Println("too many objects left:", obj)
os.Exit(1)
diff --git a/test/golden.out b/test/golden.out
index e0b4cf6e2..764f56196 100644
--- a/test/golden.out
+++ b/test/golden.out
@@ -11,6 +11,8 @@
== dwarf/
+== safe/
+
== fixedbugs/
== bugs/
diff --git a/test/goprint.go b/test/goprint.go
index 53ed055a0..3fe08f307 100644
--- a/test/goprint.go
+++ b/test/goprint.go
@@ -4,6 +4,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test that println can be the target of a go statement.
+
package main
import "time"
diff --git a/test/goto.go b/test/goto.go
index 1fccb314c..ca477b3d0 100644
--- a/test/goto.go
+++ b/test/goto.go
@@ -1,9 +1,12 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Verify goto semantics.
+// Does not compile.
+//
// Each test is in a separate function just so that if the
// compiler stops processing after one error, we don't
// lose other ones.
diff --git a/test/hashmap.go b/test/hashmap.go
deleted file mode 100644
index 0a4d7ab61..000000000
--- a/test/hashmap.go
+++ /dev/null
@@ -1,181 +0,0 @@
-// $G $F.go && $L $F.$A && ./$A.out
-
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package main
-
-// ----------------------------------------------------------------------------
-// Helper functions
-
-func ASSERT(p bool) {
- if !p {
- // panic 0
- }
-}
-
-
-// ----------------------------------------------------------------------------
-// Implementation of the HashMap
-
-type KeyType interface {
- Hash() uint32
- Match(other KeyType) bool
-}
-
-
-type ValueType interface {
- // empty interface
-}
-
-
-type Entry struct {
- key KeyType
- value ValueType
-}
-
-
-type Array [1024]Entry
-
-type HashMap struct {
- map_ *Array
- log2_capacity_ uint32
- occupancy_ uint32
-}
-
-
-func (m *HashMap) capacity() uint32 {
- return 1 << m.log2_capacity_
-}
-
-
-func (m *HashMap) Clear() {
- // Mark all entries as empty.
- var i uint32 = m.capacity() - 1
- for i > 0 {
- m.map_[i].key = nil
- i = i - 1
- }
- m.occupancy_ = 0
-}
-
-
-func (m *HashMap) Initialize (initial_log2_capacity uint32) {
- m.log2_capacity_ = initial_log2_capacity
- m.map_ = new(Array)
- m.Clear()
-}
-
-
-func (m *HashMap) Probe (key KeyType) *Entry {
- ASSERT(key != nil)
-
- var i uint32 = key.Hash() % m.capacity()
- ASSERT(0 <= i && i < m.capacity())
-
- ASSERT(m.occupancy_ < m.capacity()) // guarantees loop termination
- for m.map_[i].key != nil && !m.map_[i].key.Match(key) {
- i++
- if i >= m.capacity() {
- i = 0
- }
- }
-
- return &m.map_[i]
-}
-
-
-func (m *HashMap) Lookup (key KeyType, insert bool) *Entry {
- // Find a matching entry.
- var p *Entry = m.Probe(key)
- if p.key != nil {
- return p
- }
-
- // No entry found; insert one if necessary.
- if insert {
- p.key = key
- p.value = nil
- m.occupancy_++
-
- // Grow the map if we reached >= 80% occupancy.
- if m.occupancy_ + m.occupancy_/4 >= m.capacity() {
- m.Resize()
- p = m.Probe(key)
- }
-
- return p
- }
-
- // No entry found and none inserted.
- return nil
-}
-
-
-func (m *HashMap) Resize() {
- var hmap *Array = m.map_
- var n uint32 = m.occupancy_
-
- // Allocate a new map of twice the current size.
- m.Initialize(m.log2_capacity_ << 1)
-
- // Rehash all current entries.
- var i uint32 = 0
- for n > 0 {
- if hmap[i].key != nil {
- m.Lookup(hmap[i].key, true).value = hmap[i].value
- n = n - 1
- }
- i++
- }
-}
-
-
-// ----------------------------------------------------------------------------
-// Test code
-
-type Number struct {
- x uint32
-}
-
-
-func (n *Number) Hash() uint32 {
- return n.x * 23
-}
-
-
-func (n *Number) Match(other KeyType) bool {
- // var y *Number = other
- // return n.x == y.x
- return false
-}
-
-
-func MakeNumber (x uint32) *Number {
- var n *Number = new(Number)
- n.x = x
- return n
-}
-
-
-func main() {
- // func (n int) int { return n + 1; }(1)
-
- //print "HashMap - gri 2/8/2008\n"
-
- var hmap *HashMap = new(HashMap)
- hmap.Initialize(0)
-
- var x1 *Number = MakeNumber(1001)
- var x2 *Number = MakeNumber(2002)
- var x3 *Number = MakeNumber(3003)
- _, _, _ = x1, x2, x3
-
- // this doesn't work I think...
- //hmap.Lookup(x1, true)
- //hmap.Lookup(x2, true)
- //hmap.Lookup(x3, true)
-
- //print "done\n"
-}
diff --git a/test/if.go b/test/if.go
index 18a6715d7..13955781f 100644
--- a/test/if.go
+++ b/test/if.go
@@ -1,4 +1,4 @@
-// $G $F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/import.go b/test/import.go
index bd83dc3bd..a02a4ad8a 100644
--- a/test/import.go
+++ b/test/import.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/import1.go b/test/import1.go
index ebd704ef9..f5b8926a7 100644
--- a/test/import1.go
+++ b/test/import1.go
@@ -1,4 +1,4 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/bug036.go b/test/import5.go
index cc20516ce..acd03c9ce 100644
--- a/test/fixedbugs/bug036.go
+++ b/test/import5.go
@@ -1,13 +1,11 @@
-// ! $G $D/$F.go >/dev/null
-// # ignoring error messages...
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// import paths are slash-separated; reject backslash
+
package main
-func main() {
- s := float(0);
- s := float(0); // BUG redeclaration
-}
+import `net\http` // ERROR "backslash"
diff --git a/test/indirect.go b/test/indirect.go
index cfddde9ce..df8d3c736 100644
--- a/test/indirect.go
+++ b/test/indirect.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG indirect
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/indirect1.go b/test/indirect1.go
index ecb4f138a..e49eeb065 100644
--- a/test/indirect1.go
+++ b/test/indirect1.go
@@ -1,4 +1,4 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/init.go b/test/init.go
index 74c2d5c26..0146f4b3e 100644
--- a/test/init.go
+++ b/test/init.go
@@ -1,4 +1,4 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/init1.go b/test/init1.go
index 9ce3c12ee..a888ad744 100644
--- a/test/init1.go
+++ b/test/init1.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
@@ -16,10 +16,11 @@ func init() {
c := make(chan int)
go send(c)
<-c
-
- const chunk = 1<<20
- runtime.UpdateMemStats()
- sys := runtime.MemStats.Sys
+
+ const chunk = 1 << 20
+ memstats := new(runtime.MemStats)
+ runtime.ReadMemStats(memstats)
+ sys := memstats.Sys
b := make([]byte, chunk)
for i := range b {
b[i] = byte(i%10 + '0')
@@ -28,8 +29,8 @@ func init() {
for i := 0; i < 1000; i++ {
x = []byte(s)
}
- runtime.UpdateMemStats()
- sys1 := runtime.MemStats.Sys
+ runtime.ReadMemStats(memstats)
+ sys1 := memstats.Sys
if sys1-sys > chunk*50 {
println("allocated 1000 chunks of", chunk, "and used ", sys1-sys, "memory")
}
@@ -41,4 +42,3 @@ func send(c chan int) {
func main() {
}
-
diff --git a/test/initcomma.go b/test/initcomma.go
index 195d4575f..a54fce428 100644
--- a/test/initcomma.go
+++ b/test/initcomma.go
@@ -1,15 +1,17 @@
-// $G $F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test trailing commas. DO NOT gofmt THIS FILE.
+
package main
-var a = []int{1, 2}
-var b = [5]int{1, 2, 3}
-var c = []int{1}
-var d = [...]int{1, 2, 3}
+var a = []int{1, 2, }
+var b = [5]int{1, 2, 3, }
+var c = []int{1, }
+var d = [...]int{1, 2, 3, }
func main() {
if len(a) != 2 {
diff --git a/test/initialize.go b/test/initialize.go
index 6dd7d67dc..5bab5a708 100644
--- a/test/initialize.go
+++ b/test/initialize.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/initializerr.go b/test/initializerr.go
index e7f8b0e92..c2703e3eb 100644
--- a/test/initializerr.go
+++ b/test/initializerr.go
@@ -1,4 +1,4 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/initsyscall.go b/test/initsyscall.go
deleted file mode 100644
index d0c26d2a8..000000000
--- a/test/initsyscall.go
+++ /dev/null
@@ -1,26 +0,0 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
-
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This used to crash because the scheduler
-// tried to kick off a new scheduling thread for f
-// when time.Nanoseconds went into the system call.
-// It's not okay to schedule new goroutines
-// until main has started.
-
-package main
-
-import "time"
-
-func f() {
-}
-
-func init() {
- go f()
- time.Now()
-}
-
-func main() {
-}
diff --git a/test/int_lit.go b/test/int_lit.go
index 2644e17b5..a109fa957 100644
--- a/test/int_lit.go
+++ b/test/int_lit.go
@@ -1,4 +1,4 @@
-// $G $F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/intcvt.go b/test/intcvt.go
index 407bcfd9b..81b04effd 100644
--- a/test/intcvt.go
+++ b/test/intcvt.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/interface/bigdata.go b/test/interface/bigdata.go
index 44f6ab127..0f2e9a990 100644
--- a/test/interface/bigdata.go
+++ b/test/interface/bigdata.go
@@ -1,11 +1,10 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// check that big vs small, pointer vs not
-// interface methods work.
+// Test big vs. small, pointer vs. value interface methods.
package main
diff --git a/test/interface/convert.go b/test/interface/convert.go
index 7f429f703..eb6fd1d55 100644
--- a/test/interface/convert.go
+++ b/test/interface/convert.go
@@ -1,11 +1,10 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// Check uses of all the different interface
-// conversion runtime functions.
+// Test all the different interface conversion runtime functions.
package main
diff --git a/test/interface/convert1.go b/test/interface/convert1.go
index 658b1a92f..4a3ec8a37 100644
--- a/test/interface/convert1.go
+++ b/test/interface/convert1.go
@@ -1,11 +1,10 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// Check that static interface conversion of
-// interface value nil succeeds.
+// Test static interface conversion of interface value nil.
package main
diff --git a/test/interface/convert2.go b/test/interface/convert2.go
index 658b1a92f..4a3ec8a37 100644
--- a/test/interface/convert2.go
+++ b/test/interface/convert2.go
@@ -1,11 +1,10 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// Check that static interface conversion of
-// interface value nil succeeds.
+// Test static interface conversion of interface value nil.
package main
diff --git a/test/interface/embed.go b/test/interface/embed.go
index 2fddee190..5c52ac023 100644
--- a/test/interface/embed.go
+++ b/test/interface/embed.go
@@ -1,10 +1,10 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// Check methods derived from embedded interface values.
+// Test methods derived from embedded interface values.
package main
diff --git a/test/interface/embed0.go b/test/interface/embed0.go
index bbd81e760..dee8319e4 100644
--- a/test/interface/embed0.go
+++ b/test/interface/embed0.go
@@ -4,7 +4,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// Check that embedded interface types can have local methods.
+// Test that embedded interface types can have local methods.
package p
diff --git a/test/interface/embed1.go b/test/interface/embed1.go
index 24e50471f..ee502a162 100644
--- a/test/interface/embed1.go
+++ b/test/interface/embed1.go
@@ -4,7 +4,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// Check that embedded interface types can have local methods.
+// Test that embedded interface types can have local methods.
package main
diff --git a/test/interface/embed2.go b/test/interface/embed2.go
index c18a1fece..1636db78e 100644
--- a/test/interface/embed2.go
+++ b/test/interface/embed2.go
@@ -1,10 +1,10 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// Check methods derived from embedded interface and *interface values.
+// Test methods derived from embedded interface and *interface values.
package main
diff --git a/test/interface/explicit.go b/test/interface/explicit.go
index daae59b36..d19480a68 100644
--- a/test/interface/explicit.go
+++ b/test/interface/explicit.go
@@ -1,10 +1,11 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// Static error messages about interface conversions.
+// Verify compiler messages about erroneous static interface conversions.
+// Does not compile.
package main
diff --git a/test/interface/fail.go b/test/interface/fail.go
index 0c20bcf75..72b854dc0 100644
--- a/test/interface/fail.go
+++ b/test/interface/fail.go
@@ -1,10 +1,10 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// Check that interface conversion fails when method is missing.
+// Test that interface conversion fails when method is missing.
package main
diff --git a/test/interface/fake.go b/test/interface/fake.go
index ddb832542..861a64084 100644
--- a/test/interface/fake.go
+++ b/test/interface/fake.go
@@ -1,10 +1,10 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// Interface comparisons using types hidden
+// Test interface comparisons using types hidden
// inside reflected-on structs.
package main
diff --git a/test/interface/noeq.go b/test/interface/noeq.go
index 3c2ea5975..1c5166ede 100644
--- a/test/interface/noeq.go
+++ b/test/interface/noeq.go
@@ -1,10 +1,11 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG: interface/noeq
+// run
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// Interface values containing types that cannot be compared for equality.
+// Test run-time error detection for interface values containing types
+// that cannot be compared for equality.
package main
diff --git a/test/interface/pointer.go b/test/interface/pointer.go
index f1e363cbf..292705066 100644
--- a/test/interface/pointer.go
+++ b/test/interface/pointer.go
@@ -1,10 +1,11 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// Check that interface{M()} = *interface{M()} produces a compiler error.
+// Test that interface{M()} = *interface{M()} produces a compiler error.
+// Does not compile.
package main
diff --git a/test/interface/private.go b/test/interface/private.go
index 37890c923..14dfc1ae5 100644
--- a/test/interface/private.go
+++ b/test/interface/private.go
@@ -4,6 +4,9 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test that unexported methods are not visible outside the package.
+// Does not compile.
+
package main
import "./private1"
diff --git a/test/interface/private1.go b/test/interface/private1.go
index 3173fbef4..9c831a2f4 100644
--- a/test/interface/private1.go
+++ b/test/interface/private1.go
@@ -4,6 +4,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Imported by private.go, which should not be able to see the private method.
+
package p
type Exported interface {
diff --git a/test/interface/receiver.go b/test/interface/receiver.go
index f53daf8da..4511ab3b4 100644
--- a/test/interface/receiver.go
+++ b/test/interface/receiver.go
@@ -1,11 +1,11 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// Implicit methods for embedded types.
-// Mixed pointer and non-pointer receivers.
+// Test Implicit methods for embedded types and
+// mixed pointer and non-pointer receivers.
package main
diff --git a/test/interface/receiver1.go b/test/interface/receiver1.go
index 51312d000..2b7ccdc1a 100644
--- a/test/interface/receiver1.go
+++ b/test/interface/receiver1.go
@@ -1,10 +1,11 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// Error messages about missing implicit methods.
+// Verify compiler complains about missing implicit methods.
+// Does not compile.
package main
diff --git a/test/interface/recursive.go b/test/interface/recursive.go
index 1eb56e976..fcc88331e 100644
--- a/test/interface/recursive.go
+++ b/test/interface/recursive.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo BUG: should compile
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
@@ -6,7 +6,7 @@
// Check mutually recursive interfaces
-package main
+package recursive
type I1 interface {
foo() I2
diff --git a/test/interface/recursive1.go b/test/interface/recursive1.go
index 2c93a2836..524dda82c 100644
--- a/test/interface/recursive1.go
+++ b/test/interface/recursive1.go
@@ -4,6 +4,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Mutually recursive type definitions imported and used by recursive1.go.
+
package p
type I1 interface {
diff --git a/test/interface/recursive2.go b/test/interface/recursive2.go
index a7f9ab5db..5129ceb02 100644
--- a/test/interface/recursive2.go
+++ b/test/interface/recursive2.go
@@ -4,7 +4,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// Check that the mutually recursive types in recursive1.go made it
+// Test that the mutually recursive types in recursive1.go made it
// intact and with the same meaning, by assigning to or using them.
package main
diff --git a/test/interface/returntype.go b/test/interface/returntype.go
index 5cf083617..4d86f3918 100644
--- a/test/interface/returntype.go
+++ b/test/interface/returntype.go
@@ -1,10 +1,10 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// Check methods with different return types.
+// Test interface methods with different return types are distinct.
package main
diff --git a/test/interface/struct.go b/test/interface/struct.go
index 40b7f4f91..f60819ca8 100644
--- a/test/interface/struct.go
+++ b/test/interface/struct.go
@@ -1,10 +1,10 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG interface6
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// Interface values containing structures.
+// Test interface values containing structures.
package main
diff --git a/test/iota.go b/test/iota.go
index c40ca1f38..7e9e35279 100644
--- a/test/iota.go
+++ b/test/iota.go
@@ -1,4 +1,4 @@
-// $G $F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/ken/array.go b/test/ken/array.go
index 40209f5da..53f6fc88e 100644
--- a/test/ken/array.go
+++ b/test/ken/array.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
@@ -68,6 +68,9 @@ func testpdpd() {
a = a[5:25]
res(sumpd(a), 5, 25)
+
+ a = a[30:95]
+ res(sumpd(a), 35, 100)
}
// call ptr fixed with ptr fixed
diff --git a/test/ken/chan.go b/test/ken/chan.go
index ef75b044d..3bfa5b2d2 100644
--- a/test/ken/chan.go
+++ b/test/ken/chan.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/ken/chan1.go b/test/ken/chan1.go
index e5fc033f3..ccb261995 100644
--- a/test/ken/chan1.go
+++ b/test/ken/chan1.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/ken/complit.go b/test/ken/complit.go
index da0a84a04..cab3bca38 100644
--- a/test/ken/complit.go
+++ b/test/ken/complit.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/ken/convert.go b/test/ken/convert.go
index 3780ec886..83e573a3f 100644
--- a/test/ken/convert.go
+++ b/test/ken/convert.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/ken/cplx1.go b/test/ken/cplx1.go
index 8ec7d40f5..9421c53e1 100644
--- a/test/ken/cplx1.go
+++ b/test/ken/cplx1.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/ken/cplx2.go b/test/ken/cplx2.go
index 89f4a0418..a3c1570ba 100644
--- a/test/ken/cplx2.go
+++ b/test/ken/cplx2.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/ken/cplx3.go b/test/ken/cplx3.go
index 048c93eef..092354983 100644
--- a/test/ken/cplx3.go
+++ b/test/ken/cplx3.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/ken/cplx4.go b/test/ken/cplx4.go
index 738afcd2c..8104ff14d 100644
--- a/test/ken/cplx4.go
+++ b/test/ken/cplx4.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/ken/cplx5.go b/test/ken/cplx5.go
index e6696674b..0e2c88221 100644
--- a/test/ken/cplx5.go
+++ b/test/ken/cplx5.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/ken/divconst.go b/test/ken/divconst.go
index 5a64d16b4..46786fb67 100644
--- a/test/ken/divconst.go
+++ b/test/ken/divconst.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/ken/divmod.go b/test/ken/divmod.go
index dc44ea245..02c762dd0 100644
--- a/test/ken/divmod.go
+++ b/test/ken/divmod.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/ken/embed.go b/test/ken/embed.go
index 9805e479b..a3e1980e8 100644
--- a/test/ken/embed.go
+++ b/test/ken/embed.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/ken/for.go b/test/ken/for.go
index 176ecd749..914229b58 100644
--- a/test/ken/for.go
+++ b/test/ken/for.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/ken/interbasic.go b/test/ken/interbasic.go
index 9bb50886a..113fe3c9b 100644
--- a/test/ken/interbasic.go
+++ b/test/ken/interbasic.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/ken/interfun.go b/test/ken/interfun.go
index 94bc7eaad..ca875e837 100644
--- a/test/ken/interfun.go
+++ b/test/ken/interfun.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/ken/intervar.go b/test/ken/intervar.go
index 73d1b0660..30815d06b 100644
--- a/test/ken/intervar.go
+++ b/test/ken/intervar.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/ken/label.go b/test/ken/label.go
index 7a509f048..b8867a7d1 100644
--- a/test/ken/label.go
+++ b/test/ken/label.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/ken/litfun.go b/test/ken/litfun.go
index bac2bc17c..4c40ee24c 100644
--- a/test/ken/litfun.go
+++ b/test/ken/litfun.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/ken/mfunc.go b/test/ken/mfunc.go
index ae0bc0c58..2213b8132 100644
--- a/test/ken/mfunc.go
+++ b/test/ken/mfunc.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/ken/modconst.go b/test/ken/modconst.go
index c2603a0a0..3905b8123 100644
--- a/test/ken/modconst.go
+++ b/test/ken/modconst.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/ken/ptrfun.go b/test/ken/ptrfun.go
index 6739ba33a..b11593156 100644
--- a/test/ken/ptrfun.go
+++ b/test/ken/ptrfun.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/ken/ptrvar.go b/test/ken/ptrvar.go
index e2ddde629..c6b4656fc 100644
--- a/test/ken/ptrvar.go
+++ b/test/ken/ptrvar.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/ken/range.go b/test/ken/range.go
index 9535fd497..07d0e9a67 100644
--- a/test/ken/range.go
+++ b/test/ken/range.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/ken/rob1.go b/test/ken/rob1.go
index a5854b93e..35720c928 100644
--- a/test/ken/rob1.go
+++ b/test/ken/rob1.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/ken/rob2.go b/test/ken/rob2.go
index d13e2441d..bd8a43515 100644
--- a/test/ken/rob2.go
+++ b/test/ken/rob2.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/ken/robfor.go b/test/ken/robfor.go
index 05188a472..958efca3a 100644
--- a/test/ken/robfor.go
+++ b/test/ken/robfor.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/ken/robfunc.go b/test/ken/robfunc.go
index 6b3d4b2e4..40c5b9042 100644
--- a/test/ken/robfunc.go
+++ b/test/ken/robfunc.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/ken/shift.go b/test/ken/shift.go
index 157a07aec..c60143d70 100644
--- a/test/ken/shift.go
+++ b/test/ken/shift.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/ken/simparray.go b/test/ken/simparray.go
index 1b6f245ee..553bc4d68 100644
--- a/test/ken/simparray.go
+++ b/test/ken/simparray.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/ken/simpbool.go b/test/ken/simpbool.go
index dbd9c8d8b..4a8324ccb 100644
--- a/test/ken/simpbool.go
+++ b/test/ken/simpbool.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/ken/simpconv.go b/test/ken/simpconv.go
index feb85d299..9dc7ebf93 100644
--- a/test/ken/simpconv.go
+++ b/test/ken/simpconv.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/ken/simpfun.go b/test/ken/simpfun.go
index ba9ce6f7b..b2c803e89 100644
--- a/test/ken/simpfun.go
+++ b/test/ken/simpfun.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/ken/simpswitch.go b/test/ken/simpswitch.go
index 710af2e08..cc5f281fc 100644
--- a/test/ken/simpswitch.go
+++ b/test/ken/simpswitch.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/ken/simpvar.go b/test/ken/simpvar.go
index fd060b0e2..324008d23 100644
--- a/test/ken/simpvar.go
+++ b/test/ken/simpvar.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/ken/slicearray.go b/test/ken/slicearray.go
index 5c31270fc..e0f2d322b 100644
--- a/test/ken/slicearray.go
+++ b/test/ken/slicearray.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/ken/sliceslice.go b/test/ken/sliceslice.go
index 639042128..ed1a5fe5a 100644
--- a/test/ken/sliceslice.go
+++ b/test/ken/sliceslice.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/ken/strvar.go b/test/ken/strvar.go
index dfaaf1213..34b2621b1 100644
--- a/test/ken/strvar.go
+++ b/test/ken/strvar.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/label.go b/test/label.go
index e3d853266..8f2df4ccb 100644
--- a/test/label.go
+++ b/test/label.go
@@ -1,4 +1,4 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/label1.go b/test/label1.go
index 656daaeea..8a192c291 100644
--- a/test/label1.go
+++ b/test/label1.go
@@ -1,4 +1,4 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/linkx.go b/test/linkx.go
new file mode 100644
index 000000000..caa815a39
--- /dev/null
+++ b/test/linkx.go
@@ -0,0 +1,15 @@
+// $G $D/$F.go && $L -X main.tbd hello $F.$A && ./$A.out
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+var tbd string
+
+func main() {
+ if tbd != "hello" {
+ println("BUG: test/linkx", len(tbd), tbd)
+ }
+}
diff --git a/test/literal.go b/test/literal.go
index bf0538812..396d75c01 100644
--- a/test/literal.go
+++ b/test/literal.go
@@ -1,4 +1,4 @@
-// $G $F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/malloc1.go b/test/malloc1.go
deleted file mode 100644
index 61f1797c7..000000000
--- a/test/malloc1.go
+++ /dev/null
@@ -1,25 +0,0 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
-
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// trivial malloc test
-
-package main
-
-import (
- "flag"
- "fmt"
- "runtime"
-)
-
-var chatty = flag.Bool("v", false, "chatty")
-
-func main() {
- runtime.Free(runtime.Alloc(1))
- runtime.UpdateMemStats()
- if *chatty {
- fmt.Printf("%+v %v\n", runtime.MemStats, uint64(0))
- }
-}
diff --git a/test/mallocfin.go b/test/mallocfin.go
index ff6239247..2f9f8386d 100644
--- a/test/mallocfin.go
+++ b/test/mallocfin.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/mallocrand.go b/test/mallocrand.go
deleted file mode 100644
index 726e36799..000000000
--- a/test/mallocrand.go
+++ /dev/null
@@ -1,92 +0,0 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
-
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Random malloc test.
-
-package main
-
-import (
- "flag"
- "math/rand"
- "runtime"
- "unsafe"
-)
-
-var chatty = flag.Bool("v", false, "chatty")
-
-var footprint uint64
-var allocated uint64
-
-func bigger() {
- runtime.UpdateMemStats()
- if f := runtime.MemStats.Sys; footprint < f {
- footprint = f
- if *chatty {
- println("Footprint", footprint, " for ", allocated)
- }
- if footprint > 1e9 {
- println("too big")
- panic("fail")
- }
- }
-}
-
-// Prime the data structures by allocating one of
-// each block in order. After this, there should be
-// little reason to ask for more memory from the OS.
-func prime() {
- for i := 0; i < 16; i++ {
- b := runtime.Alloc(1 << uint(i))
- runtime.Free(b)
- }
- for i := uintptr(0); i < 256; i++ {
- b := runtime.Alloc(i << 12)
- runtime.Free(b)
- }
-}
-
-func memset(b *byte, c byte, n uintptr) {
- np := uintptr(n)
- for i := uintptr(0); i < np; i++ {
- *(*byte)(unsafe.Pointer(uintptr(unsafe.Pointer(b)) + i)) = c
- }
-}
-
-func main() {
- flag.Parse()
- // prime()
- var blocks [1]struct {
- base *byte
- siz uintptr
- }
- for i := 0; i < 1<<10; i++ {
- if i%(1<<10) == 0 && *chatty {
- println(i)
- }
- b := rand.Int() % len(blocks)
- if blocks[b].base != nil {
- // println("Free", blocks[b].siz, blocks[b].base)
- runtime.Free(blocks[b].base)
- blocks[b].base = nil
- allocated -= uint64(blocks[b].siz)
- continue
- }
- siz := uintptr(rand.Int() >> (11 + rand.Uint32()%20))
- base := runtime.Alloc(siz)
- // ptr := uintptr(syscall.BytePtr(base))+uintptr(siz/2)
- // obj, size, ref, ok := allocator.find(ptr)
- // if obj != base || *ref != 0 || !ok {
- // println("find", siz, obj, ref, ok)
- // panic("fail")
- // }
- blocks[b].base = base
- blocks[b].siz = siz
- allocated += uint64(siz)
- // println("Alloc", siz, base)
- memset(base, 0xbb, siz)
- bigger()
- }
-}
diff --git a/test/mallocrep.go b/test/mallocrep.go
deleted file mode 100644
index cffcd1638..000000000
--- a/test/mallocrep.go
+++ /dev/null
@@ -1,70 +0,0 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
-
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Repeated malloc test.
-
-package main
-
-import (
- "flag"
- "runtime"
-)
-
-var chatty = flag.Bool("v", false, "chatty")
-
-var oldsys uint64
-
-func bigger() {
- runtime.UpdateMemStats()
- if st := runtime.MemStats; oldsys < st.Sys {
- oldsys = st.Sys
- if *chatty {
- println(st.Sys, " system bytes for ", st.Alloc, " Go bytes")
- }
- if st.Sys > 1e9 {
- println("too big")
- panic("fail")
- }
- }
-}
-
-func main() {
- runtime.GC() // clean up garbage from init
- runtime.UpdateMemStats() // first call can do some allocations
- runtime.MemProfileRate = 0 // disable profiler
- runtime.MemStats.Alloc = 0 // ignore stacks
- flag.Parse()
- for i := 0; i < 1<<7; i++ {
- for j := 1; j <= 1<<22; j <<= 1 {
- if i == 0 && *chatty {
- println("First alloc:", j)
- }
- if a := runtime.MemStats.Alloc; a != 0 {
- println("no allocations but stats report", a, "bytes allocated")
- panic("fail")
- }
- b := runtime.Alloc(uintptr(j))
- runtime.UpdateMemStats()
- during := runtime.MemStats.Alloc
- runtime.Free(b)
- runtime.UpdateMemStats()
- if a := runtime.MemStats.Alloc; a != 0 {
- println("allocated ", j, ": wrong stats: during=", during, " after=", a, " (want 0)")
- panic("fail")
- }
- bigger()
- }
- if i%(1<<10) == 0 && *chatty {
- println(i)
- }
- if i == 0 {
- if *chatty {
- println("Primed", i)
- }
- // runtime.frozen = true
- }
- }
-}
diff --git a/test/mallocrep1.go b/test/mallocrep1.go
deleted file mode 100644
index 0b1479900..000000000
--- a/test/mallocrep1.go
+++ /dev/null
@@ -1,143 +0,0 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
-
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Repeated malloc test.
-
-package main
-
-import (
- "flag"
- "fmt"
- "runtime"
- "strconv"
-)
-
-var chatty = flag.Bool("v", false, "chatty")
-var reverse = flag.Bool("r", false, "reverse")
-var longtest = flag.Bool("l", false, "long test")
-
-var b []*byte
-var stats = &runtime.MemStats
-
-func OkAmount(size, n uintptr) bool {
- if n < size {
- return false
- }
- if size < 16*8 {
- if n > size+16 {
- return false
- }
- } else {
- if n > size*9/8 {
- return false
- }
- }
- return true
-}
-
-func AllocAndFree(size, count int) {
- if *chatty {
- fmt.Printf("size=%d count=%d ...\n", size, count)
- }
- runtime.UpdateMemStats()
- n1 := stats.Alloc
- for i := 0; i < count; i++ {
- b[i] = runtime.Alloc(uintptr(size))
- base, n := runtime.Lookup(b[i])
- if base != b[i] || !OkAmount(uintptr(size), n) {
- println("lookup failed: got", base, n, "for", b[i])
- panic("fail")
- }
- runtime.UpdateMemStats()
- if stats.Sys > 1e9 {
- println("too much memory allocated")
- panic("fail")
- }
- }
- runtime.UpdateMemStats()
- n2 := stats.Alloc
- if *chatty {
- fmt.Printf("size=%d count=%d stats=%+v\n", size, count, *stats)
- }
- n3 := stats.Alloc
- for j := 0; j < count; j++ {
- i := j
- if *reverse {
- i = count - 1 - j
- }
- alloc := uintptr(stats.Alloc)
- base, n := runtime.Lookup(b[i])
- if base != b[i] || !OkAmount(uintptr(size), n) {
- println("lookup failed: got", base, n, "for", b[i])
- panic("fail")
- }
- runtime.Free(b[i])
- runtime.UpdateMemStats()
- if stats.Alloc != uint64(alloc-n) {
- println("free alloc got", stats.Alloc, "expected", alloc-n, "after free of", n)
- panic("fail")
- }
- if runtime.MemStats.Sys > 1e9 {
- println("too much memory allocated")
- panic("fail")
- }
- }
- runtime.UpdateMemStats()
- n4 := stats.Alloc
-
- if *chatty {
- fmt.Printf("size=%d count=%d stats=%+v\n", size, count, *stats)
- }
- if n2-n1 != n3-n4 {
- println("wrong alloc count: ", n2-n1, n3-n4)
- panic("fail")
- }
-}
-
-func atoi(s string) int {
- i, _ := strconv.Atoi(s)
- return i
-}
-
-func main() {
- runtime.MemProfileRate = 0 // disable profiler
- flag.Parse()
- b = make([]*byte, 10000)
- if flag.NArg() > 0 {
- AllocAndFree(atoi(flag.Arg(0)), atoi(flag.Arg(1)))
- return
- }
- maxb := 1 << 22
- if !*longtest {
- maxb = 1 << 19
- }
- for j := 1; j <= maxb; j <<= 1 {
- n := len(b)
- max := uintptr(1 << 28)
- if !*longtest {
- max = uintptr(maxb)
- }
- if uintptr(j)*uintptr(n) > max {
- n = int(max / uintptr(j))
- }
- if n < 10 {
- n = 10
- }
- for m := 1; m <= n; {
- AllocAndFree(j, m)
- if m == n {
- break
- }
- m = 5 * m / 4
- if m < 4 {
- m++
- }
- if m > n {
- m = n
- }
- }
- }
-}
diff --git a/test/map.go b/test/map.go
index 1c6698629..c7f1d05a9 100644
--- a/test/map.go
+++ b/test/map.go
@@ -1,4 +1,4 @@
-// $G $F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
@@ -10,6 +10,7 @@ import (
"fmt"
"math"
"strconv"
+ "time"
)
const count = 100
@@ -27,6 +28,12 @@ func P(a []string) string {
}
func main() {
+ testbasic()
+ testfloat()
+ testnan()
+}
+
+func testbasic() {
// Test a map literal.
mlit := map[string]int{"0": 0, "1": 1, "2": 2, "3": 3, "4": 4}
for i := 0; i < len(mlit); i++ {
@@ -480,7 +487,7 @@ func main() {
mipM[i][i]++
if mipM[i][i] != (i+1)+1 {
- fmt.Printf("update mipM[%d][%d] = %i\n", i, i, mipM[i][i])
+ fmt.Printf("update mipM[%d][%d] = %d\n", i, i, mipM[i][i])
}
}
@@ -489,8 +496,6 @@ func main() {
for _, _ = range mnil {
panic("range mnil")
}
-
- testfloat()
}
func testfloat() {
@@ -646,3 +651,41 @@ func testfloat() {
}
}
}
+
+func testnan() {
+ // Test that NaNs in maps don't go quadratic.
+ t := func(n int) time.Duration {
+ t0 := time.Now()
+ m := map[float64]int{}
+ nan := math.NaN()
+ for i := 0; i < n; i++ {
+ m[nan] = 1
+ }
+ if len(m) != n {
+ panic("wrong size map after nan insertion")
+ }
+ return time.Since(t0)
+ }
+
+ // Depending on the machine and OS, this test might be too fast
+ // to measure with accurate enough granularity. On failure,
+ // make it run longer, hoping that the timing granularity
+ // is eventually sufficient.
+
+ n := 30000 // 0.02 seconds on a MacBook Air
+ fails := 0
+ for {
+ t1 := t(n)
+ t2 := t(2 * n)
+ // should be 2x (linear); allow up to 3x
+ if t2 < 3*t1 {
+ return
+ }
+ fails++
+ if fails == 4 {
+ fmt.Printf("too slow: %d inserts: %v; %d inserts: %v\n", n, t1, 2*n, t2)
+ return
+ }
+ n *= 2
+ }
+}
diff --git a/test/map1.go b/test/map1.go
index 6af10565c..44708c11b 100644
--- a/test/map1.go
+++ b/test/map1.go
@@ -1,4 +1,4 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/method.go b/test/method.go
index b5a02c687..40b42ac7a 100644
--- a/test/method.go
+++ b/test/method.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/method1.go b/test/method1.go
index ec14ef9e4..bbbdbfa1c 100644
--- a/test/method1.go
+++ b/test/method1.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/method2.go b/test/method2.go
index 039779efb..7db1c3abb 100644
--- a/test/method2.go
+++ b/test/method2.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/method3.go b/test/method3.go
index 7946a8750..5711ffd94 100644
--- a/test/method3.go
+++ b/test/method3.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG method3
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/method4.go b/test/method4.go
new file mode 100644
index 000000000..77e409b91
--- /dev/null
+++ b/test/method4.go
@@ -0,0 +1,106 @@
+// $G $D/method4a.go && $G $D/$F.go && $L $F.$A && ./$A.out
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Test method expressions with arguments.
+
+package main
+
+import "./method4a"
+
+type T1 int
+
+type T2 struct {
+ f int
+}
+
+type I1 interface {
+ Sum([]int, int) int
+}
+
+type I2 interface {
+ Sum(a []int, b int) int
+}
+
+func (i T1) Sum(a []int, b int) int {
+ r := int(i) + b
+ for _, v := range a {
+ r += v
+ }
+ return r
+}
+
+func (p *T2) Sum(a []int, b int) int {
+ r := p.f + b
+ for _, v := range a {
+ r += v
+ }
+ return r
+}
+
+func eq(v1, v2 int) {
+ if v1 != v2 {
+ panic(0)
+ }
+}
+
+func main() {
+ a := []int{1, 2, 3}
+ t1 := T1(4)
+ t2 := &T2{4}
+
+ eq(t1.Sum(a, 5), 15)
+ eq(t2.Sum(a, 6), 16)
+
+ eq(T1.Sum(t1, a, 7), 17)
+ eq((*T2).Sum(t2, a, 8), 18)
+
+ f1 := T1.Sum
+ eq(f1(t1, a, 9), 19)
+ f2 := (*T2).Sum
+ eq(f2(t2, a, 10), 20)
+
+ eq(I1.Sum(t1, a, 11), 21)
+ eq(I1.Sum(t2, a, 12), 22)
+
+ f3 := I1.Sum
+ eq(f3(t1, a, 13), 23)
+ eq(f3(t2, a, 14), 24)
+
+ eq(I2.Sum(t1, a, 15), 25)
+ eq(I2.Sum(t2, a, 16), 26)
+
+ f4 := I2.Sum
+ eq(f4(t1, a, 17), 27)
+ eq(f4(t2, a, 18), 28)
+
+ mt1 := method4a.T1(4)
+ mt2 := &method4a.T2{4}
+
+ eq(mt1.Sum(a, 30), 40)
+ eq(mt2.Sum(a, 31), 41)
+
+ eq(method4a.T1.Sum(mt1, a, 32), 42)
+ eq((*method4a.T2).Sum(mt2, a, 33), 43)
+
+ g1 := method4a.T1.Sum
+ eq(g1(mt1, a, 34), 44)
+ g2 := (*method4a.T2).Sum
+ eq(g2(mt2, a, 35), 45)
+
+ eq(method4a.I1.Sum(mt1, a, 36), 46)
+ eq(method4a.I1.Sum(mt2, a, 37), 47)
+
+ g3 := method4a.I1.Sum
+ eq(g3(mt1, a, 38), 48)
+ eq(g3(mt2, a, 39), 49)
+
+ eq(method4a.I2.Sum(mt1, a, 40), 50)
+ eq(method4a.I2.Sum(mt2, a, 41), 51)
+
+ g4 := method4a.I2.Sum
+ eq(g4(mt1, a, 42), 52)
+ eq(g4(mt2, a, 43), 53)
+}
diff --git a/test/method4a.go b/test/method4a.go
new file mode 100644
index 000000000..11fa218f3
--- /dev/null
+++ b/test/method4a.go
@@ -0,0 +1,40 @@
+// true
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Test method expressions with arguments.
+// This file is not tested by itself; it is imported by method4.go.
+
+package method4a
+
+type T1 int
+
+type T2 struct {
+ F int
+}
+
+type I1 interface {
+ Sum([]int, int) int
+}
+
+type I2 interface {
+ Sum(a []int, b int) int
+}
+
+func (i T1) Sum(a []int, b int) int {
+ r := int(i) + b
+ for _, v := range a {
+ r += v
+ }
+ return r
+}
+
+func (p *T2) Sum(a []int, b int) int {
+ r := p.F + b
+ for _, v := range a {
+ r += v
+ }
+ return r
+}
diff --git a/test/named.go b/test/named.go
index 5b6bb81fe..d0330ab23 100644
--- a/test/named.go
+++ b/test/named.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/named1.go b/test/named1.go
index 499b77b96..5ff6930f7 100644
--- a/test/named1.go
+++ b/test/named1.go
@@ -1,4 +1,4 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
@@ -37,8 +37,8 @@ func main() {
asBool(true)
asBool(*&b)
asBool(Bool(true))
- asBool(1 != 2) // ERROR "cannot use.*type bool.*as type Bool"
- asBool(i < j) // ERROR "cannot use.*type bool.*as type Bool"
+ asBool(1 != 2) // ok now
+ asBool(i < j) // ok now
_, b = m[2] // ERROR "cannot .* bool.*type Bool"
diff --git a/test/nil.go b/test/nil.go
index efcf4f782..fd9382739 100644
--- a/test/nil.go
+++ b/test/nil.go
@@ -1,4 +1,4 @@
-// $G $F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/nilptr.go b/test/nilptr.go
index b0c1df2d9..1a489aae9 100644
--- a/test/nilptr.go
+++ b/test/nilptr.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/parentype.go b/test/parentype.go
index 1872cd0eb..d7c14f3a2 100644
--- a/test/parentype.go
+++ b/test/parentype.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/peano.go b/test/peano.go
index dd4c36e0b..2cc0ac280 100644
--- a/test/peano.go
+++ b/test/peano.go
@@ -1,4 +1,4 @@
-// $G $F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/range.go b/test/range.go
index 84119450b..7921e447e 100644
--- a/test/range.go
+++ b/test/range.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/recover.go b/test/recover.go
index ca6f07288..d32cfdf3d 100644
--- a/test/recover.go
+++ b/test/recover.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/recover1.go b/test/recover1.go
index db584738b..b763a1074 100644
--- a/test/recover1.go
+++ b/test/recover1.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/recover2.go b/test/recover2.go
index b5db6f0d1..946d05ae6 100644
--- a/test/recover2.go
+++ b/test/recover2.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/recover3.go b/test/recover3.go
index 60ade9b61..f87547fc3 100644
--- a/test/recover3.go
+++ b/test/recover3.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/rename.go b/test/rename.go
index f21ef015b..ab61c57f6 100644
--- a/test/rename.go
+++ b/test/rename.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/rename1.go b/test/rename1.go
index 3e78bfca0..765fba2ac 100644
--- a/test/rename1.go
+++ b/test/rename1.go
@@ -1,4 +1,4 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/reorder.go b/test/reorder.go
index 67d07523b..a98fd8cbf 100644
--- a/test/reorder.go
+++ b/test/reorder.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/reorder2.go b/test/reorder2.go
index 3e149853a..22fefde53 100644
--- a/test/reorder2.go
+++ b/test/reorder2.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/run b/test/run
index 03c91ee30..8acbc3d45 100755
--- a/test/run
+++ b/test/run
@@ -3,8 +3,8 @@
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-eval $(gomake --no-print-directory -f ../src/Make.inc go-env)
-
+eval $(go tool dist env)
+export GOARCH GOOS GOROOT
export E=
case X"$GOARCH" in
@@ -33,9 +33,12 @@ failed=0
PATH=${GOBIN:-$GOROOT/bin}:`pwd`:/bin:/usr/bin:/usr/local/bin
-RUNFILE="/tmp/gorun-$$-$USER"
-TMP1FILE="/tmp/gotest1-$$-$USER"
-TMP2FILE="/tmp/gotest2-$$-$USER"
+# TODO: We add the tool directory to the PATH to avoid thinking about a better way.
+PATH="$GOTOOLDIR:$PATH"
+
+RUNFILE="${TMPDIR:-/tmp}/gorun-$$-$USER"
+TMP1FILE="${TMPDIR:-/tmp}/gotest1-$$-$USER"
+TMP2FILE="${TMPDIR:-/tmp}/gotest2-$$-$USER"
# don't run the machine out of memory: limit individual processes to 4GB.
# on thresher, 3GB suffices to run the tests; with 2GB, peano fails.
@@ -53,7 +56,7 @@ filterout() {
grep '^'"$2"'$' $1 >/dev/null
}
-for dir in . ken chan interface syntax dwarf fixedbugs bugs
+for dir in . ken chan interface syntax dwarf safe fixedbugs bugs
do
echo
echo '==' $dir'/'
@@ -64,7 +67,8 @@ do
fi
export F=$(basename $i .go)
export D=$dir
- sed '/^\/\//!q' $i | sed 's@//@@; $d' |sed 's|./\$A.out|$E &|g' >"$RUNFILE"
+ echo '. ./testlib' >"$RUNFILE"
+ sed '/^\/\//!q' $i | sed 's@//@@; $d' |sed 's|./\$A.out|$E &|g' >>"$RUNFILE"
if ! { time -p bash -c "bash '$RUNFILE' >'$TMP1FILE' 2>&1" ; } 2>"$TMP2FILE"
then
echo
diff --git a/test/run.go b/test/run.go
new file mode 100644
index 000000000..67ff41371
--- /dev/null
+++ b/test/run.go
@@ -0,0 +1,454 @@
+// #ignore
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Run runs tests in the test directory.
+//
+// TODO(bradfitz): docs of some sort, once we figure out how we're changing
+// headers of files
+package main
+
+import (
+ "bytes"
+ "errors"
+ "flag"
+ "fmt"
+ "go/build"
+ "io/ioutil"
+ "log"
+ "os"
+ "os/exec"
+ "path/filepath"
+ "regexp"
+ "runtime"
+ "sort"
+ "strconv"
+ "strings"
+)
+
+var (
+ verbose = flag.Bool("v", false, "verbose. if set, parallelism is set to 1.")
+ numParallel = flag.Int("n", 8, "number of parallel tests to run")
+ summary = flag.Bool("summary", false, "show summary of results")
+)
+
+var (
+ // gc and ld are [568][gl].
+ gc, ld string
+
+ // letter is the build.ArchChar
+ letter string
+
+ // dirs are the directories to look for *.go files in.
+ // TODO(bradfitz): just use all directories?
+ dirs = []string{".", "ken", "chan", "interface", "syntax", "dwarf", "fixedbugs", "bugs"}
+
+ // ratec controls the max number of tests running at a time.
+ ratec chan bool
+
+ // toRun is the channel of tests to run.
+ // It is nil until the first test is started.
+ toRun chan *test
+)
+
+// maxTests is an upper bound on the total number of tests.
+// It is used as a channel buffer size to make sure sends don't block.
+const maxTests = 5000
+
+func main() {
+ flag.Parse()
+ if *verbose {
+ *numParallel = 1
+ }
+
+ ratec = make(chan bool, *numParallel)
+ var err error
+ letter, err = build.ArchChar(build.DefaultContext.GOARCH)
+ check(err)
+ gc = letter + "g"
+ ld = letter + "l"
+
+ var tests []*test
+ if flag.NArg() > 0 {
+ for _, arg := range flag.Args() {
+ if arg == "-" || arg == "--" {
+ // Permit running either:
+ // $ go run run.go - env.go
+ // $ go run run.go -- env.go
+ continue
+ }
+ if !strings.HasSuffix(arg, ".go") {
+ log.Fatalf("can't yet deal with non-go file %q", arg)
+ }
+ dir, file := filepath.Split(arg)
+ tests = append(tests, startTest(dir, file))
+ }
+ } else {
+ for _, dir := range dirs {
+ for _, baseGoFile := range goFiles(dir) {
+ tests = append(tests, startTest(dir, baseGoFile))
+ }
+ }
+ }
+
+ failed := false
+ resCount := map[string]int{}
+ for _, test := range tests {
+ <-test.donec
+ _, isSkip := test.err.(skipError)
+ if isSkip {
+ resCount["skip"]++
+ if !*verbose {
+ continue
+ }
+ }
+ errStr := "pass"
+ if test.err != nil {
+ errStr = test.err.Error()
+ if !isSkip {
+ failed = true
+ }
+ }
+ resCount[errStr]++
+ if !*verbose && test.err == nil {
+ continue
+ }
+ fmt.Printf("%-10s %-20s: %s\n", test.action, test.goFileName(), errStr)
+ }
+
+ if *summary {
+ for k, v := range resCount {
+ fmt.Printf("%5d %s\n", v, k)
+ }
+ }
+
+ if failed {
+ os.Exit(1)
+ }
+}
+
+func toolPath(name string) string {
+ p := filepath.Join(os.Getenv("GOROOT"), "bin", "tool", name)
+ if _, err := os.Stat(p); err != nil {
+ log.Fatalf("didn't find binary at %s", p)
+ }
+ return p
+}
+
+func goFiles(dir string) []string {
+ f, err := os.Open(dir)
+ check(err)
+ dirnames, err := f.Readdirnames(-1)
+ check(err)
+ names := []string{}
+ for _, name := range dirnames {
+ if strings.HasSuffix(name, ".go") {
+ names = append(names, name)
+ }
+ }
+ sort.Strings(names)
+ return names
+}
+
+// skipError describes why a test was skipped.
+type skipError string
+
+func (s skipError) Error() string { return string(s) }
+
+func check(err error) {
+ if err != nil {
+ log.Fatal(err)
+ }
+}
+
+// test holds the state of a test.
+type test struct {
+ dir, gofile string
+ donec chan bool // closed when done
+
+ src string
+ action string // "compile", "build", "run", "errorcheck"
+
+ tempDir string
+ err error
+}
+
+// startTest
+func startTest(dir, gofile string) *test {
+ t := &test{
+ dir: dir,
+ gofile: gofile,
+ donec: make(chan bool, 1),
+ }
+ if toRun == nil {
+ toRun = make(chan *test, maxTests)
+ go runTests()
+ }
+ select {
+ case toRun <- t:
+ default:
+ panic("toRun buffer size (maxTests) is too small")
+ }
+ return t
+}
+
+// runTests runs tests in parallel, but respecting the order they
+// were enqueued on the toRun channel.
+func runTests() {
+ for {
+ ratec <- true
+ t := <-toRun
+ go func() {
+ t.run()
+ <-ratec
+ }()
+ }
+}
+
+func (t *test) goFileName() string {
+ return filepath.Join(t.dir, t.gofile)
+}
+
+// run runs a test.
+func (t *test) run() {
+ defer close(t.donec)
+
+ srcBytes, err := ioutil.ReadFile(t.goFileName())
+ if err != nil {
+ t.err = err
+ return
+ }
+ t.src = string(srcBytes)
+ if t.src[0] == '\n' {
+ t.err = skipError("starts with newline")
+ return
+ }
+ pos := strings.Index(t.src, "\n\n")
+ if pos == -1 {
+ t.err = errors.New("double newline not found")
+ return
+ }
+ action := t.src[:pos]
+ if strings.HasPrefix(action, "//") {
+ action = action[2:]
+ }
+ action = strings.TrimSpace(action)
+
+ switch action {
+ case "compile", "build", "run", "errorcheck":
+ t.action = action
+ default:
+ t.err = skipError("skipped; unknown pattern: " + action)
+ t.action = "??"
+ return
+ }
+
+ t.makeTempDir()
+ defer os.RemoveAll(t.tempDir)
+
+ err = ioutil.WriteFile(filepath.Join(t.tempDir, t.gofile), srcBytes, 0644)
+ check(err)
+
+ cmd := exec.Command("go", "tool", gc, "-e", "-o", "a."+letter, t.gofile)
+ var buf bytes.Buffer
+ cmd.Stdout = &buf
+ cmd.Stderr = &buf
+ cmd.Dir = t.tempDir
+ err = cmd.Run()
+ out := buf.String()
+
+ if action == "errorcheck" {
+ t.err = t.errorCheck(out)
+ return
+ }
+
+ if err != nil {
+ t.err = fmt.Errorf("build = %v (%q)", err, out)
+ return
+ }
+
+ if action == "compile" {
+ return
+ }
+
+ if action == "build" || action == "run" {
+ buf.Reset()
+ cmd = exec.Command("go", "tool", ld, "-o", "a.out", "a."+letter)
+ cmd.Stdout = &buf
+ cmd.Stderr = &buf
+ cmd.Dir = t.tempDir
+ err = cmd.Run()
+ out = buf.String()
+ if err != nil {
+ t.err = fmt.Errorf("link = %v (%q)", err, out)
+ return
+ }
+ if action == "build" {
+ return
+ }
+ }
+
+ if action == "run" {
+ buf.Reset()
+ cmd = exec.Command(filepath.Join(t.tempDir, "a.out"))
+ cmd.Stdout = &buf
+ cmd.Stderr = &buf
+ cmd.Dir = t.tempDir
+ cmd.Env = append(cmd.Env, "GOARCH="+runtime.GOARCH)
+ err = cmd.Run()
+ out = buf.String()
+ if err != nil {
+ t.err = fmt.Errorf("run = %v (%q)", err, out)
+ return
+ }
+
+ if out != t.expectedOutput() {
+ t.err = fmt.Errorf("output differs; got:\n%s", out)
+ }
+ return
+ }
+
+ t.err = fmt.Errorf("unimplemented action %q", action)
+}
+
+func (t *test) String() string {
+ return filepath.Join(t.dir, t.gofile)
+}
+
+func (t *test) makeTempDir() {
+ var err error
+ t.tempDir, err = ioutil.TempDir("", "")
+ check(err)
+}
+
+func (t *test) expectedOutput() string {
+ filename := filepath.Join(t.dir, t.gofile)
+ filename = filename[:len(filename)-len(".go")]
+ filename += ".out"
+ b, _ := ioutil.ReadFile(filename)
+ return string(b)
+}
+
+func (t *test) errorCheck(outStr string) (err error) {
+ defer func() {
+ if *verbose && err != nil {
+ log.Printf("%s gc output:\n%s", t, outStr)
+ }
+ }()
+ var errs []error
+
+ var out []string
+ // 6g error messages continue onto additional lines with leading tabs.
+ // Split the output at the beginning of each line that doesn't begin with a tab.
+ for _, line := range strings.Split(outStr, "\n") {
+ if strings.HasPrefix(line, "\t") {
+ out[len(out)-1] += "\n" + line
+ } else {
+ out = append(out, line)
+ }
+ }
+
+ for _, we := range t.wantedErrors() {
+ var errmsgs []string
+ errmsgs, out = partitionStrings(we.filterRe, out)
+ if len(errmsgs) == 0 {
+ errs = append(errs, fmt.Errorf("errchk: %s:%d: missing expected error: %s", we.file, we.lineNum, we.reStr))
+ continue
+ }
+ matched := false
+ for _, errmsg := range errmsgs {
+ if we.re.MatchString(errmsg) {
+ matched = true
+ } else {
+ out = append(out, errmsg)
+ }
+ }
+ if !matched {
+ errs = append(errs, fmt.Errorf("errchk: %s:%d: error(s) on line didn't match pattern: %s", we.file, we.lineNum, we.reStr))
+ continue
+ }
+ }
+
+ if len(errs) == 0 {
+ return nil
+ }
+ if len(errs) == 1 {
+ return errs[0]
+ }
+ var buf bytes.Buffer
+ buf.WriteString("Multiple errors:\n")
+ for _, err := range errs {
+ fmt.Fprintf(&buf, "%s\n", err.Error())
+ }
+ return errors.New(buf.String())
+
+}
+
+func partitionStrings(rx *regexp.Regexp, strs []string) (matched, unmatched []string) {
+ for _, s := range strs {
+ if rx.MatchString(s) {
+ matched = append(matched, s)
+ } else {
+ unmatched = append(unmatched, s)
+ }
+ }
+ return
+}
+
+type wantedError struct {
+ reStr string
+ re *regexp.Regexp
+ lineNum int
+ file string
+ filterRe *regexp.Regexp // /^file:linenum\b/m
+}
+
+var (
+ errRx = regexp.MustCompile(`// (?:GC_)?ERROR (.*)`)
+ errQuotesRx = regexp.MustCompile(`"([^"]*)"`)
+ lineRx = regexp.MustCompile(`LINE(([+-])([0-9]+))?`)
+)
+
+func (t *test) wantedErrors() (errs []wantedError) {
+ for i, line := range strings.Split(t.src, "\n") {
+ lineNum := i + 1
+ if strings.Contains(line, "////") {
+ // double comment disables ERROR
+ continue
+ }
+ m := errRx.FindStringSubmatch(line)
+ if m == nil {
+ continue
+ }
+ all := m[1]
+ mm := errQuotesRx.FindAllStringSubmatch(all, -1)
+ if mm == nil {
+ log.Fatalf("invalid errchk line in %s: %s", t.goFileName(), line)
+ }
+ for _, m := range mm {
+ rx := lineRx.ReplaceAllStringFunc(m[1], func(m string) string {
+ n := lineNum
+ if strings.HasPrefix(m, "LINE+") {
+ delta, _ := strconv.Atoi(m[5:])
+ n += delta
+ } else if strings.HasPrefix(m, "LINE-") {
+ delta, _ := strconv.Atoi(m[5:])
+ n -= delta
+ }
+ return fmt.Sprintf("%s:%d", t.gofile, n)
+ })
+ filterPattern := fmt.Sprintf(`^(\w+/)?%s:%d[:[]`, t.gofile, lineNum)
+ errs = append(errs, wantedError{
+ reStr: rx,
+ re: regexp.MustCompile(rx),
+ filterRe: regexp.MustCompile(filterPattern),
+ lineNum: lineNum,
+ file: t.gofile,
+ })
+ }
+ }
+
+ return
+}
diff --git a/test/rune.go b/test/rune.go
index 3386972b6..3d3823e68 100644
--- a/test/rune.go
+++ b/test/rune.go
@@ -1,10 +1,10 @@
-// $G $D/$F.go
+// compile
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-package main
+package rune
var (
r0 = 'a'
diff --git a/test/runtime.go b/test/runtime.go
index 4be1d055b..3162b3f13 100644
--- a/test/runtime.go
+++ b/test/runtime.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/safe/main.go b/test/safe/main.go
new file mode 100644
index 000000000..d173ed926
--- /dev/null
+++ b/test/safe/main.go
@@ -0,0 +1,14 @@
+// true
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+// can't use local path with -u, use -I. instead
+import "pkg" // ERROR "import unsafe package"
+
+func main() {
+ print(pkg.Float32bits(1.0))
+}
diff --git a/test/safe/nousesafe.go b/test/safe/nousesafe.go
new file mode 100644
index 000000000..f61e7fe4f
--- /dev/null
+++ b/test/safe/nousesafe.go
@@ -0,0 +1,8 @@
+// $G $D/pkg.go && pack grc pkg.a pkg.$A 2> /dev/null && rm pkg.$A && errchk $G -I. -u $D/main.go
+// rm -f pkg.a
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package ignored
diff --git a/test/safe/pkg.go b/test/safe/pkg.go
new file mode 100644
index 000000000..bebc43a21
--- /dev/null
+++ b/test/safe/pkg.go
@@ -0,0 +1,16 @@
+// true
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// a package that uses unsafe on the inside but not in it's api
+
+package pkg
+
+import "unsafe"
+
+// this should be inlinable
+func Float32bits(f float32) uint32 {
+ return *(*uint32)(unsafe.Pointer(&f))
+} \ No newline at end of file
diff --git a/test/safe/usesafe.go b/test/safe/usesafe.go
new file mode 100644
index 000000000..07c13c1c3
--- /dev/null
+++ b/test/safe/usesafe.go
@@ -0,0 +1,8 @@
+// $G $D/pkg.go && pack grcS pkg.a pkg.$A 2> /dev/null && rm pkg.$A && $G -I. -u $D/main.go
+// rm -f pkg.a
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package ignored
diff --git a/test/shift1.go b/test/shift1.go
index c197eef66..393e79ee2 100644
--- a/test/shift1.go
+++ b/test/shift1.go
@@ -1,4 +1,4 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/shift2.go b/test/shift2.go
index ec4c7addc..cf0a45fdb 100644
--- a/test/shift2.go
+++ b/test/shift2.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo BUG: shift2
+// compile
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/sieve.go b/test/sieve.go
index 4fa111582..31c4ed5c0 100644
--- a/test/sieve.go
+++ b/test/sieve.go
@@ -1,4 +1,6 @@
-// $G $F.go && $L $F.$A # don't run it - goes forever
+// build
+
+// don't run it - goes forever
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/simassign.go b/test/simassign.go
index 28408abc2..349895152 100644
--- a/test/simassign.go
+++ b/test/simassign.go
@@ -1,4 +1,4 @@
-// $G $F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/sizeof.go b/test/sizeof.go
index 544e4c52c..292f73ae4 100644
--- a/test/sizeof.go
+++ b/test/sizeof.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go
+// compile
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/solitaire.go b/test/solitaire.go
index 473a1d12d..99c194f5b 100644
--- a/test/solitaire.go
+++ b/test/solitaire.go
@@ -1,4 +1,6 @@
-// $G $F.go && $L $F.$A # don't run it - produces too much output
+// build
+
+// don't run it - produces too much output
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/stack.go b/test/stack.go
index 1fd57161f..2a7ce21f3 100644
--- a/test/stack.go
+++ b/test/stack.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/string_lit.go b/test/string_lit.go
index c702a05e9..7f1ca35bc 100644
--- a/test/string_lit.go
+++ b/test/string_lit.go
@@ -1,4 +1,4 @@
-// $G $F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/stringrange.go b/test/stringrange.go
index 6a7063e23..a1534c49c 100644
--- a/test/stringrange.go
+++ b/test/stringrange.go
@@ -1,4 +1,4 @@
-// $G $F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/struct0.go b/test/struct0.go
index 2398c4117..490d38973 100644
--- a/test/struct0.go
+++ b/test/struct0.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/switch.go b/test/switch.go
index bed027ce8..68bd117f0 100644
--- a/test/switch.go
+++ b/test/switch.go
@@ -1,4 +1,4 @@
-// $G $F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/switch1.go b/test/switch1.go
index 5bd9d7c5d..484a5c3af 100644
--- a/test/switch1.go
+++ b/test/switch1.go
@@ -1,4 +1,4 @@
-// $G $F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/switch3.go b/test/switch3.go
index e91499db0..404b62e39 100644
--- a/test/switch3.go
+++ b/test/switch3.go
@@ -1,4 +1,4 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
@@ -15,31 +15,31 @@ func bad() {
var s string
switch i {
- case s: // ERROR "mismatched types string and I"
+ case s: // ERROR "mismatched types string and I|incompatible types"
}
switch s {
- case i: // ERROR "mismatched types I and string"
+ case i: // ERROR "mismatched types I and string|incompatible types"
}
var m, m1 map[int]int
switch m {
case nil:
- case m1: // ERROR "can only compare map m to nil"
+ case m1: // ERROR "can only compare map m to nil|map can only be compared to nil"
default:
}
var a, a1 []int
switch a {
case nil:
- case a1: // ERROR "can only compare slice a to nil"
+ case a1: // ERROR "can only compare slice a to nil|slice can only be compared to nil"
default:
}
var f, f1 func()
switch f {
case nil:
- case f1: // ERROR "can only compare func f to nil"
+ case f1: // ERROR "can only compare func f to nil|func can only be compared to nil"
default:
}
}
diff --git a/test/syntax/chan.go b/test/syntax/chan.go
index ff3577502..3b68bda35 100644
--- a/test/syntax/chan.go
+++ b/test/syntax/chan.go
@@ -1,4 +1,4 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/syntax/chan1.go b/test/syntax/chan1.go
index 9c12e5e6f..868a1226d 100644
--- a/test/syntax/chan1.go
+++ b/test/syntax/chan1.go
@@ -1,4 +1,4 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/syntax/else.go b/test/syntax/else.go
index 186d5959a..e985a9c09 100644
--- a/test/syntax/else.go
+++ b/test/syntax/else.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
@@ -8,5 +8,5 @@ package main
func main() {
if true {
- } else ; // ERROR "else must be followed by if or statement block"
+ } else ; // ERROR "else must be followed by if or statement block|expected .if. or .{."
}
diff --git a/test/syntax/forvar.go b/test/syntax/forvar.go
index f12ce55ca..dc592d2b6 100644
--- a/test/syntax/forvar.go
+++ b/test/syntax/forvar.go
@@ -1,4 +1,4 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/syntax/if.go b/test/syntax/if.go
index a3b51f0c0..b2a65f9a5 100644
--- a/test/syntax/if.go
+++ b/test/syntax/if.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/syntax/import.go b/test/syntax/import.go
index dd1f26134..f0a792126 100644
--- a/test/syntax/import.go
+++ b/test/syntax/import.go
@@ -1,4 +1,4 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/syntax/interface.go b/test/syntax/interface.go
index a7f43533a..0b76b5416 100644
--- a/test/syntax/interface.go
+++ b/test/syntax/interface.go
@@ -1,4 +1,4 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/syntax/semi1.go b/test/syntax/semi1.go
index 547d9bf79..8fbfb206a 100644
--- a/test/syntax/semi1.go
+++ b/test/syntax/semi1.go
@@ -1,4 +1,4 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/syntax/semi2.go b/test/syntax/semi2.go
index 28d1d3906..cfb0ed17b 100644
--- a/test/syntax/semi2.go
+++ b/test/syntax/semi2.go
@@ -1,4 +1,4 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/syntax/semi3.go b/test/syntax/semi3.go
index ab5941bda..645af7354 100644
--- a/test/syntax/semi3.go
+++ b/test/syntax/semi3.go
@@ -1,4 +1,4 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/syntax/semi4.go b/test/syntax/semi4.go
index 7a9c2956e..e192348aa 100644
--- a/test/syntax/semi4.go
+++ b/test/syntax/semi4.go
@@ -1,4 +1,4 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/syntax/semi5.go b/test/syntax/semi5.go
index 5f8ccc688..cf690f084 100644
--- a/test/syntax/semi5.go
+++ b/test/syntax/semi5.go
@@ -1,4 +1,4 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/syntax/semi6.go b/test/syntax/semi6.go
index b6279ed30..c1e1cc363 100644
--- a/test/syntax/semi6.go
+++ b/test/syntax/semi6.go
@@ -1,4 +1,4 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/syntax/semi7.go b/test/syntax/semi7.go
index 5a7b3ff4c..6c9ade8bc 100644
--- a/test/syntax/semi7.go
+++ b/test/syntax/semi7.go
@@ -1,4 +1,4 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/syntax/topexpr.go b/test/syntax/topexpr.go
index 93d86fbe9..c5958f5dd 100644
--- a/test/syntax/topexpr.go
+++ b/test/syntax/topexpr.go
@@ -1,4 +1,4 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/syntax/typesw.go b/test/syntax/typesw.go
index 47f683cdf..cd8cf3523 100644
--- a/test/syntax/typesw.go
+++ b/test/syntax/typesw.go
@@ -1,4 +1,4 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/syntax/vareq.go b/test/syntax/vareq.go
index 8525be8cf..f08955e91 100644
--- a/test/syntax/vareq.go
+++ b/test/syntax/vareq.go
@@ -1,4 +1,4 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/syntax/vareq1.go b/test/syntax/vareq1.go
index 9d70bea39..e900eabeb 100644
--- a/test/syntax/vareq1.go
+++ b/test/syntax/vareq1.go
@@ -1,4 +1,4 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/test0.go b/test/test0.go
index d8d86c427..ba88b1dbd 100644
--- a/test/test0.go
+++ b/test/test0.go
@@ -1,4 +1,4 @@
-// $G $F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/testlib b/test/testlib
new file mode 100644
index 000000000..ea8c5d74e
--- /dev/null
+++ b/test/testlib
@@ -0,0 +1,22 @@
+# Copyright 2012 The Go Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style
+# license that can be found in the LICENSE file.
+
+# These function names are also known to
+# (and are the plan for transitioning to) run.go.
+
+compile() {
+ $G $D/$F.go
+}
+
+build() {
+ $G $D/$F.go && $L $F.$A
+}
+
+run() {
+ $G $D/$F.go && $L $F.$A && ./$A.out "$@"
+}
+
+errorcheck() {
+ errchk $G -e $D/$F.go
+}
diff --git a/test/turing.go b/test/turing.go
index 366982e67..f5a2be232 100644
--- a/test/turing.go
+++ b/test/turing.go
@@ -1,4 +1,4 @@
-// $G $F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/typeswitch.go b/test/typeswitch.go
index aa911f9b6..1f864db9f 100644
--- a/test/typeswitch.go
+++ b/test/typeswitch.go
@@ -1,4 +1,4 @@
-// $G $F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/typeswitch1.go b/test/typeswitch1.go
index 9613b166f..8b33d39bc 100644
--- a/test/typeswitch1.go
+++ b/test/typeswitch1.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/typeswitch2.go b/test/typeswitch2.go
index 57c5a18ab..69088e0d4 100644
--- a/test/typeswitch2.go
+++ b/test/typeswitch2.go
@@ -1,4 +1,4 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
@@ -23,10 +23,10 @@ func whatis(x interface{}) string {
w()
}:
return "rw"
- case interface {
+ case interface { // GCCGO_ERROR "duplicate"
w()
r()
- }: // ERROR "duplicate"
+ }: // GC_ERROR "duplicate"
return "wr"
}
diff --git a/test/typeswitch3.go b/test/typeswitch3.go
index 078980146..69a2fca8b 100644
--- a/test/typeswitch3.go
+++ b/test/typeswitch3.go
@@ -1,4 +1,4 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
@@ -30,6 +30,10 @@ func main(){
switch r.(type) {
case io.Writer:
}
+
+ // Issue 2827.
+ switch _ := r.(type) { // ERROR "invalid variable name _"
+ }
}
diff --git a/test/undef.go b/test/undef.go
index 7ef07882a..461006d2c 100644
--- a/test/undef.go
+++ b/test/undef.go
@@ -1,4 +1,4 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/utf.go b/test/utf.go
index 9fba58156..0a3a1c0d6 100644
--- a/test/utf.go
+++ b/test/utf.go
@@ -1,4 +1,4 @@
-// $G $F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/varerr.go b/test/varerr.go
index ddd718f5b..4056c16d0 100644
--- a/test/varerr.go
+++ b/test/varerr.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/varinit.go b/test/varinit.go
index c76877793..5614783e0 100644
--- a/test/varinit.go
+++ b/test/varinit.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG wrong result
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/zerodivide.go b/test/zerodivide.go
index 3b08e774c..673d1d18d 100644
--- a/test/zerodivide.go
+++ b/test/zerodivide.go
@@ -1,9 +1,11 @@
-// $G $F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test that zero division causes a panic.
+
package main
import (