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

Function TestSparseBitArrayToNums

bitarray/sparse_bitarray_test.go:354–364  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

352}
353
354func TestSparseBitArrayToNums(t *testing.T) {
355 sba := newSparseBitArray()
356
357 sba.SetBit(s - 1)
358 sba.SetBit(s + 1)
359
360 expected := []uint64{s - 1, s + 1}
361
362 results := sba.ToNums()
363 assert.Equal(t, expected, results)
364}
365
366func BenchmarkSparseBitArrayToNums(b *testing.B) {
367 numItems := uint64(1000)

Callers

nothing calls this directly

Calls 3

newSparseBitArrayFunction · 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…