test: change several tests to not print
This will make these tests more meaningful for gccgo, which
runs tests in parallel and has no equivalent to golden.out.
Remove ken/simpprint.go since it duplicates helloworld.go.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5536058
diff --git a/test/peano.go b/test/peano.go
index fb74e65..dd4c36e 100644
--- a/test/peano.go
+++ b/test/peano.go
@@ -107,8 +107,16 @@
// -------------------------------------
// Factorial
+var results = [...]int{
+ 1, 1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 3628800,
+ 39916800, 479001600,
+}
+
func main() {
for i := 0; i <= 9; i++ {
- print(i, "! = ", count(fact(gen(i))), "\n")
+ if f := count(fact(gen(i))); f != results[i] {
+ println("FAIL:", i, "!:", f, "!=", results[i])
+ panic(0)
+ }
}
}