diff options
author | R?my Oudompheng <oudomphe@phare.normalesup.org> | 2013-01-11 22:42:55 +0100 |
---|---|---|
committer | R?my Oudompheng <oudomphe@phare.normalesup.org> | 2013-01-11 22:42:55 +0100 |
commit | 829d91fb72cc4875e180f2640acc6f1718fe2f4b (patch) | |
tree | 1fbe0c1c0bf6c701fb96a2b63bc3483de122f4d7 | |
parent | 910a0e0c24e512fb1fa5840c31004a0967d65ce2 (diff) | |
download | go-829d91fb72cc4875e180f2640acc6f1718fe2f4b.tar.gz |
test: add rotate.go and fixedbugs/bug313
Update issue 4139.
R=golang-dev, iant
CC=golang-dev
https://codereview.appspot.com/7094047
-rw-r--r-- | test/fixedbugs/bug313.go | 5 | ||||
-rw-r--r-- | test/rotate.go | 15 | ||||
-rw-r--r-- | test/rotate0.go | 12 | ||||
-rw-r--r-- | test/rotate1.go | 12 | ||||
-rw-r--r-- | test/rotate2.go | 12 | ||||
-rw-r--r-- | test/rotate3.go | 12 | ||||
-rw-r--r-- | test/run.go | 2 |
7 files changed, 54 insertions, 16 deletions
diff --git a/test/fixedbugs/bug313.go b/test/fixedbugs/bug313.go index 9009c5e8f..a7c1d3627 100644 --- a/test/fixedbugs/bug313.go +++ b/test/fixedbugs/bug313.go @@ -1,7 +1,4 @@ -// errchk $G -e $D/$F.dir/[ab].go - -// NOTE: This test is not run by 'run.go' and so not run by all.bash. -// To run this test you must use the ./run shell script. +// errorcheckdir // Copyright 2010 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/test/rotate.go b/test/rotate.go index aa334b421..1d7149702 100644 --- a/test/rotate.go +++ b/test/rotate.go @@ -1,9 +1,6 @@ -// $G $D/$F.go && $L $F.$A && -// ./$A.out >tmp.go && $G tmp.go && $L -o $A.out1 tmp.$A && ./$A.out1 -// rm -f tmp.go $A.out1 +// skip -// NOTE: This test is not run by 'run.go' and so not run by all.bash. -// To run this test you must use the ./run shell script. +// NOTE: the actual tests to run are rotate[0123].go // Copyright 2012 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style @@ -12,8 +9,8 @@ // Generate test of shift and rotate by constants. // The output is compiled and run. // -// The output takes around a gigabyte of memory to compile, link, and run -// but it is only done during ./run, not in normal builds using run.go. +// The integer type depends on the value of mode (rotate direction, +// signedness). package main @@ -37,9 +34,7 @@ func main() { typ := fmt.Sprintf("int%d", 1<<logBits) fmt.Fprint(b, strings.Replace(checkFunc, "XXX", typ, -1)) fmt.Fprint(b, strings.Replace(checkFunc, "XXX", "u"+typ, -1)) - for mode := 0; mode < 1<<2; mode++ { - gentest(b, 1<<logBits, mode&1 != 0, mode&2 != 0) - } + gentest(b, 1<<logBits, mode&1 != 0, mode&2 != 0) } } diff --git a/test/rotate0.go b/test/rotate0.go new file mode 100644 index 000000000..400b225cf --- /dev/null +++ b/test/rotate0.go @@ -0,0 +1,12 @@ +// runoutput ./rotate.go + +// Copyright 2013 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. + +// Generate test of bit rotations. +// The output is compiled and run. + +package main + +const mode = 0 diff --git a/test/rotate1.go b/test/rotate1.go new file mode 100644 index 000000000..98b0b1c84 --- /dev/null +++ b/test/rotate1.go @@ -0,0 +1,12 @@ +// runoutput ./rotate.go + +// Copyright 2013 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. + +// Generate test of bit rotations. +// The output is compiled and run. + +package main + +const mode = 1 diff --git a/test/rotate2.go b/test/rotate2.go new file mode 100644 index 000000000..c50f8ce73 --- /dev/null +++ b/test/rotate2.go @@ -0,0 +1,12 @@ +// runoutput ./rotate.go + +// Copyright 2013 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. + +// Generate test of bit rotations. +// The output is compiled and run. + +package main + +const mode = 2 diff --git a/test/rotate3.go b/test/rotate3.go new file mode 100644 index 000000000..73d47d852 --- /dev/null +++ b/test/rotate3.go @@ -0,0 +1,12 @@ +// runoutput ./rotate.go + +// Copyright 2013 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. + +// Generate test of bit rotations. +// The output is compiled and run. + +package main + +const mode = 3 diff --git a/test/run.go b/test/run.go index c870e7957..c7305d30b 100644 --- a/test/run.go +++ b/test/run.go @@ -724,12 +724,10 @@ func (t *test) wantedErrors(file, short string) (errs []wantedError) { var skipOkay = map[string]bool{ "linkx.go": true, - "rotate.go": true, "sigchld.go": true, "sinit.go": true, "fixedbugs/bug248.go": true, // combines errorcheckdir and rundir in the same dir. "fixedbugs/bug302.go": true, // tests both .$O and .a imports. - "fixedbugs/bug313.go": true, // errorcheckdir with failures in the middle. "fixedbugs/bug345.go": true, // needs the appropriate flags in gc invocation. "fixedbugs/bug369.go": true, // needs compiler flags. "fixedbugs/bug385_32.go": true, // arch-specific errors. |