MCPcopy Index your code
hub / github.com/dropbox/godropbox / TestSetClear

Function TestSetClear

container/bitarray/bitarray_test.go:75–90  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

73}
74
75func TestSetClear(t *testing.T) {
76 a := New(n)
77 for j := 0; j < n; j++ {
78 wrapRequire(t, !a.IsSet(j))
79 }
80 for i := 0; i < n; i++ {
81 a.Set(i)
82 for j := 0; j < n; j++ {
83 wrapRequire(t, (i == j) == a.IsSet(j), "i=%v, j=%v", i, j)
84 }
85 a.Clear(i)
86 for j := 0; j < n; j++ {
87 wrapRequire(t, !a.IsSet(j), "i=%v, j=%v", i, j)
88 }
89 }
90}
91
92var ns = []int{
93 62, 63, 64, 65, 66, 126, 127, 128, 129, 130, 131,

Callers

nothing calls this directly

Calls 5

wrapRequireFunction · 0.85
IsSetMethod · 0.80
NewFunction · 0.70
SetMethod · 0.65
ClearMethod · 0.65

Tested by

no test coverage detected