MCPcopy Create free account
hub / github.com/segmentio/encoding / TestCompactBig

Function TestCompactBig

json/golang_scanner_test.go:127–139  ·  view source on GitHub ↗

Tests of a large random structure.

(t *testing.T)

Source from the content-addressed store, hash-verified

125// Tests of a large random structure.
126
127func TestCompactBig(t *testing.T) {
128 initBig()
129 var buf bytes.Buffer
130 if err := Compact(&buf, jsonBig); err != nil {
131 t.Fatalf("Compact: %v", err)
132 }
133 b := buf.Bytes()
134 if !bytes.Equal(b, jsonBig) {
135 t.Error("Compact(jsonBig) != jsonBig")
136 diff(t, b, jsonBig)
137 return
138 }
139}
140
141func TestIndentBig(t *testing.T) {
142 t.Parallel()

Callers

nothing calls this directly

Calls 5

initBigFunction · 0.85
CompactFunction · 0.85
diffFunction · 0.85
BytesMethod · 0.80
ErrorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…