From 2964e5a06ff1cdcbb9f23a3dcc316994346dcbf5 Mon Sep 17 00:00:00 2001 From: Alan Donovan Date: Tue, 12 Feb 2013 13:17:49 -0500 Subject: 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 --- test/decl.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'test/decl.go') 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 } -- cgit v1.2.1