summaryrefslogtreecommitdiff
path: root/test/decl.go
diff options
context:
space:
mode:
authorAlan Donovan <adonovan@google.com>2013-02-12 13:17:49 -0500
committerAlan Donovan <adonovan@google.com>2013-02-12 13:17:49 -0500
commit2964e5a06ff1cdcbb9f23a3dcc316994346dcbf5 (patch)
treebc57754fdf4396941d23568fe2ac29485713e4c2 /test/decl.go
parent766708d9298221283199d661a846103a04434dc2 (diff)
downloadgo-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/decl.go')
-rw-r--r--test/decl.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/decl.go b/test/decl.go
index 6f84245f1..e2f126adb 100644
--- a/test/decl.go
+++ b/test/decl.go
@@ -33,8 +33,9 @@ func main() {
m, h, s := f3()
_, _, _, _, _, _, _, _, _ = i, f, s, j, k, m, g, s, h
}
- if x() != "3" {
- println("x() failed")
+ if y := x(); y != "3" {
+ println("x() failed", y)
+ panic("fail")
}
_, _, _, _, _, _, _, _, _ = i, f, s, j, k, m, g, s, h
}