diff --git a/unix/fdset_test.go b/unix/fdset_test.go index e092785c..d0c2d8a7 100644 --- a/unix/fdset_test.go +++ b/unix/fdset_test.go @@ -50,4 +50,14 @@ func TestFdSet(t *testing.T) { } } } + + for fd := 1; fd < unix.FD_SETSIZE; fd += 2 { + fdSet.Clear(fd) + } + + for fd := 0; fd < unix.FD_SETSIZE; fd++ { + if fdSet.IsSet(fd) { + t.Fatalf("Clear(%d) did not clear fd", fd) + } + } }