(t *testing.T)
| 30 | } |
| 31 | |
| 32 | func TestCounter_IncreaseKey(t *testing.T) { |
| 33 | var a = assert.NewAssertion(t) |
| 34 | |
| 35 | var counter = counters.NewCounter[uint32]() |
| 36 | a.IsTrue(counter.IncreaseKey("1", 10) == 1) |
| 37 | a.IsTrue(counter.IncreaseKey("1", 10) == 2) |
| 38 | a.IsTrue(counter.IncreaseKey("2", 10) == 1) |
| 39 | |
| 40 | counter.ResetKey("1") |
| 41 | a.IsTrue(counter.GetKey("1") == 0) // changed |
| 42 | a.IsTrue(counter.GetKey("2") == 1) // not changed |
| 43 | } |
| 44 | |
| 45 | func TestCounter_GC(t *testing.T) { |
| 46 | if !testutils.IsSingleTesting() { |
nothing calls this directly
no test coverage detected