diff options
Diffstat (limited to 'signer')
-rw-r--r-- | signer/core/signed_data_test.go | 10 | ||||
-rw-r--r-- | signer/rules/rules_test.go | 8 | ||||
-rw-r--r-- | signer/storage/aes_gcm_storage_test.go | 4 |
3 files changed, 11 insertions, 11 deletions
diff --git a/signer/core/signed_data_test.go b/signer/core/signed_data_test.go index 5a18defaa..69c1b60b4 100644 --- a/signer/core/signed_data_test.go +++ b/signer/core/signed_data_test.go @@ -321,11 +321,11 @@ func TestFormatter(t *testing.T) { } formatted, _ := d.Format() for _, item := range formatted { - fmt.Printf("'%v'\n", item.Pprint(0)) + t.Logf("'%v'\n", item.Pprint(0)) } j, _ := json.Marshal(formatted) - fmt.Printf("'%v'\n", string(j)) + t.Logf("'%v'\n", string(j)) } func sign(typedData core.TypedData) ([]byte, []byte, error) { @@ -364,7 +364,7 @@ func TestJsonFiles(t *testing.T) { continue } _, _, err = sign(typedData) - fmt.Printf("Error %v\n", err) + t.Logf("Error %v\n", err) if err != nil && !expectedFailure { t.Errorf("Test %d failed, file %v: %v", i, fInfo.Name(), err) } @@ -397,11 +397,11 @@ func TestFuzzerFiles(t *testing.T) { } _, err = typedData.EncodeData("EIP712Domain", typedData.Domain.Map(), 1) if verbose && err != nil { - fmt.Printf("%d, EncodeData[1] err: %v\n", i, err) + t.Logf("%d, EncodeData[1] err: %v\n", i, err) } _, err = typedData.EncodeData(typedData.PrimaryType, typedData.Message, 1) if verbose && err != nil { - fmt.Printf("%d, EncodeData[2] err: %v\n", i, err) + t.Logf("%d, EncodeData[2] err: %v\n", i, err) } typedData.Format() } diff --git a/signer/rules/rules_test.go b/signer/rules/rules_test.go index e1a23236c..f4976e5e6 100644 --- a/signer/rules/rules_test.go +++ b/signer/rules/rules_test.go @@ -178,7 +178,7 @@ func TestSignTxRequest(t *testing.T) { t.Error(err) return } - fmt.Printf("to %v", to.Address().String()) + t.Logf("to %v", to.Address().String()) resp, err := r.ApproveTx(&core.SignTxRequest{ Transaction: core.SendTxArgs{ From: *from, @@ -294,7 +294,7 @@ func TestMissingFunc(t *testing.T) { if approved { t.Errorf("Expected missing method to cause non-approval") } - fmt.Printf("Err %v", err) + t.Logf("Err %v", err) } func TestStorage(t *testing.T) { @@ -346,7 +346,7 @@ func TestStorage(t *testing.T) { if retval != exp { t.Errorf("Unexpected data, expected '%v', got '%v'", exp, retval) } - fmt.Printf("Err %v", err) + t.Logf("Err %v", err) } @@ -602,7 +602,7 @@ function ApproveSignData(r){ hash, rawdata := accounts.TextAndHash([]byte(message)) addr, _ := mixAddr("0x694267f14675d7e1b9494fd8d72fefe1755710fa") - fmt.Printf("address %v %v\n", addr.String(), addr.Original()) + t.Logf("address %v %v\n", addr.String(), addr.Original()) nvt := []*core.NameValueType{ { diff --git a/signer/storage/aes_gcm_storage_test.go b/signer/storage/aes_gcm_storage_test.go index 0aaaf58d2..49eb90884 100644 --- a/signer/storage/aes_gcm_storage_test.go +++ b/signer/storage/aes_gcm_storage_test.go @@ -38,13 +38,13 @@ func TestEncryption(t *testing.T) { if err != nil { t.Fatal(err) } - fmt.Printf("Ciphertext %x, nonce %x\n", c, iv) + t.Logf("Ciphertext %x, nonce %x\n", c, iv) p, err := decrypt(key, iv, c, nil) if err != nil { t.Fatal(err) } - fmt.Printf("Plaintext %v\n", string(p)) + t.Logf("Plaintext %v\n", string(p)) if !bytes.Equal(plaintext, p) { t.Errorf("Failed: expected plaintext recovery, got %v expected %v", string(plaintext), string(p)) } |