Tests of a large random structure.
(t *testing.T)
| 125 | // Tests of a large random structure. |
| 126 | |
| 127 | func 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 | |
| 141 | func TestIndentBig(t *testing.T) { |
| 142 | t.Parallel() |