/* This file is part of the Simba project.  */
static int test_to_bin(void)
/* This file is part of the Simba project.  */
static int test_to_bin(void)
{
    uint8_t encoded[8];
    BTASSERT(hex_to_bin(&encoded[0], "0123456789abcdef", 16) == 8);
    BTASSERT(memcmp(&encoded[0], "\x01\x23\x45\x67\x89\xab\xcd\xef", 8) == 0);
    BTASSERT(hex_to_bin(&encoded[0], "0123456789ABCDEF", 16) == 8);
    BTASSERT(memcmp(&encoded[0], "\x01\x23\x45\x67\x89\xab\xcd\xef", 8) == 0);
    return (0);
}