MCPcopy Create free account
hub / github.com/stretchr/objx / TestStringSliceTypeInt

Function TestStringSliceTypeInt

value_test.go:93–107  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

91}
92
93func TestStringSliceTypeInt(t *testing.T) {
94 m := objx.Map{
95 "int": []int{1, 2},
96 "int8": []int8{8, 9},
97 "int16": []int16{16, 17},
98 "int32": []int32{32, 33},
99 "int64": []int64{64, 65},
100 }
101
102 assert.Equal(t, []string{"1", "2"}, m.Get("int").StringSlice())
103 assert.Equal(t, []string{"8", "9"}, m.Get("int8").StringSlice())
104 assert.Equal(t, []string{"16", "17"}, m.Get("int16").StringSlice())
105 assert.Equal(t, []string{"32", "33"}, m.Get("int32").StringSlice())
106 assert.Equal(t, []string{"64", "65"}, m.Get("int64").StringSlice())
107}
108
109func TestStringSliceTypeUint(t *testing.T) {
110 m := objx.Map{

Callers

nothing calls this directly

Calls 3

GetMethod · 0.95
StringSliceMethod · 0.80
EqualMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…