MCPcopy Index your code
hub / github.com/cortexlabs/cortex / TestInterfaceToInt8

Function TestInterfaceToInt8

pkg/lib/cast/interface_test.go:150–163  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

148}
149
150func TestInterfaceToInt8(t *testing.T) {
151 var out int8
152 var ok bool
153
154 out, ok = InterfaceToInt8(int(1))
155 require.True(t, ok)
156 require.Equal(t, int8(1), out)
157
158 _, ok = InterfaceToInt8(float32(2))
159 require.False(t, ok)
160
161 _, ok = InterfaceToInt8("test")
162 require.False(t, ok)
163}
164
165func TestInterfaceToInterfaceInterfaceMap(t *testing.T) {
166 var ok bool

Callers

nothing calls this directly

Calls 2

InterfaceToInt8Function · 0.85
EqualMethod · 0.80

Tested by

no test coverage detected