| 1234567891011121314151617181920 |
- package metrics
- import (
- "testing"
- )
- func TestMeterZero(t *testing.T) {
- m := NewMeter()
- if count := m.Count(); 0 != count {
- t.Errorf("m.Count(): 0 != %v\n", count)
- }
- }
- func TestMeterNonzero(t *testing.T) {
- m := NewMeter()
- m.Mark(3)
- if count := m.Count(); 3 != count {
- t.Errorf("m.Count(): 3 != %v\n", count)
- }
- }
|