Separated SPDY2 and SPDY3 tests to ease debugging

This commit is contained in:
Tatsuhiro Tsujikawa 2012-02-26 16:33:53 +09:00
parent d5cc71c636
commit 036efc1018
3 changed files with 53 additions and 24 deletions

View File

@ -135,7 +135,10 @@ int main(int argc, char* argv[])
test_spdylay_session_defer_data) || test_spdylay_session_defer_data) ||
!CU_add_test(pSuite, "session_flow_control", !CU_add_test(pSuite, "session_flow_control",
test_spdylay_session_flow_control) || test_spdylay_session_flow_control) ||
!CU_add_test(pSuite, "frame_unpack_nv", test_spdylay_frame_unpack_nv) || !CU_add_test(pSuite, "frame_unpack_nv_spdy2",
test_spdylay_frame_unpack_nv_spdy2) ||
!CU_add_test(pSuite, "frame_unpack_nv_spdy3",
test_spdylay_frame_unpack_nv_spdy3) ||
!CU_add_test(pSuite, "frame_count_nv_space", !CU_add_test(pSuite, "frame_count_nv_space",
test_spdylay_frame_count_nv_space) || test_spdylay_frame_count_nv_space) ||
!CU_add_test(pSuite, "frame_count_unpack_nv_space", !CU_add_test(pSuite, "frame_count_unpack_nv_space",
@ -145,12 +148,18 @@ int main(int argc, char* argv[])
test_spdylay_frame_pack_goaway_spdy2) || test_spdylay_frame_pack_goaway_spdy2) ||
!CU_add_test(pSuite, "frame_pack_goaway_spdy3", !CU_add_test(pSuite, "frame_pack_goaway_spdy3",
test_spdylay_frame_pack_goaway_spdy3) || test_spdylay_frame_pack_goaway_spdy3) ||
!CU_add_test(pSuite, "frame_pack_syn_stream", !CU_add_test(pSuite, "frame_pack_syn_stream_spdy2",
test_spdylay_frame_pack_syn_stream) || test_spdylay_frame_pack_syn_stream_spdy2) ||
!CU_add_test(pSuite, "frame_pack_syn_reply", !CU_add_test(pSuite, "frame_pack_syn_stream_spdy3",
test_spdylay_frame_pack_syn_reply) || test_spdylay_frame_pack_syn_stream_spdy3) ||
!CU_add_test(pSuite, "frame_pack_headers", !CU_add_test(pSuite, "frame_pack_syn_reply_spdy2",
test_spdylay_frame_pack_headers) || test_spdylay_frame_pack_syn_reply_spdy2) ||
!CU_add_test(pSuite, "frame_pack_syn_reply_spdy3",
test_spdylay_frame_pack_syn_reply_spdy3) ||
!CU_add_test(pSuite, "frame_pack_headers_spdy2",
test_spdylay_frame_pack_headers_spdy2) ||
!CU_add_test(pSuite, "frame_pack_headers_spdy3",
test_spdylay_frame_pack_headers_spdy3) ||
!CU_add_test(pSuite, "frame_pack_window_update", !CU_add_test(pSuite, "frame_pack_window_update",
test_spdylay_frame_pack_window_update) || test_spdylay_frame_pack_window_update) ||
!CU_add_test(pSuite, "frame_pack_settings", !CU_add_test(pSuite, "frame_pack_settings",

View File

@ -60,9 +60,13 @@ void test_spdylay_frame_unpack_nv_with(size_t len_size)
spdylay_frame_nv_del(nv); spdylay_frame_nv_del(nv);
} }
void test_spdylay_frame_unpack_nv() void test_spdylay_frame_unpack_nv_spdy2()
{ {
test_spdylay_frame_unpack_nv_with(2); test_spdylay_frame_unpack_nv_with(2);
}
void test_spdylay_frame_unpack_nv_spdy3()
{
test_spdylay_frame_unpack_nv_with(4); test_spdylay_frame_unpack_nv_with(4);
} }
@ -256,7 +260,7 @@ void test_spdylay_frame_pack_goaway_spdy3()
test_spdylay_frame_pack_goaway_version(SPDYLAY_PROTO_SPDY3); test_spdylay_frame_pack_goaway_version(SPDYLAY_PROTO_SPDY3);
} }
void test_spdylay_frame_pack_syn_stream_with(uint16_t version) void test_spdylay_frame_pack_syn_stream_version(uint16_t version)
{ {
spdylay_zlib deflater, inflater; spdylay_zlib deflater, inflater;
spdylay_frame frame, oframe; spdylay_frame frame, oframe;
@ -299,13 +303,17 @@ void test_spdylay_frame_pack_syn_stream_with(uint16_t version)
spdylay_buffer_free(&inflatebuf); spdylay_buffer_free(&inflatebuf);
} }
void test_spdylay_frame_pack_syn_stream() void test_spdylay_frame_pack_syn_stream_spdy2()
{ {
test_spdylay_frame_pack_syn_stream_with(SPDYLAY_PROTO_SPDY2); test_spdylay_frame_pack_syn_stream_version(SPDYLAY_PROTO_SPDY2);
test_spdylay_frame_pack_syn_stream_with(SPDYLAY_PROTO_SPDY3);
} }
void test_spdylay_frame_pack_syn_reply_with(uint16_t version) void test_spdylay_frame_pack_syn_stream_spdy3()
{
test_spdylay_frame_pack_syn_stream_version(SPDYLAY_PROTO_SPDY3);
}
void test_spdylay_frame_pack_syn_reply_version(uint16_t version)
{ {
spdylay_zlib deflater, inflater; spdylay_zlib deflater, inflater;
spdylay_frame frame, oframe; spdylay_frame frame, oframe;
@ -347,13 +355,17 @@ void test_spdylay_frame_pack_syn_reply_with(uint16_t version)
spdylay_buffer_free(&inflatebuf); spdylay_buffer_free(&inflatebuf);
} }
void test_spdylay_frame_pack_syn_reply() void test_spdylay_frame_pack_syn_reply_spdy2()
{ {
test_spdylay_frame_pack_syn_reply_with(SPDYLAY_PROTO_SPDY2); test_spdylay_frame_pack_syn_reply_version(SPDYLAY_PROTO_SPDY2);
test_spdylay_frame_pack_syn_reply_with(SPDYLAY_PROTO_SPDY3);
} }
void test_spdylay_frame_pack_headers_with(uint16_t version) void test_spdylay_frame_pack_syn_reply_spdy3()
{
test_spdylay_frame_pack_syn_reply_version(SPDYLAY_PROTO_SPDY3);
}
void test_spdylay_frame_pack_headers_version(uint16_t version)
{ {
spdylay_zlib deflater, inflater; spdylay_zlib deflater, inflater;
spdylay_frame frame, oframe; spdylay_frame frame, oframe;
@ -395,10 +407,14 @@ void test_spdylay_frame_pack_headers_with(uint16_t version)
spdylay_buffer_free(&inflatebuf); spdylay_buffer_free(&inflatebuf);
} }
void test_spdylay_frame_pack_headers() void test_spdylay_frame_pack_headers_spdy2()
{ {
test_spdylay_frame_pack_headers_with(SPDYLAY_PROTO_SPDY2); test_spdylay_frame_pack_headers_version(SPDYLAY_PROTO_SPDY2);
test_spdylay_frame_pack_headers_with(SPDYLAY_PROTO_SPDY3); }
void test_spdylay_frame_pack_headers_spdy3()
{
test_spdylay_frame_pack_headers_version(SPDYLAY_PROTO_SPDY3);
} }
void test_spdylay_frame_pack_window_update() void test_spdylay_frame_pack_window_update()

