aboutsummaryrefslogtreecommitdiff
path: root/tests/test_dns.c
blob: 1b15e1c9fa19962c3cda3b53968e21f1efba0d00 (plain)
1
2
3
4
5
6
7
8
#include "dnslite.h"
#include "unity.h"

void test_dnsl_encode_hostname (void)
{
    struct dnsl_error error;
    TEST_ASSERT_EQUAL_STRING_LEN("\x03\x64\x6e\x73\x06\x67\x6f\x6f\x67\x6c\x65\x03\x63\x6f\x6d\x00", dnsl_encode_hostname("dns.google.com", &error), 16);
}