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

Function TestArray

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

Source from the content-addressed store, hash-verified

428}
429
430func TestArray(t *testing.T) {
431 testType(t, &Tarray{X: [3]int{}}, &Xarray{X: [3]int{}})
432 testCycle(t, &Tarray{X: [3]int{42, -42, 44}}, &Xarray{X: [3]int{}})
433
434 x := Xarray{X: [3]int{222}}
435 buf := []byte(`{"X": null}`)
436 err := json.Unmarshal(buf, &x)
437 require.NoError(t, err, "Unmarshal of null into array.")
438 var eq = [3]int{}
439 require.Equal(t, x.X, eq)
440}
441
442func TestArrayPtr(t *testing.T) {
443 testType(t, &TarrayPtr{X: [3]*int{}}, &XarrayPtr{X: [3]*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…