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/reflect.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/reflect.go')
-rw-r--r-- | accounts/abi/reflect.go | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/accounts/abi/reflect.go b/accounts/abi/reflect.go index 2e6bf7098..5620a7084 100644 --- a/accounts/abi/reflect.go +++ b/accounts/abi/reflect.go @@ -24,7 +24,7 @@ import ( // indirect recursively dereferences the value until it either gets the value // or finds a big.Int func indirect(v reflect.Value) reflect.Value { - if v.Kind() == reflect.Ptr && v.Elem().Type() != derefbig_t { + if v.Kind() == reflect.Ptr && v.Elem().Type() != derefbigT { return indirect(v.Elem()) } return v @@ -36,26 +36,26 @@ func reflectIntKindAndType(unsigned bool, size int) (reflect.Kind, reflect.Type) switch size { case 8: if unsigned { - return reflect.Uint8, uint8_t + return reflect.Uint8, uint8T } - return reflect.Int8, int8_t + return reflect.Int8, int8T case 16: if unsigned { - return reflect.Uint16, uint16_t + return reflect.Uint16, uint16T } - return reflect.Int16, int16_t + return reflect.Int16, int16T case 32: if unsigned { - return reflect.Uint32, uint32_t + return reflect.Uint32, uint32T } - return reflect.Int32, int32_t + return reflect.Int32, int32T case 64: if unsigned { - return reflect.Uint64, uint64_t + return reflect.Uint64, uint64T } - return reflect.Int64, int64_t + return reflect.Int64, int64T } - return reflect.Ptr, big_t + return reflect.Ptr, bigT } // mustArrayToBytesSlice creates a new byte slice with the exact same size as value |