Skip to content

Commit 6724d8f

Browse files
committed
Edit TestToggle()
1 parent 7ec13a2 commit 6724d8f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

bitarray_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -188,10 +188,10 @@ func TestUnsetIdxSize(t *testing.T) {
188188
func TestToggle(t *testing.T) {
189189
want := "1000000010"
190190
ba := New(10, 9, 0)
191-
ba.Toggle(0)
192-
ba.Toggle(1)
193-
if got := ba.String(); got != want {
194-
t.Errorf("got %q, want %q", got, want)
191+
a := ba.Toggle(0) // false
192+
b := ba.Toggle(1) // true
193+
if got := ba.String(); got != want || a || !b {
194+
t.Errorf("got %q, want %q (%v, %v)", got, want, a, b)
195195
}
196196
}
197197

0 commit comments

Comments
 (0)