1 #define CATCH_CONFIG_MAIN 
    2 #include <catch2/catch_test_macros.hpp> 
    3 #include "byte-utils.h" 
    6 TEST_CASE(
"byte to hex", 
"[core]") {
 
    7     unsigned char byte = 0xAB; 
 
    8     std::string hex_str = celantur::byte_to_hex(
byte);
 
    9     REQUIRE(hex_str == 
"ab");
 
   12 TEST_CASE(
"bytes to hex", 
"[core]") {
 
   13     unsigned char bytes[] = { 0xAB,  0xCD, 0xEF}; 
 
   14     std::string hex_str = celantur::bytes_to_hex(bytes, 
sizeof(bytes));
 
   15     REQUIRE(hex_str == 
"abcdef");