MCPcopy Create free account
hub / github.com/Workiva/go-datastructures / TestBitArrayToNums

Function TestBitArrayToNums

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

Source from the content-addressed store, hash-verified

525}
526
527func TestBitArrayToNums(t *testing.T) {
528 ba := newBitArray(s * 2)
529
530 ba.SetBit(s - 1)
531 ba.SetBit(s + 1)
532
533 expected := []uint64{s - 1, s + 1}
534
535 result := ba.ToNums()
536
537 assert.Equal(t, expected, result)
538}
539
540func BenchmarkBitArrayToNums(b *testing.B) {
541 numItems := uint64(1000)

Callers

nothing calls this directly

Calls 3

newBitArrayFunction · 0.85
SetBitMethod · 0.65
ToNumsMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…