delete all uses of panicln by rewriting them using panic or,
in the tests, println+panic.
gofmt some tests too.
R=rsc
CC=golang-dev
https://golang.org/cl/741041
diff --git a/test/fixedbugs/bug185.go b/test/fixedbugs/bug185.go
index 7f4bcb2..acae174 100644
--- a/test/fixedbugs/bug185.go
+++ b/test/fixedbugs/bug185.go
@@ -6,28 +6,30 @@
package main
-func g() { }
+func g() {}
func f1() (a, b int) {
- a, b = 2, 1;
- g(); // defeat optimizer
- return a, b;
+ a, b = 2, 1
+ g() // defeat optimizer
+ return a, b
}
func f2() (a, b int) {
- a, b = 1, 2;
- g(); // defeat optimizer
- return b, a;
+ a, b = 1, 2
+ g() // defeat optimizer
+ return b, a
}
func main() {
- x, y := f1();
+ x, y := f1()
if x != 2 || y != 1 {
- panicln("f1", x, y);
+ println("f1", x, y)
+ panic("fail")
}
- x, y = f2();
+ x, y = f2()
if x != 2 || y != 1 {
- panicln("f2", x, y);
+ println("f2", x, y)
+ panic("fail")
}
}