btcjson: fix formatting directives
This commit is contained in:
parent
a26e2634fa
commit
1d99af29c7
3 changed files with 10 additions and 10 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue