099-misc.cpp 566 B

12345678910111213141516171819
  1. //
  2. // Copyright (c) 2021 Ivan Baidakou (basiliscos) (the dot dmol at gmail dot com)
  3. //
  4. // Distributed under the MIT Software License
  5. //
  6. #include "rotor.hpp"
  7. #include <catch2/catch_test_macros.hpp>
  8. namespace r = rotor;
  9. TEST_CASE("error code messages", "[misc]") {
  10. CHECK(r::error_code_category().name() == std::string("rotor_error"));
  11. CHECK(r::error_code_category().message(-1) == "unknown");
  12. CHECK(r::shutdown_code_category().name() == std::string("rotor_shutdown"));
  13. CHECK(r::shutdown_code_category().message(-1) == "unknown shutdown reason");
  14. }