(t *testing.T)
| 8 | ) |
| 9 | |
| 10 | func TestMultiCounter(t *testing.T) { |
| 11 | c1 := &mockCounter{} |
| 12 | c2 := &mockCounter{} |
| 13 | c3 := &mockCounter{} |
| 14 | mc := NewCounter(c1, c2, c3) |
| 15 | |
| 16 | mc.Add(123) |
| 17 | mc.Add(456) |
| 18 | |
| 19 | want := "[123 456]" |
| 20 | for i, m := range []fmt.Stringer{c1, c2, c3} { |
| 21 | if have := m.String(); want != have { |
| 22 | t.Errorf("c%d: want %q, have %q", i+1, want, have) |
| 23 | } |
| 24 | } |
| 25 | } |
| 26 | |
| 27 | func TestMultiGauge(t *testing.T) { |
| 28 | g1 := &mockGauge{} |
nothing calls this directly
no test coverage detected
searching dependent graphs…