aboutsummaryrefslogtreecommitdiffstats
path: root/rpc/args_test.go
diff options
context:
space:
mode:
authorTaylor Gerring <taylor.gerring@gmail.com>2015-03-26 20:45:06 +0800
committerTaylor Gerring <taylor.gerring@gmail.com>2015-03-26 20:45:06 +0800
commita49c81547ce32125917c0127c94c9845750e9e30 (patch)
tree89687e9e4ee4716ed3325e1e28c0a3e0bdd3b4f6 /rpc/args_test.go
parentca03e976976a03d278da227fe1ec9966f23484ba (diff)
downloadgo-tangerine-a49c81547ce32125917c0127c94c9845750e9e30.tar
go-tangerine-a49c81547ce32125917c0127c94c9845750e9e30.tar.gz
go-tangerine-a49c81547ce32125917c0127c94c9845750e9e30.tar.bz2
go-tangerine-a49c81547ce32125917c0127c94c9845750e9e30.tar.lz
go-tangerine-a49c81547ce32125917c0127c94c9845750e9e30.tar.xz
go-tangerine-a49c81547ce32125917c0127c94c9845750e9e30.tar.zst
go-tangerine-a49c81547ce32125917c0127c94c9845750e9e30.zip
DecodeParamError -> InvalidTypeError for unexpected input type
Diffstat (limited to 'rpc/args_test.go')
-rw-r--r--rpc/args_test.go52
1 files changed, 26 insertions, 26 deletions
diff --git a/rpc/args_test.go b/rpc/args_test.go
index 4792f4f88..7dec5d8f4 100644
--- a/rpc/args_test.go
+++ b/rpc/args_test.go
@@ -99,10 +99,10 @@ func TestGetBalanceArgsBlockInvalid(t *testing.T) {
switch err.(type) {
case nil:
t.Error("Expected error but didn't get one")
- case *DecodeParamError:
+ case *InvalidTypeError:
break
default:
- t.Errorf("Expected *rpc.DecodeParamError but got %T with message %s", err, err.Error())
+ t.Errorf("Expected *rpc.InvalidTypeError but got %T with message %s", err, err.Error())
}
}
@@ -114,10 +114,10 @@ func TestGetBalanceArgsAddressInvalid(t *testing.T) {
switch err.(type) {
case nil:
t.Error("Expected error but didn't get one")
- case *DecodeParamError:
+ case *InvalidTypeError:
break
default:
- t.Errorf("Expected *rpc.DecodeParamError but got %T with message %s", err, err.Error())
+ t.Errorf("Expected *rpc.InvalidTypeError but got %T with message %s", err, err.Error())
}
}
@@ -179,10 +179,10 @@ func TestGetBlockByHashArgsHashInt(t *testing.T) {
switch err.(type) {
case nil:
t.Error("Expected error but didn't get one")
- case *DecodeParamError:
+ case *InvalidTypeError:
break
default:
- t.Errorf("Expected *rpc.DecodeParamError but got %T with message %s", err, err.Error())
+ t.Errorf("Expected *rpc.InvalidTypeError but got %T with message %s", err, err.Error())
}
}
@@ -249,10 +249,10 @@ func TestGetBlockByNumberBool(t *testing.T) {
switch err.(type) {
case nil:
t.Error("Expected error but didn't get one")
- case *DecodeParamError:
+ case *InvalidTypeError:
break
default:
- t.Errorf("Expected *rpc.DecodeParamError but got %T with message `%s`", err, err.Error())
+ t.Errorf("Expected *rpc.InvalidTypeError but got %T with message `%s`", err, err.Error())
}
}
func TestGetBlockByNumberBlockObject(t *testing.T) {
@@ -352,10 +352,10 @@ func TestNewTxArgsBlockInvalid(t *testing.T) {
switch err.(type) {
case nil:
t.Error("Expected error but didn't get one")
- case *DecodeParamError:
+ case *InvalidTypeError:
break
default:
- t.Errorf("Expeted *rpc.DecodeParamError but got %T with message `%s`", err, err.Error())
+ t.Errorf("Expeted *rpc.InvalidTypeError but got %T with message `%s`", err, err.Error())
}
}
@@ -462,10 +462,10 @@ func TestGetStorageInvalidBlockheight(t *testing.T) {
switch err.(type) {
case nil:
t.Error("Expected error but didn't get one")
- case *DecodeParamError:
+ case *InvalidTypeError:
break
default:
- t.Errorf("Expected *rpc.DecodeParamError but got %T with message `%s`", err, err.Error())
+ t.Errorf("Expected *rpc.InvalidTypeError but got %T with message `%s`", err, err.Error())
}
}
@@ -492,10 +492,10 @@ func TestGetStorageAddressInt(t *testing.T) {
switch err.(type) {
case nil:
t.Error("Expected error but didn't get one")
- case *DecodeParamError:
+ case *InvalidTypeError:
break
default:
- t.Errorf("Expected *rpc.DecodeParamError but got %T with message `%s`", err, err.Error())
+ t.Errorf("Expected *rpc.InvalidTypeError but got %T with message `%s`", err, err.Error())
}
}
@@ -562,10 +562,10 @@ func TestGetStorageAtArgsAddressNotString(t *testing.T) {
switch err.(type) {
case nil:
t.Error("Expected error but didn't get one")
- case *DecodeParamError:
+ case *InvalidTypeError:
break
default:
- t.Errorf("Expected *rpc.DecodeParamError but got %T with message `%s`", err, err.Error())
+ t.Errorf("Expected *rpc.InvalidTypeError but got %T with message `%s`", err, err.Error())
}
}
@@ -577,10 +577,10 @@ func TestGetStorageAtArgsKeyNotString(t *testing.T) {
switch err.(type) {
case nil:
t.Error("Expected error but didn't get one")
- case *DecodeParamError:
+ case *InvalidTypeError:
break
default:
- t.Errorf("Expected *rpc.DecodeParamError but got %T with message `%s`", err, err.Error())
+ t.Errorf("Expected *rpc.InvalidTypeError but got %T with message `%s`", err, err.Error())
}
}
@@ -592,10 +592,10 @@ func TestGetStorageAtArgsValueNotString(t *testing.T) {
switch err.(type) {
case nil:
t.Error("Expected error but didn't get one")
- case *DecodeParamError:
+ case *InvalidTypeError:
break
default:
- t.Errorf("Expected *rpc.DecodeParamError but got %T with message `%s`", err, err.Error())
+ t.Errorf("Expected *rpc.InvalidTypeError but got %T with message `%s`", err, err.Error())
}
}
@@ -657,10 +657,10 @@ func TestGetTxCountAddressNotString(t *testing.T) {
switch err.(type) {
case nil:
t.Error("Expected error but didn't get one")
- case *DecodeParamError:
+ case *InvalidTypeError:
break
default:
- t.Errorf("Expected *rpc.DecodeParamError but got %T with message `%s`", err, err.Error())
+ t.Errorf("Expected *rpc.InvalidTypeError but got %T with message `%s`", err, err.Error())
}
}
@@ -672,10 +672,10 @@ func TestGetTxCountBlockheightInvalid(t *testing.T) {
switch err.(type) {
case nil:
t.Error("Expected error but didn't get one")
- case *DecodeParamError:
+ case *InvalidTypeError:
break
default:
- t.Errorf("Expected *rpc.DecodeParamError but got %T with message `%s`", err, err.Error())
+ t.Errorf("Expected *rpc.InvalidTypeError but got %T with message `%s`", err, err.Error())
}
}
@@ -791,10 +791,10 @@ func TestBlockFilterArgsNums(t *testing.T) {
args := new(BlockFilterArgs)
err := json.Unmarshal([]byte(input), &args)
switch err.(type) {
- case *DecodeParamError:
+ case *InvalidTypeError:
break
default:
- t.Errorf("Should have *DecodeParamError but instead have %T", err)
+ t.Errorf("Should have *rpc.InvalidTypeError but instead have %T", err)
}
}