MCPcopy Index your code
hub / github.com/Workiva/go-datastructures / TestCopyBitArray

Function TestCopyBitArray

bitarray/bitarray_test.go:498–508  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

496}
497
498func TestCopyBitArray(t *testing.T) {
499 ba := newBitArray(10)
500 ba.SetBit(5)
501 ba.SetBit(1)
502
503 result := ba.copy().(*bitArray)
504 assert.Equal(t, ba.anyset, result.anyset)
505 assert.Equal(t, ba.lowest, result.lowest)
506 assert.Equal(t, ba.highest, result.highest)
507 assert.Equal(t, ba.blocks, result.blocks)
508}
509
510func BenchmarkDenseIntersectsCompressed(b *testing.B) {
511 numBits := uint64(162432)

Callers

nothing calls this directly

Calls 3

newBitArrayFunction · 0.85
SetBitMethod · 0.65
copyMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…