10#include <util/threadinterrupt.h>
12#include <boost/test/unit_test.hpp>
17using namespace std::chrono_literals;
94 const char* msg =
"abcd";
146 constexpr auto timeout = 1min;
161 }
catch (
const std::runtime_error&
e) {
A helper class for interruptible sleeps.
BOOST_CHECK_EXCEPTION predicates to check the specific validation error.
RAII helper class that manages a socket and closes it automatically when it goes out of scope.
static constexpr Event RECV
If passed to Wait(), then it will wait for readiness to read from the socket.
BOOST_FIXTURE_TEST_SUITE(cuckoocache_tests, BasicTestingSetup)
Test Suite for CuckooCache.
BOOST_AUTO_TEST_SUITE_END()
#define BOOST_CHECK_EQUAL(v1, v2)
#define BOOST_CHECK(expr)
static void CreateSocketPair(int s[2])
static bool SocketIsClosed(const SOCKET &s)
BOOST_AUTO_TEST_CASE(constructor_and_destructor)
static void SendAndRecvMessage(const Sock &sender, const Sock &receiver)
static SOCKET CreateSocket()
constexpr auto Ticks(Dur2 d)
Helper to count the seconds of a duration/time_point.