(t *testing.T)
| 66 | } |
| 67 | |
| 68 | func TestJSONWriterWriteMarshalError(t *testing.T) { |
| 69 | writer := NewJSONWriter(true) |
| 70 | ch := make(chan int) |
| 71 | |
| 72 | out, err := captureStdout(t, func() error { |
| 73 | return writer.Write(ch) |
| 74 | }) |
| 75 | if err == nil { |
| 76 | t.Fatal("expected marshal error, got nil") |
| 77 | } |
| 78 | if out != "" { |
| 79 | t.Fatalf("expected no output on marshal error, got %q", out) |
| 80 | } |
| 81 | } |
| 82 | |
| 83 | func TestJSONWriterIsEnabled(t *testing.T) { |
| 84 | if !NewJSONWriter(true).IsEnabled() { |
nothing calls this directly
no test coverage detected