Skip to content

Test stream replacement required #20

@MungoG

Description

@MungoG

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)"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions