MCPcopy
hub / github.com/pquerna/ffjson / TestSlice

Function TestSlice

tests/ff_test.go:448–458  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

446}
447
448func TestSlice(t *testing.T) {
449 testType(t, &Tslice{X: []int{}}, &Xslice{X: []int{}})
450 testCycle(t, &Tslice{X: []int{42, -42, 44}}, &Xslice{X: []int{}})
451
452 x := Xslice{X: []int{222}}
453 buf := []byte(`{"X": null}`)
454 err := json.Unmarshal(buf, &x)
455 require.NoError(t, err, "Unmarshal of null into slice.")
456 var eq []int
457 require.Equal(t, x.X, eq)
458}
459
460func TestSlicePtr(t *testing.T) {
461 testType(t, &TslicePtr{X: []*int{}}, &XslicePtr{X: []*int{}})

Callers

nothing calls this directly

Calls 2

testTypeFunction · 0.85
testCycleFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…