Lines Matching refs:oframe
74 nghttp2_headers frame, oframe; in test_nghttp2_frame_pack_headers() local
105 CU_ASSERT(0 == unpack_framebuf((nghttp2_frame *)&oframe, &bufs)); in test_nghttp2_frame_pack_headers()
110 1000000007, &oframe.hd); in test_nghttp2_frame_pack_headers()
112 CU_ASSERT(NGHTTP2_DEFAULT_WEIGHT == oframe.pri_spec.weight); in test_nghttp2_frame_pack_headers()
122 nghttp2_frame_headers_free(&oframe, mem); in test_nghttp2_frame_pack_headers()
126 memset(&oframe, 0, sizeof(oframe)); in test_nghttp2_frame_pack_headers()
135 CU_ASSERT(0 == unpack_framebuf((nghttp2_frame *)&oframe, &bufs)); in test_nghttp2_frame_pack_headers()
141 1000000007, &oframe.hd); in test_nghttp2_frame_pack_headers()
143 CU_ASSERT(1000000009 == oframe.pri_spec.stream_id); in test_nghttp2_frame_pack_headers()
144 CU_ASSERT(12 == oframe.pri_spec.weight); in test_nghttp2_frame_pack_headers()
145 CU_ASSERT(1 == oframe.pri_spec.exclusive); in test_nghttp2_frame_pack_headers()
148 nghttp2_frame_priority_len(oframe.hd.flags); in test_nghttp2_frame_pack_headers()
152 nghttp2_frame_priority_len(oframe.hd.flags), in test_nghttp2_frame_pack_headers()
158 nghttp2_frame_headers_free(&oframe, mem); in test_nghttp2_frame_pack_headers()
210 nghttp2_priority frame, oframe; in test_nghttp2_frame_pack_priority() local
225 CU_ASSERT(0 == unpack_framebuf((nghttp2_frame *)&oframe, &bufs)); in test_nghttp2_frame_pack_priority()
227 &oframe.hd); in test_nghttp2_frame_pack_priority()
229 CU_ASSERT(1000000009 == oframe.pri_spec.stream_id); in test_nghttp2_frame_pack_priority()
230 CU_ASSERT(12 == oframe.pri_spec.weight); in test_nghttp2_frame_pack_priority()
231 CU_ASSERT(1 == oframe.pri_spec.exclusive); in test_nghttp2_frame_pack_priority()
233 nghttp2_frame_priority_free(&oframe); in test_nghttp2_frame_pack_priority()
241 nghttp2_rst_stream frame, oframe; in test_nghttp2_frame_pack_rst_stream() local
252 CU_ASSERT(0 == unpack_framebuf((nghttp2_frame *)&oframe, &bufs)); in test_nghttp2_frame_pack_rst_stream()
254 &oframe.hd); in test_nghttp2_frame_pack_rst_stream()
255 CU_ASSERT(NGHTTP2_PROTOCOL_ERROR == oframe.error_code); in test_nghttp2_frame_pack_rst_stream()
257 nghttp2_frame_rst_stream_free(&oframe); in test_nghttp2_frame_pack_rst_stream()
265 CU_ASSERT(0 == unpack_framebuf((nghttp2_frame *)&oframe, &bufs)); in test_nghttp2_frame_pack_rst_stream()
268 &oframe.hd); in test_nghttp2_frame_pack_rst_stream()
270 CU_ASSERT(1000000009 == oframe.error_code); in test_nghttp2_frame_pack_rst_stream()
272 nghttp2_frame_rst_stream_free(&oframe); in test_nghttp2_frame_pack_rst_stream()
280 nghttp2_settings frame, oframe; in test_nghttp2_frame_pack_settings() local
300 CU_ASSERT(0 == unpack_framebuf((nghttp2_frame *)&oframe, &bufs)); in test_nghttp2_frame_pack_settings()
302 NGHTTP2_FLAG_NONE, 0, &oframe.hd); in test_nghttp2_frame_pack_settings()
303 CU_ASSERT(3 == oframe.niv); in test_nghttp2_frame_pack_settings()
305 CU_ASSERT(iv[i].settings_id == oframe.iv[i].settings_id); in test_nghttp2_frame_pack_settings()
306 CU_ASSERT(iv[i].value == oframe.iv[i].value); in test_nghttp2_frame_pack_settings()
311 nghttp2_frame_settings_free(&oframe, mem); in test_nghttp2_frame_pack_settings()
317 nghttp2_push_promise frame, oframe; in test_nghttp2_frame_pack_push_promise() local
341 CU_ASSERT(0 == unpack_framebuf((nghttp2_frame *)&oframe, &bufs)); in test_nghttp2_frame_pack_push_promise()
345 &oframe.hd); in test_nghttp2_frame_pack_push_promise()
346 CU_ASSERT((1U << 31) - 1 == oframe.promised_stream_id); in test_nghttp2_frame_pack_push_promise()
358 nghttp2_frame_push_promise_free(&oframe, mem); in test_nghttp2_frame_pack_push_promise()
365 nghttp2_ping frame, oframe; in test_nghttp2_frame_pack_ping() local
377 CU_ASSERT(0 == unpack_framebuf((nghttp2_frame *)&oframe, &bufs)); in test_nghttp2_frame_pack_ping()
378 check_frame_header(8, NGHTTP2_PING, NGHTTP2_FLAG_ACK, 0, &oframe.hd); in test_nghttp2_frame_pack_ping()
379 CU_ASSERT(memcmp(opaque_data, oframe.opaque_data, sizeof(opaque_data) - 1) == in test_nghttp2_frame_pack_ping()
383 nghttp2_frame_ping_free(&oframe); in test_nghttp2_frame_pack_ping()
388 nghttp2_goaway frame, oframe; in test_nghttp2_frame_pack_goaway() local
407 CU_ASSERT(0 == unpack_framebuf((nghttp2_frame *)&oframe, &bufs)); in test_nghttp2_frame_pack_goaway()
408 check_frame_header(24, NGHTTP2_GOAWAY, NGHTTP2_FLAG_NONE, 0, &oframe.hd); in test_nghttp2_frame_pack_goaway()
409 CU_ASSERT(1000000007 == oframe.last_stream_id); in test_nghttp2_frame_pack_goaway()
410 CU_ASSERT(NGHTTP2_PROTOCOL_ERROR == oframe.error_code); in test_nghttp2_frame_pack_goaway()
412 CU_ASSERT(opaque_data_len == oframe.opaque_data_len); in test_nghttp2_frame_pack_goaway()
413 CU_ASSERT(memcmp(opaque_data, oframe.opaque_data, opaque_data_len) == 0); in test_nghttp2_frame_pack_goaway()
415 nghttp2_frame_goaway_free(&oframe, mem); in test_nghttp2_frame_pack_goaway()
424 CU_ASSERT(0 == unpack_framebuf((nghttp2_frame *)&oframe, &bufs)); in test_nghttp2_frame_pack_goaway()
425 check_frame_header(24, NGHTTP2_GOAWAY, NGHTTP2_FLAG_NONE, 0, &oframe.hd); in test_nghttp2_frame_pack_goaway()
426 CU_ASSERT(1000000009 == oframe.error_code); in test_nghttp2_frame_pack_goaway()
428 nghttp2_frame_goaway_free(&oframe, mem); in test_nghttp2_frame_pack_goaway()
436 nghttp2_window_update frame, oframe; in test_nghttp2_frame_pack_window_update() local
447 CU_ASSERT(0 == unpack_framebuf((nghttp2_frame *)&oframe, &bufs)); in test_nghttp2_frame_pack_window_update()
449 &oframe.hd); in test_nghttp2_frame_pack_window_update()
450 CU_ASSERT(4096 == oframe.window_size_increment); in test_nghttp2_frame_pack_window_update()
453 nghttp2_frame_window_update_free(&oframe); in test_nghttp2_frame_pack_window_update()
458 nghttp2_extension frame, oframe; in test_nghttp2_frame_pack_altsvc() local
474 oframe.payload = &oaltsvc; in test_nghttp2_frame_pack_altsvc()
493 rv = unpack_framebuf((nghttp2_frame *)&oframe, &bufs); in test_nghttp2_frame_pack_altsvc()
498 &oframe.hd); in test_nghttp2_frame_pack_altsvc()
506 nghttp2_frame_altsvc_free(&oframe, mem); in test_nghttp2_frame_pack_altsvc()
512 nghttp2_extension frame, oframe; in test_nghttp2_frame_pack_origin() local
541 oframe.payload = &oorigin; in test_nghttp2_frame_pack_origin()
552 rv = unpack_framebuf((nghttp2_frame *)&oframe, &bufs); in test_nghttp2_frame_pack_origin()
557 &oframe.hd); in test_nghttp2_frame_pack_origin()
565 nghttp2_frame_origin_free(&oframe, mem); in test_nghttp2_frame_pack_origin()
572 rv = unpack_framebuf((nghttp2_frame *)&oframe, &bufs); in test_nghttp2_frame_pack_origin()
577 memset(&oframe, 0, sizeof(oframe)); in test_nghttp2_frame_pack_origin()
579 oframe.payload = &oorigin; in test_nghttp2_frame_pack_origin()
589 rv = unpack_framebuf((nghttp2_frame *)&oframe, &bufs); in test_nghttp2_frame_pack_origin()
593 check_frame_header(0, NGHTTP2_ORIGIN, NGHTTP2_FLAG_NONE, 0, &oframe.hd); in test_nghttp2_frame_pack_origin()
598 nghttp2_frame_origin_free(&oframe, mem); in test_nghttp2_frame_pack_origin()