OSDN Git Service

make test build failed (#457)
authorWangYifu <lbqds@cryptape.com>
Thu, 22 Mar 2018 05:43:45 +0000 (13:43 +0800)
committerYongfeng LI <wliyongfeng@gmail.com>
Thu, 22 Mar 2018 05:43:45 +0000 (13:43 +0800)
blockchain/account/accounts_test.go
protocol/bc/tx_status_test.go
protocol/validation/validation_test.go
protocol/validation/vmcontext_test.go

index c88055a..be40806 100644 (file)
@@ -30,7 +30,7 @@ func TestCreateAccount(t *testing.T) {
                t.Errorf("unexpected error %v", err)
        }
        if !testutil.DeepEqual(account, found) {
-               t.Errorf("expected account %s to be recorded as %s", account, found)
+               t.Errorf("expected account %v to be recorded as %v", account, found)
        }
 }
 
index 7b7ca85..2aab128 100644 (file)
@@ -89,7 +89,7 @@ func TestSetBits(t *testing.T) {
                                t.Error(err)
                        }
                        if result != v {
-                               t.Errorf("bad result, %d want %s get %s", i, v, result)
+                               t.Errorf("bad result, %d want %t get %t", i, v, result)
                        }
                }
                if len(ts.Bitmap) != (len(c.result)+7)/bitsPerByte {
index a1e4175..6286d70 100644 (file)
@@ -117,7 +117,7 @@ func TestGasStatus(t *testing.T) {
                if rootErr(err) != c.err {
                        t.Errorf("case %d: got error %s, want %s", i, err, c.err)
                } else if *c.input != *c.output {
-                       t.Errorf("case %d: gasStatus %s, want %s;", i, c.input, c.output)
+                       t.Errorf("case %d: gasStatus %v, want %v;", i, c.input, c.output)
                }
        }
 }
@@ -480,7 +480,7 @@ func TestCoinbase(t *testing.T) {
                        t.Errorf("#%d got error %s, want %s", i, err, c.err)
                }
                if c.GasVaild != gasStatus.GasVaild {
-                       t.Errorf("#%d got GasVaild %s, want %s", i, gasStatus.GasVaild, c.GasVaild)
+                       t.Errorf("#%d got GasVaild %t, want %t", i, gasStatus.GasVaild, c.GasVaild)
                }
        }
 }
index b572131..c9e3996 100644 (file)
@@ -79,13 +79,13 @@ func TestCheckOutput(t *testing.T) {
                t.Run(fmt.Sprintf("case %d", i), func(t *testing.T) {
                        gotOk, err := txCtx.checkOutput(test.index, test.amount, test.assetID, test.vmVersion, test.code, false)
                        if g := errors.Root(err); g != test.wantErr {
-                               t.Errorf("checkOutput(%v, %v, %v, %x, %v, %x) err = %v, want %v",
+                               t.Errorf("checkOutput(%v, %v, %x, %v, %x) err = %v, want %v",
                                        test.index, test.amount, test.assetID, test.vmVersion, test.code,
                                        g, test.wantErr)
                                return
                        }
                        if gotOk != test.wantOk {
-                               t.Errorf("checkOutput(%v, %v, %v, %x, %v, %x) ok = %v, want %v",
+                               t.Errorf("checkOutput(%v, %v, %x, %v, %x) ok = %t, want %v",
                                        test.index, test.amount, test.assetID, test.vmVersion, test.code,
                                        gotOk, test.wantOk)
                        }