supervisor_asio_test.h 760 B

123456789101112131415161718192021222324252627
  1. #pragma once
  2. //
  3. // Copyright (c) 2019-2020 Ivan Baidakou (basiliscos) (the dot dmol at gmail dot com)
  4. //
  5. // Distributed under the MIT Software License
  6. //
  7. #include <catch2/catch_test_macros.hpp>
  8. #include "rotor/asio/supervisor_asio.h"
  9. #include "access.h"
  10. namespace rotor {
  11. namespace test {
  12. struct supervisor_asio_test_t : public rotor::asio::supervisor_asio_t {
  13. using rotor::asio::supervisor_asio_t::supervisor_asio_t;
  14. timers_map_t &get_timers_map() noexcept { return timers_map; }
  15. state_t &get_state() noexcept { return state; }
  16. auto &get_leader_queue() { return access<to::locality_leader>()->access<to::queue>(); }
  17. subscription_t &get_subscription() noexcept { return subscription_map; }
  18. };
  19. } // namespace test
  20. } // namespace rotor