(t *testing.T)
| 18 | } |
| 19 | |
| 20 | func TestRegistryWriteJSONOnce(t *testing.T) { |
| 21 | r := NewRegistry() |
| 22 | r.Register("counter", NewCounter()) |
| 23 | b := &bytes.Buffer{} |
| 24 | WriteJSONOnce(r, b) |
| 25 | if s := b.String(); s != "{\"counter\":{\"count\":0}}\n" { |
| 26 | t.Fail() |
| 27 | } |
| 28 | } |
nothing calls this directly
no test coverage detected