On Thu, 7 Jul 2011, Amr Shahin wrote:
have a the test to pass file descriptors to Curl_poll. run a separate
thread/process that will write to specified files. make sure Curl_poll
returned and has the correct info set.
I do feel though that this test is a bit complex, if there are better ideas
please share them.
They're really hard to unit test sensibly, yes. The hard part about using
threads is that we need to detect and use a threading lib that libcurl may not
use by itself.
I guess an alternative approach is to simply use the functions when connecting
to a test server using sockets, as we already have such test servers but
that's still a pretty complicated setup for a unit test.
--
/ daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html