(t *testing.T)
| 233 | } |
| 234 | |
| 235 | func TestIssue6458(t *testing.T) { |
| 236 | type Foo struct { |
| 237 | M json.RawMessage |
| 238 | } |
| 239 | x := Foo{json.RawMessage(`"foo"`)} |
| 240 | |
| 241 | b, err := json.Marshal(&x) |
| 242 | if err != nil { |
| 243 | t.Fatal(err) |
| 244 | } |
| 245 | if want := `{"M":"foo"}`; string(b) != want { |
| 246 | t.Errorf("Marshal(&x) = %#q; want %#q", b, want) |
| 247 | } |
| 248 | |
| 249 | b, err = json.Marshal(x) |
| 250 | if err != nil { |
| 251 | t.Fatal(err) |
| 252 | } |
| 253 | |
| 254 | if want := `{"M":"foo"}`; string(b) != want { |
| 255 | t.Errorf("Marshal(x) = %#q; want %#q", b, want) |
| 256 | } |
| 257 | } |
| 258 | |
| 259 | func TestHTMLEscape(t *testing.T) { |
| 260 | var b, want bytes.Buffer |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…