diff options
author | Utkarsh Kukreti <utkarshkukreti@gmail.com> | 2015-09-29 16:01:38 +0530 |
---|---|---|
committer | Carl Lerche <me@carllerche.com> | 2015-10-07 19:50:36 -0700 |
commit | 2cc0603942b5841db7c1bb93bb642bafa471e93a (patch) | |
tree | 7490d5f23daa479a69ceaf7401ea207dd53986a4 /test/sys | |
parent | b5c13463743d5c2e4dead1934b4abe74eceac104 (diff) | |
download | nix-2cc0603942b5841db7c1bb93bb642bafa471e93a.zip |
Add sys::select::FdSet::clear.
Diffstat (limited to 'test/sys')
-rw-r--r-- | test/sys/test_select.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/sys/test_select.rs b/test/sys/test_select.rs index c9331886..6b7eac9a 100644 --- a/test/sys/test_select.rs +++ b/test/sys/test_select.rs @@ -19,6 +19,16 @@ fn test_fdset() { for i in 0..FD_SETSIZE { assert!(!fd_set.contains(i)); } + + fd_set.insert(1); + fd_set.insert(FD_SETSIZE / 2); + fd_set.insert(FD_SETSIZE - 1); + + fd_set.clear(); + + for i in 0..FD_SETSIZE { + assert!(!fd_set.contains(i)); + } } #[test] |