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

Function TestStringSliceTypeUint

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

Source from the content-addressed store, hash-verified

107}
108
109func TestStringSliceTypeUint(t *testing.T) {
110 m := objx.Map{
111 "uint": []uint{1, 2},
112 "uint8": []uint8{8, 9},
113 "uint16": []uint16{16, 17},
114 "uint32": []uint32{32, 33},
115 "uint64": []uint64{64, 65},
116 }
117
118 assert.Equal(t, []string{"1", "2"}, m.Get("uint").StringSlice())
119 assert.Equal(t, []string{"8", "9"}, m.Get("uint8").StringSlice())
120 assert.Equal(t, []string{"16", "17"}, m.Get("uint16").StringSlice())
121 assert.Equal(t, []string{"32", "33"}, m.Get("uint32").StringSlice())
122 assert.Equal(t, []string{"64", "65"}, m.Get("uint64").StringSlice())
123}
124
125func TestStringSliceTypeFloat(t *testing.T) {
126 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…