-
Notifications
You must be signed in to change notification settings - Fork 6
Description
Current test stream asio based, need to rethink.
Suggestion from Vinnie:
It would probably be better to write new test facilities from scratch
you need a function:
auto connect( corosio::socket&, corosio::socket& );
connect two sockets together
and then on one socket you launch a test coroutine that feeds in the data how you want, and then on the other end you do your test on it
and we can use real sockets, which is a better test
this works for read tests. for write tests we just make a test coroutine that reads everything into a visible std::string
so, the old test_stream simply becomes a pair of test coroutines - a reader, and a writer
at this point you could probably just copy everything I just said, then write:"Claude, a colleague suggests a strategy for testing a coroutine-driven network library. Implement the following: in corosio (paste)"