MCPcopy
hub / github.com/stretchr/testify / isNumericType

Function isNumericType

assert/assertions.go:201–203  ·  view source on GitHub ↗

isNumericType returns true if the type is one of: int, int8, int16, int32, int64, uint, uint8, uint16, uint32, uint64, float32, float64, complex64, complex128

(t reflect.Type)

Source from the content-addressed store, hash-verified

199// int, int8, int16, int32, int64, uint, uint8, uint16, uint32, uint64,
200// float32, float64, complex64, complex128
201func isNumericType(t reflect.Type) bool {
202 return t.Kind() >= reflect.Int && t.Kind() <= reflect.Complex128
203}
204
205/* CallerInfo is necessary because the assert functions use the testing object
206internally, causing it to print the file:line of the assert method, rather than where

Callers 1

ObjectsAreEqualValuesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected