Lines Matching full:compact
18 compact string
50 if err := Compact(&buf, []byte(tt.compact)); err != nil {
51 t.Errorf("Compact(%#q): %v", tt.compact, err)
52 } else if s := buf.String(); s != tt.compact {
53 t.Errorf("Compact(%#q) = %#q, want original", tt.compact, s)
57 if err := Compact(&buf, []byte(tt.indent)); err != nil {
58 t.Errorf("Compact(%#q): %v", tt.indent, err)
60 } else if s := buf.String(); s != tt.compact {
61 t.Errorf("Compact(%#q) = %#q, want %#q", tt.indent, s, tt.compact)
70 in, compact string
77 if err := Compact(&buf, []byte(tt.in)); err != nil {
78 t.Errorf("Compact(%q): %v", tt.in, err)
79 } else if s := buf.String(); s != tt.compact {
80 t.Errorf("Compact(%q) = %q, want %q", tt.in, s, tt.compact)
96 if err := Indent(&buf, []byte(tt.compact), "", "\t"); err != nil {
97 t.Errorf("Indent(%#q): %v", tt.compact, err)
100 t.Errorf("Indent(%#q) = %#q, want %#q", tt.compact, s, tt.indent)
110 if err := Compact(&buf, jsonBig); err != nil {
111 t.Fatalf("Compact: %v", err)
115 t.Error("Compact(jsonBig) != jsonBig")
129 // jsonBig is compact (no unnecessary spaces);
148 if err := Compact(&buf1, b); err != nil {
149 t.Fatalf("Compact: %v", err)
153 t.Error("Compact(Indent(jsonBig)) != jsonBig")