mirror of
https://github.com/rwinkhart/sys.git
synced 2026-08-27 20:36:31 -04:00
unix: test (*FdSet).Clear in TestFdSet
Follow-up for CL 205397 so all *FdSet functionality is tested. Change-Id: Ieb5dce6ad020ce1252cae7f3fe96ba6bf0069f5e Reviewed-on: https://go-review.googlesource.com/c/sys/+/215241 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
committed by
Tobias Klauser
parent
c1edf53553
commit
655fe14d74
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user