/* This file is part of the Simba project.  */
static int test_encode_raw(void)
/* This file is part of the Simba project.  */
static int test_encode_raw(void)
{
    size_t size;
    char encoded[] =
        "$GPFOO,BAR*2C\r\n";
    struct nmea_sentence_t decoded;
    char buf[NMEA_SENTENCE_SIZE_MAX];
    decoded.type = nmea_sentence_type_raw_t;
    decoded.raw.str_p = "GPFOO,BAR";
    size = strlen(encoded);
    BTASSERTI(nmea_encode(&buf[0], &decoded, sizeof(buf)), ==, size);
    BTASSERTM(&buf[0], &encoded[0], size);
    return (0);
}