summaryrefslogtreecommitdiff
path: root/test/turing.go
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2012-01-18 14:31:31 -0800
committerIan Lance Taylor <iant@golang.org>2012-01-18 14:31:31 -0800
commit46690a30548a029c3ced15c58088685898d52f6f (patch)
treef6e33856c806d3b0fc8b6ac55d74d26541db145c /test/turing.go
parent43a23b4d1dd11c9fe4b58923c589ae30648ca59e (diff)
downloadgo-46690a30548a029c3ced15c58088685898d52f6f.tar.gz
test: change several tests to not print
This will make these tests more meaningful for gccgo, which runs tests in parallel and has no equivalent to golden.out. Remove ken/simpprint.go since it duplicates helloworld.go. R=golang-dev, r CC=golang-dev http://codereview.appspot.com/5536058
Diffstat (limited to 'test/turing.go')
-rw-r--r--test/turing.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/turing.go b/test/turing.go
index 9d3f3a669..366982e67 100644
--- a/test/turing.go
+++ b/test/turing.go
@@ -25,6 +25,7 @@ func scan(dir int) {
}
func main() {
+ r := ""
for {
switch prog[pc] {
case '>':
@@ -36,7 +37,7 @@ func main() {
case '-':
a[p]--
case '.':
- print(string(a[p]))
+ r += string(a[p])
case '[':
if a[p] == 0 {
scan(1)
@@ -46,6 +47,9 @@ func main() {
scan(-1)
}
default:
+ if r != "Hello World!\n" {
+ panic(r)
+ }
return
}
pc++