MCPcopy Index your code
hub / github.com/pquerna/ffjson / TestUnmarshalFaster

Function TestUnmarshalFaster

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

Source from the content-addressed store, hash-verified

206}
207
208func TestUnmarshalFaster(t *testing.T) {
209 buf := []byte(`{"id": 123213, "OriginID": 22, "meth": "GET"}`)
210 record := newLogFFRecord()
211 err := ffjson.UnmarshalFast(buf, record)
212 require.NoError(t, err)
213
214 r2 := newLogRecord()
215 err = ffjson.UnmarshalFast(buf, r2)
216 require.Error(t, err, "Record should not support UnmarshalFast")
217 err = ffjson.Unmarshal(buf, r2)
218 require.NoError(t, err)
219}
220
221func TestSimpleUnmarshal(t *testing.T) {
222 record := newLogFFRecord()

Callers

nothing calls this directly

Calls 3

newLogFFRecordFunction · 0.85
newLogRecordFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…