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 | 052c942e20576f01f72d226d11aaf11e721009f3 (patch) | |
tree | a79450e9c97ad9bc9cac6b75655421c488408bd4 /test/defer.go | |
parent | 2fdd60b9b66f26720ea571345785285d4037dce5 (diff) | |
download | go-052c942e20576f01f72d226d11aaf11e721009f3.tar.gz go-052c942e20576f01f72d226d11aaf11e721009f3.zip |
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://golang.org/cl/7310087
Diffstat (limited to 'test/defer.go')
-rw-r--r-- | test/defer.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/defer.go b/test/defer.go index 2f67d35609..6731ab7ee8 100644 --- a/test/defer.go +++ b/test/defer.go @@ -25,6 +25,7 @@ func test1() { test1helper() if result != "9876543210" { fmt.Printf("test1: bad defer result (should be 9876543210): %q\n", result) + panic("defer") } } @@ -41,6 +42,7 @@ func test2() { test2helper() if result != "9876543210" { fmt.Printf("test2: bad defer result (should be 9876543210): %q\n", result) + panic("defer") } } |