diff --git a/signer/rules/rules_test.go b/signer/rules/rules_test.go index 19d9049c72..95379086a9 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) { @@ -347,7 +347,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) } @@ -605,7 +605,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 a421a8449d..dbda6ee594 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)) }