diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/arm-pass.txt | 136 | ||||
-rw-r--r-- | test/cmplxdivide.go | 5 | ||||
-rw-r--r-- | test/float_lit.go | 21 | ||||
-rw-r--r-- | test/floatcmp.go | 18 | ||||
-rw-r--r-- | test/golden-arm.out | 49 | ||||
-rw-r--r-- | test/ken/cplx4.go | 2 | ||||
-rw-r--r-- | test/nul1.go | 1 | ||||
-rwxr-xr-x | test/run | 8 | ||||
-rw-r--r-- | test/zerodivide.go | 5 |
9 files changed, 178 insertions, 67 deletions
diff --git a/test/arm-pass.txt b/test/arm-pass.txt index 8878f6dc8..974fbf02c 100644 --- a/test/arm-pass.txt +++ b/test/arm-pass.txt @@ -1,12 +1,15 @@ ./235.go -./64bit.go # slow with GOGC=on +./64bit.go ./args.go ./assign.go +./assign1.go ./bigalg.go +./bigmap.go ./blank.go ./blank1.go ./chancap.go ./char_lit.go +./char_lit1.go ./closedchan.go ./closure.go ./cmp1.go @@ -14,6 +17,9 @@ ./cmp3.go ./cmp4.go ./cmp5.go +./cmplx.go +# ./cmplxdivide.go # fail +./cmplxdivide1.go ./complit.go ./compos.go ./const.go @@ -24,7 +30,7 @@ ./convert3.go ./convlit.go ./convlit1.go -# ./copy.go # slow +./copy.go ./ddd.go ./ddd1.go ./ddd2.go @@ -32,23 +38,22 @@ ./decl.go ./declbad.go ./defer.go -# ./deferprint.go # need floating point +./deferprint.go ./empty.go ./env.go ./escape.go -# ./float_lit.go # need floating point -# ./floatcmp.go # need floating point +# ./float_lit.go # fail +# ./floatcmp.go # fail ./for.go -# ./func.go +./func.go ./func1.go ./func2.go ./func3.go ./func4.go ./func5.go -# ./gc.go -# ./gc1.go +./gc.go +./gc1.go ./hashmap.go -./hilbert.go ./helloworld.go ./if.go ./if1.go @@ -60,64 +65,70 @@ ./indirect.go ./indirect1.go ./initcomma.go -# ./initialize.go # need floating point +# ./initialize.go # fail ./initializerr.go ./initsyscall.go ./int_lit.go ./intcvt.go ./iota.go -# ./literal.go # need floating point -# ./malloc1.go -# ./mallocfin.go -# ./mallocrand.go -# ./mallocrep.go -# ./mallocrep1.go -# ./map.go # need floating point +# ./literal.go # fail +./malloc1.go +# ./mallocfin.go # fail +./mallocrand.go +./mallocrep.go +./mallocrep1.go +# ./map.go # fail ./method.go ./method1.go ./method2.go ./method3.go -#./named.go # need floating point +# ./named.go # fail ./named1.go ./nil.go -# ./nul1.go # android runner gets confused +./nul1.go ./parentype.go -# ./peano.go # foo +./peano.go ./printbig.go -./range.go +# ./range.go # fail ./recover.go ./recover1.go ./recover2.go +# ./recover3.go # fail ./rename.go ./rename1.go ./runtime.go ./sieve.go -# ./sigchld.go # fail - does not survive signal +./sigchld.go ./simassign.go +./sinit.go ./stack.go ./string_lit.go ./stringrange.go ./switch.go ./switch1.go +./test.go ./test0.go ./turing.go ./typeswitch.go -# ./typeswitch1.go +./typeswitch1.go ./typeswitch2.go +./undef.go ./utf.go +./varerr.go ./varinit.go -# ./vectors.go +./vectors.go +# ./zerodivide.go # fail ken/array.go -# ken/chan.go # slow -# ken/chan1.go # slow +ken/chan.go +ken/chan1.go ken/complit.go -# ken/cplx0.go # need floating point -# ken/cplx1.go # need floating point -# ken/cplx2.go # need floating point -# ken/cplx3.go # need floating point -# ken/cplx4.go # need floating point -# ken/cplx5.go # need floating point -# ken/divconst.go # slow +ken/cplx0.go +# ken/cplx1.go # fail +# ken/cplx2.go # fail +ken/cplx3.go +# ken/cplx4.go # fail +ken/cplx5.go +ken/divconst.go ken/divmod.go ken/embed.go ken/for.go @@ -127,28 +138,28 @@ ken/intervar.go ken/label.go ken/litfun.go ken/mfunc.go -# ken/modconst.go # slow +ken/modconst.go ken/ptrfun.go ken/ptrvar.go ken/range.go ken/rob1.go ken/rob2.go ken/robfor.go -# ken/robfunc.go # fail +ken/robfunc.go ken/robif.go ken/shift.go -#ken/simparray.go # need floating point +# ken/simparray.go # fail ken/simpbool.go -#ken/simpconv.go # need floating point +# ken/simpconv.go # fail ken/simpfun.go ken/simpprint.go ken/simpswitch.go ken/simpvar.go -#ken/slicearray.go # need floating point -#ken/sliceslice.go # need floating point +ken/slicearray.go +ken/sliceslice.go ken/string.go ken/strvar.go -# chan/doubleselect.go # slow +chan/doubleselect.go chan/fifo.go chan/goroutines.go chan/nonblock.go @@ -167,8 +178,8 @@ interface/embed.go interface/embed0.go interface/embed1.go interface/explicit.go -# interface/fake.go # fails - panic: assert interface/fail.go +# interface/fake.go # fail interface/pointer.go interface/receiver.go interface/receiver1.go @@ -196,6 +207,7 @@ syntax/semi5.go syntax/semi6.go syntax/semi7.go syntax/slice.go +syntax/topexpr.go syntax/vareq.go syntax/vareq1.go fixedbugs/bug000.go @@ -209,7 +221,7 @@ fixedbugs/bug007.go fixedbugs/bug008.go fixedbugs/bug009.go fixedbugs/bug010.go -#fixedbugs/bug011.go # need floating point +fixedbugs/bug011.go fixedbugs/bug012.go fixedbugs/bug013.go fixedbugs/bug014.go @@ -303,7 +315,7 @@ fixedbugs/bug116.go fixedbugs/bug117.go fixedbugs/bug118.go fixedbugs/bug119.go -# fixedbugs/bug120.go # needs floating point +fixedbugs/bug120.go fixedbugs/bug121.go fixedbugs/bug122.go fixedbugs/bug123.go @@ -332,8 +344,7 @@ fixedbugs/bug149.go fixedbugs/bug150.go fixedbugs/bug151.go fixedbugs/bug152.go -fixedbugs/bug153.go -# fixedbugs/bug154.go # needs floating point +fixedbugs/bug154.go fixedbugs/bug155.go fixedbugs/bug156.go fixedbugs/bug157.go @@ -397,7 +408,7 @@ fixedbugs/bug217.go fixedbugs/bug218.go fixedbugs/bug219.go fixedbugs/bug220.go -# fixedbugs/bug221.go # slow +# fixedbugs/bug221.go # fail fixedbugs/bug222.go fixedbugs/bug223.go fixedbugs/bug224.go @@ -412,14 +423,14 @@ fixedbugs/bug232.go fixedbugs/bug233.go fixedbugs/bug234.go fixedbugs/bug235.go -# fixedbugs/bug236.go # slow +# fixedbugs/bug236.go # fail fixedbugs/bug237.go fixedbugs/bug238.go fixedbugs/bug239.go fixedbugs/bug240.go fixedbugs/bug241.go fixedbugs/bug242.go -# fixedbugs/bug243.go # fail +# fixedbugs/bug243.go # fail fixedbugs/bug244.go fixedbugs/bug245.go fixedbugs/bug246.go @@ -433,12 +444,35 @@ fixedbugs/bug253.go fixedbugs/bug254.go fixedbugs/bug255.go fixedbugs/bug256.go -# fixedbugs/bug257.go # slow -# fixedbugs/bug258.go # needs floating point +fixedbugs/bug257.go +fixedbugs/bug258.go fixedbugs/bug259.go fixedbugs/bug261.go fixedbugs/bug262.go fixedbugs/bug263.go fixedbugs/bug264.go fixedbugs/bug265.go -bugs/bug260.go +fixedbugs/bug266.go +fixedbugs/bug267.go +fixedbugs/bug268.go +fixedbugs/bug269.go +fixedbugs/bug270.go +fixedbugs/bug271.go +# fixedbugs/bug272.go # fail +fixedbugs/bug273.go +fixedbugs/bug275.go +fixedbugs/bug276.go +fixedbugs/bug277.go +fixedbugs/bug278.go +fixedbugs/bug279.go +fixedbugs/bug280.go +# fixedbugs/bug281.go # fail, BUG +fixedbugs/bug282.go +fixedbugs/bug283.go +fixedbugs/bug284.go +fixedbugs/bug285.go +fixedbugs/bug287.go +fixedbugs/bug288.go +# bugs/bug260.go # fail, BUG +# bugs/bug274.go # fail, BUG +# bugs/bug286.go # fail, BUG diff --git a/test/cmplxdivide.go b/test/cmplxdivide.go index ac4730d64..6a67b175d 100644 --- a/test/cmplxdivide.go +++ b/test/cmplxdivide.go @@ -34,9 +34,14 @@ func calike(a, b complex128) bool { } func main() { + bad := false for _, t := range tests { x := t.f/t.g if !calike(x, t.out) { + if !bad { + fmt.Printf("BUG\n") + bad = true + } fmt.Printf("%v/%v: expected %v error; got %v\n", t.f, t.g, t.out, x) } } diff --git a/test/float_lit.go b/test/float_lit.go index 58bd4dac0..f77d24e82 100644 --- a/test/float_lit.go +++ b/test/float_lit.go @@ -6,6 +6,20 @@ package main +import "os" + +var deLim float64 +var bad bool + +func +init() { + if os.Getenv("GOARCH") == "arm" { + deLim = 1.0e-8 + } else { + deLim = 10.e-14 + } +} + func pow10(pow int) float64 { if pow < 0 { return 1/pow10(-pow); } @@ -30,15 +44,18 @@ close(da float64, ia, ib int64, pow int) bool { de = -de; } - if de < 1.0e-14 { + if de < deLim { return true; } + if !bad { + println("BUG") + bad = true + } return false; } func main() { - if !close(0., 0, 1, 0) { print("0. is ", 0., "\n"); } if !close(+10., 10, 1, 0) { print("+10. is ", +10., "\n"); } if !close(-210., -210, 1, 0) { print("-210. is ", -210., "\n"); } diff --git a/test/floatcmp.go b/test/floatcmp.go index 26fc6ad14..f51cbc277 100644 --- a/test/floatcmp.go +++ b/test/floatcmp.go @@ -9,13 +9,13 @@ package main import "math" type floatTest struct { - name string; - expr bool; - want bool; + name string + expr bool + want bool } -var nan float64 = math.NaN(); -var f float64 = 1; +var nan float64 = math.NaN() +var f float64 = 1 var tests = []floatTest{ floatTest{"nan == nan", nan == nan, false}, @@ -75,14 +75,14 @@ var tests = []floatTest{ } func main() { - bad := false; + bad := false for _, t := range tests { if t.expr != t.want { if !bad { - bad = true; - println("BUG: floatcmp"); + bad = true + println("BUG: floatcmp") } - println(t.name, "=", t.expr, "want", t.want); + println(t.name, "=", t.expr, "want", t.want) } } } diff --git a/test/golden-arm.out b/test/golden-arm.out index a51aea8e5..449424dca 100644 --- a/test/golden-arm.out +++ b/test/golden-arm.out @@ -19,16 +19,58 @@ panic: runtime error: hash of unhashable type []int panic PC=xxx +=========== ./deferprint.go +printing: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 +42 true false true +1.755561e+000 world 0x0 [0/0]0x0 0x0 0x0 255 + =========== ./helloworld.go hello, world +=========== ./peano.go +0! = 1 +1! = 1 +2! = 2 +3! = 6 +4! = 24 +5! = 120 +6! = 720 +7! = 5040 +8! = 40320 +9! = 362880 + =========== ./printbig.go -9223372036854775808 9223372036854775807 +=========== ./sigchld.go +survived SIGCHLD + +=========== ./sinit.go +FAIL + =========== ./turing.go Hello World! +=========== ken/cplx0.go +(+1.066132e-308+1.313301e-308i) +(+1.066132e-308+1.066132e-308i) +(+1.066132e-308+1.313301e-308i) +(+1.066132e-308+1.066132e-308i) + +=========== ken/cplx3.go +(+1.362661e-308+2.270313e+000i) +(+1.362661e-308+2.270313e+000i) +64 + +=========== ken/cplx5.go +(+0.000000e+000+0.000000e+000i) +(+1.066132e-308+1.066132e-308i) +(+1.066132e-308+2.272661e+000i) +(+2.270313e+000+2.272661e+000i) +(+2.270313e+000+2.272661e+000i) +(+1.313272e-308+0.000000e+000i) +(+1.313272e-308+0.000000e+000i) + =========== ken/intervar.go print 1 bio 2 file 3 -- abc @@ -50,6 +92,9 @@ hello world =========== ken/string.go abcxyz-abcxyz-abcxyz-abcxyz-abcxyz-abcxyz-abcxyz +=========== chan/doubleselect.go +PASS + =========== chan/nonblock.go PASS @@ -104,7 +149,3 @@ panic PC=xxx panic: interface conversion: interface is main.T, not main.T panic PC=xxx - -=========== bugs/bug260.go -FAIL -BUG: bug260 failed diff --git a/test/ken/cplx4.go b/test/ken/cplx4.go index d55d6a6e3..3c6f1f68c 100644 --- a/test/ken/cplx4.go +++ b/test/ken/cplx4.go @@ -39,6 +39,6 @@ func main() { // compiler used to crash on nested divide c4 := cmplx(real(c3/2), imag(c3/2)) if c4 != c3/2 { - fmt.Printf("c3 = %G != c4 = %G\n", c3, c4) + fmt.Printf("BUG: c3 = %G != c4 = %G\n", c3, c4) } } diff --git a/test/nul1.go b/test/nul1.go index 5e4596331..bcd8b89c3 100644 --- a/test/nul1.go +++ b/test/nul1.go @@ -1,4 +1,5 @@ // [ $GOOS != nacl ] || exit 0 # NaCl runner elides NUL in output +// [ $GORUN != "a" ] || exit 0 # Android runner gets confused by the NUL output // $G $D/$F.go && $L $F.$A && ./$A.out >tmp.go && // errchk $G -e tmp.go // rm -f tmp.go @@ -63,11 +63,19 @@ do echo "===========" $i cat $TMP1FILE echo >&2 fail: $i + echo "# $i # fail" >>pass.out elif test -s $TMP1FILE then echo echo "===========" $i cat $TMP1FILE + if grep -q '^BUG' $TMP1FILE + then + echo >&2 fail: $i + echo "# $i # fail, BUG" >>pass.out + else + echo $i >>pass.out + fi elif [ $dir = "bugs" ] then echo $i succeeded with no output. diff --git a/test/zerodivide.go b/test/zerodivide.go index 9d35b392b..e0407df7c 100644 --- a/test/zerodivide.go +++ b/test/zerodivide.go @@ -137,6 +137,7 @@ func alike(a, b float64) bool { } func main() { + bad := false for _, t := range errorTests { if t.err != "" && syscall.OS == "nacl" { continue @@ -161,6 +162,10 @@ func main() { for _, t := range floatTests { x := t.f/t.g if !alike(x, t.out) { + if !bad { + bad = true + fmt.Printf("BUG\n") + } fmt.Printf("%v/%v: expected %g error; got %g\n", t.f, t.g, t.out, x) } } |