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

Function TestBitArrayEqualsSparse

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

Source from the content-addressed store, hash-verified

466}
467
468func TestBitArrayEqualsSparse(t *testing.T) {
469 ba := newBitArray(s * 2)
470 cba := newSparseBitArray()
471
472 assert.True(t, ba.Equals(cba))
473
474 ba.SetBit(5)
475 assert.False(t, ba.Equals(cba))
476
477 cba.SetBit(5)
478 assert.True(t, ba.Equals(cba))
479
480 ba.SetBit(s + 1)
481 assert.False(t, ba.Equals(cba))
482
483 cba.SetBit(s + 1)
484 assert.True(t, ba.Equals(cba))
485}
486
487func TestConstructorSetBitArray(t *testing.T) {
488 ba := newBitArray(8, true)

Callers

nothing calls this directly

Calls 4

newBitArrayFunction · 0.85
newSparseBitArrayFunction · 0.85
EqualsMethod · 0.65
SetBitMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…