]> Cypherpunks repositories - gostls13.git/commitdiff
net/rpc/jsonrpc: fix test error message
authorRuss Cox <rsc@golang.org>
Wed, 12 Sep 2012 21:37:39 +0000 (17:37 -0400)
committerRuss Cox <rsc@golang.org>
Wed, 12 Sep 2012 21:37:39 +0000 (17:37 -0400)
Fixes #4041.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/6495121

src/pkg/net/rpc/jsonrpc/all_test.go

index 71ae5fc519d7a5af977f0c741aec558319e998a0..3c7c4d48fa66f6860dfee2e30a78596bdf7b7c28 100644 (file)
@@ -131,7 +131,7 @@ func TestClient(t *testing.T) {
                t.Errorf("Add: expected no error but got string %q", err.Error())
        }
        if reply.C != args.A+args.B {
-               t.Errorf("Add: expected %d got %d", reply.C, args.A+args.B)
+               t.Errorf("Add: got %d expected %d", reply.C, args.A+args.B)
        }
 
        args = &Args{7, 8}
@@ -141,7 +141,7 @@ func TestClient(t *testing.T) {
                t.Errorf("Mul: expected no error but got string %q", err.Error())
        }
        if reply.C != args.A*args.B {
-               t.Errorf("Mul: expected %d got %d", reply.C, args.A*args.B)
+               t.Errorf("Mul: got %d expected %d", reply.C, args.A*args.B)
        }
 
        // Out of order.
@@ -156,7 +156,7 @@ func TestClient(t *testing.T) {
                t.Errorf("Add: expected no error but got string %q", addCall.Error.Error())
        }
        if addReply.C != args.A+args.B {
-               t.Errorf("Add: expected %d got %d", addReply.C, args.A+args.B)
+               t.Errorf("Add: got %d expected %d", addReply.C, args.A+args.B)
        }
 
        mulCall = <-mulCall.Done
@@ -164,7 +164,7 @@ func TestClient(t *testing.T) {
                t.Errorf("Mul: expected no error but got string %q", mulCall.Error.Error())
        }
        if mulReply.C != args.A*args.B {
-               t.Errorf("Mul: expected %d got %d", mulReply.C, args.A*args.B)
+               t.Errorf("Mul: got %d expected %d", mulReply.C, args.A*args.B)
        }
 
        // Error test