]> Cypherpunks.ru repositories - gostls13.git/commitdiff
missed a couple of files in test
authorRobert Griesemer <gri@golang.org>
Thu, 10 Dec 2009 05:39:20 +0000 (21:39 -0800)
committerRobert Griesemer <gri@golang.org>
Thu, 10 Dec 2009 05:39:20 +0000 (21:39 -0800)
R=rsc, r
https://golang.org/cl/172045

test/chan/powser2.go
test/simassign.go

index afd126f07d620c9c8cb21e89fa443b2a7079242a..0c523ac99712fcc2f56a109c78a12bac50ce0eef 100644 (file)
@@ -28,8 +28,11 @@ type item interface {
 }
 
 func (u *rat) pr(){
-       if u.den==1 { print(u.num) }
-       else { print(u.num, "/", u.den) }
+       if u.den==1 {
+               print(u.num)
+       } else {
+               print(u.num, "/", u.den)
+       }
        print(" ")
 }
 
@@ -273,8 +276,7 @@ func inv(u *rat) *rat{      // invert a rat
 }
 
 // print eval in floating point of PS at x=c to n terms
-func Evaln(c *rat, U PS, n int)
-{
+func Evaln(c *rat, U PS, n int) {
        xn := float64(1);
        x := float64(c.num)/float64(c.den);
        val := float64(0);
@@ -294,8 +296,11 @@ func Printn(U PS, n int){
        done := false;
        for ; !done && n>0; n-- {
                u := get(U);
-               if end(u) != 0 { done = true }
-               else { u.pr() }
+               if end(u) != 0 {
+                       done = true
+               } else {
+                       u.pr()
+               }
        }
        print(("\n"));
 }
@@ -357,8 +362,11 @@ func Cmul(c *rat,U PS) PS{
                for !done {
                        <-Z.req;
                        u := get(U);
-                       if end(u) != 0 { done = true }
-                       else { Z.dat <- mul(c,u) }
+                       if end(u) != 0 {
+                               done = true
+                       } else {
+                               Z.dat <- mul(c,u)
+                       }
                }
                Z.dat <- finis;
        }(c, U, Z);
@@ -474,8 +482,9 @@ func Diff(U PS) PS{
                        done:=false;
                        for i:=1; !done; i++ {
                                u = get(U);
-                               if end(u) != 0 { done=true }
-                               else {
+                               if end(u) != 0 {
+                                       done=true
+                               } else {
                                        Z.dat <- mul(itor(int64(i)),u);
                                        <-Z.req;
                                }
@@ -569,8 +578,11 @@ func Subst(U, V PS) PS {
                u := get(U);
                Z.dat <- u;
                if end(u) == 0 {
-                       if end(get(VV[0])) != 0 { put(finis,Z); }
-                       else { copy(Mul(VV[0],Subst(U,VV[1])),Z); }
+                       if end(get(VV[0])) != 0 {
+                               put(finis,Z);
+                       } else {
+                               copy(Mul(VV[0],Subst(U,VV[1])),Z);
+                       }
                }
        }(U, V, Z);
        return Z;
index ce86d48dbcd6bdc79ffc8628a96cf1844a919924..16f5a571433ca8c8345462fef5b3411efdc58560 100644 (file)
@@ -9,14 +9,12 @@ package main
 var    a,b,c,d,e,f,g,h,i int;
 
 func
-printit()
-{
+printit() {
        println(a,b,c,d,e,f,g,h,i);
 }
 
 func
-testit(permuteok bool) bool
-{
+testit(permuteok bool) bool {
        if a+b+c+d+e+f+g+h+i != 45 {
                print("sum does not add to 45\n");
                printit();
@@ -40,8 +38,7 @@ swap(x, y int) (u, v int) {
 }
 
 func
-main()
-{
+main() {
        a = 1;
        b = 2;
        c = 3;