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

Function testExpectedXValBare

tests/ff_test.go:370–376  ·  view source on GitHub ↗
(t *testing.T, expected interface{}, xval string, ff interface{})

Source from the content-addressed store, hash-verified

368}
369
370func testExpectedXValBare(t *testing.T, expected interface{}, xval string, ff interface{}) {
371 buf := []byte(`{"X":` + xval + `}`)
372 err := json.Unmarshal(buf, ff)
373 require.NoError(t, err, "ff[%T] failed to Unmarshal", ff)
374
375 require.Equal(t, expected, getXValue(ff), "json.Unmarshal of %T into ff[%T]", xval, ff)
376}
377
378func testExpectedXVal(t *testing.T, expected interface{}, xval string, ff interface{}) {
379 testExpectedXValBare(t, expected, `"`+xval+`"`, ff)

Callers 14

TestFloatRealCapitalFunction · 0.85
TestFloatRealExponentFunction · 0.85
TestFloatRealUnderflowFunction · 0.85
TestFloatNullFunction · 0.85
TestFloatIntFunction · 0.85
TestStringNullFunction · 0.85

Calls 1

getXValueFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…