From 1d99af29c73bc93e751f1679a5aa59cdd1bd2e84 Mon Sep 17 00:00:00 2001 From: Wilmer Paulino Date: Fri, 6 Jul 2018 13:06:00 -0700 Subject: [PATCH] btcjson: fix formatting directives --- btcjson/chainsvrcmds_test.go | 4 ++-- btcjson/cmdparse_test.go | 12 ++++++------ btcjson/help_test.go | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/btcjson/chainsvrcmds_test.go b/btcjson/chainsvrcmds_test.go index 12fba7d9..0b3c7b7c 100644 --- a/btcjson/chainsvrcmds_test.go +++ b/btcjson/chainsvrcmds_test.go @@ -1191,8 +1191,8 @@ func TestChainSvrCmdErrors(t *testing.T) { for i, test := range tests { err := json.Unmarshal([]byte(test.marshalled), &test.result) if reflect.TypeOf(err) != reflect.TypeOf(test.err) { - t.Errorf("Test #%d (%s) wrong error - got %T (%[2]v), "+ - "want %T", i, test.name, err, test.err) + t.Errorf("Test #%d (%s) wrong error - got %T (%v), "+ + "want %T", i, test.name, err, err, test.err) continue } diff --git a/btcjson/cmdparse_test.go b/btcjson/cmdparse_test.go index 2f8fa1fb..7c13a0bb 100644 --- a/btcjson/cmdparse_test.go +++ b/btcjson/cmdparse_test.go @@ -387,8 +387,8 @@ func TestNewCmdErrors(t *testing.T) { for i, test := range tests { _, err := btcjson.NewCmd(test.method, test.args...) if reflect.TypeOf(err) != reflect.TypeOf(test.err) { - t.Errorf("Test #%d (%s) wrong error - got %T (%[2]v), "+ - "want %T", i, test.name, err, test.err) + t.Errorf("Test #%d (%s) wrong error - got %T (%v), "+ + "want %T", i, test.name, err, err, test.err) continue } gotErrorCode := err.(btcjson.Error).ErrorCode @@ -435,8 +435,8 @@ func TestMarshalCmdErrors(t *testing.T) { for i, test := range tests { _, err := btcjson.MarshalCmd(test.id, test.cmd) if reflect.TypeOf(err) != reflect.TypeOf(test.err) { - t.Errorf("Test #%d (%s) wrong error - got %T (%[2]v), "+ - "want %T", i, test.name, err, test.err) + t.Errorf("Test #%d (%s) wrong error - got %T (%v), "+ + "want %T", i, test.name, err, err, test.err) continue } gotErrorCode := err.(btcjson.Error).ErrorCode @@ -504,8 +504,8 @@ func TestUnmarshalCmdErrors(t *testing.T) { for i, test := range tests { _, err := btcjson.UnmarshalCmd(&test.request) if reflect.TypeOf(err) != reflect.TypeOf(test.err) { - t.Errorf("Test #%d (%s) wrong error - got %T (%[2]v), "+ - "want %T", i, test.name, err, test.err) + t.Errorf("Test #%d (%s) wrong error - got %T (%v), "+ + "want %T", i, test.name, err, err, test.err) continue } gotErrorCode := err.(btcjson.Error).ErrorCode diff --git a/btcjson/help_test.go b/btcjson/help_test.go index 265e0c2c..918aa144 100644 --- a/btcjson/help_test.go +++ b/btcjson/help_test.go @@ -699,8 +699,8 @@ func TestGenerateHelpErrors(t *testing.T) { _, err := btcjson.GenerateHelp(test.method, nil, test.resultTypes...) if reflect.TypeOf(err) != reflect.TypeOf(test.err) { - t.Errorf("Test #%d (%s) wrong error - got %T (%[2]v), "+ - "want %T", i, test.name, err, test.err) + t.Errorf("Test #%d (%s) wrong error - got %T (%v), "+ + "want %T", i, test.name, err, err, test.err) continue } gotErrorCode := err.(btcjson.Error).ErrorCode