Boost Users :
Subject: [Boost-users] Testing and faking ASIO I/O objects
From: Cristian Morales Vega (cristian_at_[hidden])
Date: 2018-08-29 21:03:02
How is people around here testing code which uses ASIO?
I guess something like
GIVEN("SOMETHING THAT STARTS BY DOING A NAME RESOLVER IS STARTED")
HandlerCallingConnect); // This stores the completion handler (and an
WHEN("THE RESOLVER RETURNS WITHOUT ERROR")
// This post() the completion handler with the arguments you give it
THEN("A CONNECTION IS ATTEMPTED")
would be nice. But the "stores the completion handler" part doesn't
look that simple. I have found some attempts online, but they seems to
store the completion handlers into a vector of std::function and post
them through std::bind, so possibly using the wrong executor, etc.
There is any good set of ASIO I/O object fakes available?
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net