1 // $G $F.go && $L $F.$A && ./$A.out
3 // Copyright 2009 The Go Authors. All rights reserved.
4 // Use of this source code is governed by a BSD-style
5 // license that can be found in the LICENSE file.
9 var a,b,c,d,e,f,g,h,i int;
13 println(a,b,c,d,e,f,g,h,i);
17 testit(permuteok bool) bool {
18 if a+b+c+d+e+f+g+h+i != 45 {
19 print("sum does not add to 45\n");
36 swap(x, y int) (u, v int) {
52 if !testit(false) { panic("init val\n"); }
54 for z:=0; z<100; z++ {
55 a,b,c,d, e,f,g,h,i = b,c,d,a, i,e,f,g,h;
57 if !testit(z%20 != 19) {
58 print("on ", z, "th iteration\n");
75 a, b = swap(swap(a, b));