diff options
author | Alan Donovan <adonovan@google.com> | 2013-02-12 13:17:49 -0500 |
---|---|---|
committer | Alan Donovan <adonovan@google.com> | 2013-02-12 13:17:49 -0500 |
commit | 2964e5a06ff1cdcbb9f23a3dcc316994346dcbf5 (patch) | |
tree | bc57754fdf4396941d23568fe2ac29485713e4c2 /test/const4.go | |
parent | 766708d9298221283199d661a846103a04434dc2 (diff) | |
download | go-2964e5a06ff1cdcbb9f23a3dcc316994346dcbf5.tar.gz |
test: ensure all failing tests exit nonzero.
Previously merely printing an error would cause the golden
file comparison (in 'bash run') to fail, but that is no longer
the case with the new run.go driver.
R=iant
CC=golang-dev
https://codereview.appspot.com/7310087
Diffstat (limited to 'test/const4.go')
-rw-r--r-- | test/const4.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test/const4.go b/test/const4.go index 677fcefa7..2fb2d0664 100644 --- a/test/const4.go +++ b/test/const4.go @@ -9,7 +9,7 @@ package main var b struct { - a[10]int + a [10]int } var m map[string][20]int @@ -61,17 +61,22 @@ var c1 = func() chan *[70]int { func main() { if n1 != 10 || n2 != 20 || n3 != 30 || n4 != 40 || n5 != 50 || n6 != 60 || n7 != 70 { println("BUG:", n1, n2, n3, n4, n5, n6, n7) + panic("fail") } if !calledF { println("BUG: did not call f") + panic("fail") } if <-c == nil { println("BUG: did not receive from c") + panic("fail") } if !calledG { println("BUG: did not call g") + panic("fail") } if <-c1 == nil { println("BUG: did not receive from c1") + panic("fail") } } |