(t *testing.T)
| 237 | } |
| 238 | |
| 239 | func TestBufferedIterator(t *testing.T) { |
| 240 | slm := NewShardLockMaps() |
| 241 | |
| 242 | for i := 0; i < 100; i++ { |
| 243 | slm.Set(strconv.Itoa(i), TestUser{strconv.Itoa(i)}) |
| 244 | } |
| 245 | |
| 246 | counter := 0 |
| 247 | for item := range slm.IterBuffered() { |
| 248 | val := item.Val |
| 249 | |
| 250 | if val == nil { |
| 251 | t.Error("Expecting an object.") |
| 252 | } |
| 253 | counter++ |
| 254 | } |
| 255 | |
| 256 | if counter != 100 { |
| 257 | t.Error("We should have counted 100 elements.") |
| 258 | } |
| 259 | |
| 260 | } |
| 261 | |
| 262 | func TestClear(t *testing.T) { |
| 263 | slm := NewShardLockMaps() |
nothing calls this directly
no test coverage detected