View File

@ -25,16 +25,20 @@
#ifndef SPDYLAY_FRAME_TEST_H #ifndef SPDYLAY_FRAME_TEST_H
#define SPDYLAY_FRAME_TEST_H #define SPDYLAY_FRAME_TEST_H
void test_spdylay_frame_unpack_nv(); void test_spdylay_frame_unpack_nv_spdy2();
void test_spdylay_frame_unpack_nv_spdy3();
void test_spdylay_frame_pack_nv_duplicate_keys(); void test_spdylay_frame_pack_nv_duplicate_keys();
void test_spdylay_frame_count_nv_space(); void test_spdylay_frame_count_nv_space();
void test_spdylay_frame_count_unpack_nv_space(); void test_spdylay_frame_count_unpack_nv_space();
void test_spdylay_frame_pack_ping(); void test_spdylay_frame_pack_ping();
void test_spdylay_frame_pack_goaway_spdy2(); void test_spdylay_frame_pack_goaway_spdy2();
void test_spdylay_frame_pack_goaway_spdy3(); void test_spdylay_frame_pack_goaway_spdy3();
void test_spdylay_frame_pack_syn_stream(); void test_spdylay_frame_pack_syn_stream_spdy2();
void test_spdylay_frame_pack_syn_reply(); void test_spdylay_frame_pack_syn_stream_spdy3();
void test_spdylay_frame_pack_headers(); void test_spdylay_frame_pack_syn_reply_spdy2();
void test_spdylay_frame_pack_syn_reply_spdy3();
void test_spdylay_frame_pack_headers_spdy2();
void test_spdylay_frame_pack_headers_spdy3();
void test_spdylay_frame_pack_window_update(); void test_spdylay_frame_pack_window_update();
void test_spdylay_frame_pack_settings(); void test_spdylay_frame_pack_settings();
void test_spdylay_frame_nv_sort(); void test_spdylay_frame_nv_sort();