(t *testing.T)
| 324 | } |
| 325 | |
| 326 | func TestAdd(t *testing.T) { |
| 327 | bsi := NewDefaultBSI() |
| 328 | // Setup values |
| 329 | for i := 1; i <= 10; i++ { |
| 330 | bsi.SetValue(uint64(i), int64(i)) |
| 331 | } |
| 332 | clone := bsi.Clone() |
| 333 | bsi.Add(clone) |
| 334 | assert.Equal(t, uint64(10), bsi.GetCardinality()) |
| 335 | for i := 1; i <= 10; i++ { |
| 336 | a, _ := bsi.GetValue(uint64(i)) |
| 337 | b, _ := clone.GetValue(uint64(i)) |
| 338 | assert.Equal(t, b*2, a) |
| 339 | } |
| 340 | |
| 341 | } |
| 342 | |
| 343 | func TestIncrement(t *testing.T) { |
| 344 | bsi := setup() |
nothing calls this directly
no test coverage detected
searching dependent graphs…