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

Function TestJSONTopLevelSliceWithError

map_test.go:236–244  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

234}
235
236func TestJSONTopLevelSliceWithError(t *testing.T) {
237 slice, err := objx.FromJSONSlice(`{"id": 10000001}`)
238
239 assert.Error(t, err)
240 assert.Nil(t, slice)
241 assert.Panics(t, func() {
242 _ = objx.MustFromJSONSlice(`{"id": 10000001}`)
243 })
244}

Callers

nothing calls this directly

Calls 5

FromJSONSliceFunction · 0.92
MustFromJSONSliceFunction · 0.92
ErrorMethod · 0.45
NilMethod · 0.45
PanicsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…