Lines Matching refs:example
248 static void test_hpack_verify_encode(const struct example_headers *example, in test_hpack_verify_encode() argument
253 .name = example[i].name, in test_hpack_verify_encode()
254 .value = example[i].value, in test_hpack_verify_encode()
255 .name_len = strlen(example[i].name), in test_hpack_verify_encode()
256 .value_len = strlen(example[i].value) in test_hpack_verify_encode()
261 zassert_equal(ret, example[i].encoded_len, "Wrong encoding length"); in test_hpack_verify_encode()
262 zassert_mem_equal(test_buf, example[i].encoded, ret, in test_hpack_verify_encode()
267 static void test_hpack_verify_decode(const struct example_headers *example, in test_hpack_verify_decode() argument
274 ret = http_hpack_decode_header(example[i].encoded, example[i].encoded_len, &hdr); in test_hpack_verify_decode()
275 zassert_equal(ret, example[i].encoded_len, "Wrong decoding length"); in test_hpack_verify_decode()
276 zassert_equal(hdr.name_len, strlen(example[i].name), in test_hpack_verify_decode()
278 zassert_equal(hdr.value_len, strlen(example[i].value), in test_hpack_verify_decode()
280 zassert_mem_equal(hdr.name, example[i].name, hdr.name_len, in test_hpack_verify_decode()
282 zassert_mem_equal(hdr.value, example[i].value, hdr.value_len, in test_hpack_verify_decode()