(t *testing.T)
| 47 | } |
| 48 | |
| 49 | func TestList_Remove(t *testing.T) { |
| 50 | var a = assert.NewAssertion(t) |
| 51 | |
| 52 | var list = expires.NewList() |
| 53 | list.Add(1, time.Now().Unix()+1) |
| 54 | list.Remove(1) |
| 55 | logs.PrintAsJSON(list.ExpireMap(), t) |
| 56 | logs.PrintAsJSON(list.ItemsMap(), t) |
| 57 | |
| 58 | a.IsTrue(len(list.ExpireMap()) == 0) |
| 59 | a.IsTrue(len(list.ItemsMap()) == 0) |
| 60 | } |
| 61 | |
| 62 | func TestList_GC(t *testing.T) { |
| 63 | var unixTime = time.Now().Unix() |