aboutsummaryrefslogtreecommitdiffstats
path: root/accounts/abi/numbers.go
diff options
context:
space:
mode:
authorRicardo Domingos <ricardohsd@gmail.com>2018-04-04 19:42:36 +0800
committerFelix Lange <fjl@users.noreply.github.com>2018-04-04 19:42:36 +0800
commit6ab9f0a19fbf548a78d08a526f522f41d8175a4e (patch)
tree49f515b8cf0550ec70f3a3daa3989a3499243aa5 /accounts/abi/numbers.go
parent7aad81f8815084c8ed032705fbaf6d3710e518cf (diff)
downloadgo-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/numbers.go')
-rw-r--r--accounts/abi/numbers.go36
1 files changed, 18 insertions, 18 deletions
diff --git a/accounts/abi/numbers.go b/accounts/abi/numbers.go
index 9ad99f90d..0cd97cc66 100644
--- a/accounts/abi/numbers.go
+++ b/accounts/abi/numbers.go
@@ -25,23 +25,23 @@ import (
)
var (
- big_t = reflect.TypeOf(&big.Int{})
- derefbig_t = reflect.TypeOf(big.Int{})
- uint8_t = reflect.TypeOf(uint8(0))
- uint16_t = reflect.TypeOf(uint16(0))
- uint32_t = reflect.TypeOf(uint32(0))
- uint64_t = reflect.TypeOf(uint64(0))
- int_t = reflect.TypeOf(int(0))
- int8_t = reflect.TypeOf(int8(0))
- int16_t = reflect.TypeOf(int16(0))
- int32_t = reflect.TypeOf(int32(0))
- int64_t = reflect.TypeOf(int64(0))
- address_t = reflect.TypeOf(common.Address{})
- int_ts = reflect.TypeOf([]int(nil))
- int8_ts = reflect.TypeOf([]int8(nil))
- int16_ts = reflect.TypeOf([]int16(nil))
- int32_ts = reflect.TypeOf([]int32(nil))
- int64_ts = reflect.TypeOf([]int64(nil))
+ bigT = reflect.TypeOf(&big.Int{})
+ derefbigT = reflect.TypeOf(big.Int{})
+ uint8T = reflect.TypeOf(uint8(0))
+ uint16T = reflect.TypeOf(uint16(0))
+ uint32T = reflect.TypeOf(uint32(0))
+ uint64T = reflect.TypeOf(uint64(0))
+ intT = reflect.TypeOf(int(0))
+ int8T = reflect.TypeOf(int8(0))
+ int16T = reflect.TypeOf(int16(0))
+ int32T = reflect.TypeOf(int32(0))
+ int64T = reflect.TypeOf(int64(0))
+ addressT = reflect.TypeOf(common.Address{})
+ intTS = reflect.TypeOf([]int(nil))
+ int8TS = reflect.TypeOf([]int8(nil))
+ int16TS = reflect.TypeOf([]int16(nil))
+ int32TS = reflect.TypeOf([]int32(nil))
+ int64TS = reflect.TypeOf([]int64(nil))
)
// U256 converts a big Int into a 256bit EVM number.
@@ -52,7 +52,7 @@ func U256(n *big.Int) []byte {
// checks whether the given reflect value is signed. This also works for slices with a number type
func isSigned(v reflect.Value) bool {
switch v.Type() {
- case int_ts, int8_ts, int16_ts, int32_ts, int64_ts, int_t, int8_t, int16_t, int32_t, int64_t:
+ case intTS, int8TS, int16TS, int32TS, int64TS, intT, int8T, int16T, int32T, int64T:
return true
}
return false