(t *testing.T)
| 338 | } |
| 339 | |
| 340 | func TestNil(t *testing.T) { |
| 341 | // A wrapped nil registerer should be treated as a no-op, and not panic. |
| 342 | c := NewCounter(CounterOpts{Name: "test"}) |
| 343 | err := WrapRegistererWith(Labels{"foo": "bar"}, nil).Register(c) |
| 344 | if err != nil { |
| 345 | t.Fatal("registering failed:", err) |
| 346 | } |
| 347 | } |
| 348 | |
| 349 | func TestWrapCollector(t *testing.T) { |
| 350 | t.Run("can be registered and un-registered", func(t *testing.T) { |
nothing calls this directly
no test coverage detected