diff options
-rw-r--r-- | api/direct_bt/HCITypes.hpp | 4 | ||||
-rw-r--r-- | test/direct_bt/test_misc_types.cpp | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/api/direct_bt/HCITypes.hpp b/api/direct_bt/HCITypes.hpp index a11779b6..4bc781ba 100644 --- a/api/direct_bt/HCITypes.hpp +++ b/api/direct_bt/HCITypes.hpp @@ -224,9 +224,9 @@ namespace direct_bt { class HCIStatusCodeCategory : public std::error_category { public: - const char* name() const noexcept override { return "HCIStatusCode"; } + const char* name() const noexcept override { return "HCI"; } std::string message(int condition) const override { - return direct_bt::to_string( static_cast<HCIStatusCode>(condition) ); + return "HCI::"+to_string( static_cast<HCIStatusCode>(condition) ); } static HCIStatusCodeCategory& get() { static HCIStatusCodeCategory s; diff --git a/test/direct_bt/test_misc_types.cpp b/test/direct_bt/test_misc_types.cpp index e9e7673d..95793d67 100644 --- a/test/direct_bt/test_misc_types.cpp +++ b/test/direct_bt/test_misc_types.cpp @@ -17,9 +17,9 @@ TEST_CASE( "HCIStatusCodeCategory std::error_code Test", "[HCIStatusCode][HCISta std::error_code ec_12(HCIStatusCode::COMMAND_DISALLOWED); std::error_code ec_42 = make_error_code(HCIStatusCode::DIFFERENT_TRANSACTION_COLLISION); - std::cout << "ec_0: " << ec_0 << std::endl; - std::cerr << "ec_12: " << ec_12 << std::endl; - std::cerr << "ec_42: " << ec_42 << std::endl; + std::cout << "ec_0: " << ec_0 << ", " << ec_0.message() << std::endl; + std::cerr << "ec_12: " << ec_12 << ", " << ec_12.message() << std::endl; + std::cerr << "ec_42: " << ec_42 << ", " << ec_42.message() << std::endl; REQUIRE( HCIStatusCodeCategory::get() == ec_0.category() ); REQUIRE( HCIStatusCodeCategory::get() == ec_12.category() ); |