aboutsummaryrefslogtreecommitdiffstats
path: root/accounts/abi/unpack_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'accounts/abi/unpack_test.go')
-rw-r--r--accounts/abi/unpack_test.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/accounts/abi/unpack_test.go b/accounts/abi/unpack_test.go
index ee6256709..bdbab10b4 100644
--- a/accounts/abi/unpack_test.go
+++ b/accounts/abi/unpack_test.go
@@ -57,6 +57,23 @@ var unpackTests = []unpackTest{
want: true,
},
{
+ def: `[{ "type": "bool" }]`,
+ enc: "0000000000000000000000000000000000000000000000000000000000000000",
+ want: false,
+ },
+ {
+ def: `[{ "type": "bool" }]`,
+ enc: "0000000000000000000000000000000000000000000000000001000000000001",
+ want: false,
+ err: "abi: improperly encoded boolean value",
+ },
+ {
+ def: `[{ "type": "bool" }]`,
+ enc: "0000000000000000000000000000000000000000000000000000000000000003",
+ want: false,
+ err: "abi: improperly encoded boolean value",
+ },
+ {
def: `[{"type": "uint32"}]`,
enc: "0000000000000000000000000000000000000000000000000000000000000001",
want: uint32(1),