diff options
author | Ricardo Domingos <ricardohsd@gmail.com> | 2018-04-04 19:42:36 +0800 |
---|---|---|
committer | Felix Lange <fjl@users.noreply.github.com> | 2018-04-04 19:42:36 +0800 |
commit | 6ab9f0a19fbf548a78d08a526f522f41d8175a4e (patch) | |
tree | 49f515b8cf0550ec70f3a3daa3989a3499243aa5 /accounts/abi/unpack_test.go | |
parent | 7aad81f8815084c8ed032705fbaf6d3710e518cf (diff) | |
download | go-tangerine-6ab9f0a19fbf548a78d08a526f522f41d8175a4e.tar go-tangerine-6ab9f0a19fbf548a78d08a526f522f41d8175a4e.tar.gz go-tangerine-6ab9f0a19fbf548a78d08a526f522f41d8175a4e.tar.bz2 go-tangerine-6ab9f0a19fbf548a78d08a526f522f41d8175a4e.tar.lz go-tangerine-6ab9f0a19fbf548a78d08a526f522f41d8175a4e.tar.xz go-tangerine-6ab9f0a19fbf548a78d08a526f522f41d8175a4e.tar.zst go-tangerine-6ab9f0a19fbf548a78d08a526f522f41d8175a4e.zip |
accounts/abi: improve test coverage (#16044)
Diffstat (limited to 'accounts/abi/unpack_test.go')
-rw-r--r-- | accounts/abi/unpack_test.go | 17 |
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), |