From 2cc0603942b5841db7c1bb93bb642bafa471e93a Mon Sep 17 00:00:00 2001 From: Utkarsh Kukreti Date: Tue, 29 Sep 2015 16:01:38 +0530 Subject: Add sys::select::FdSet::clear. --- test/sys/test_select.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'test') 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] -- cgit v1.2.3