1#[macro_export]
11macro_rules! tests {
12 ($body: tt) => {
13
14#[cfg(test)]
26mod rfc9113 {
27use ::httpwg::rfc9113 as __suite;
28
29mod _3_starting_http2 {
31use super::__suite::_3_starting_http2 as __group;
32
33#[test]
37fn sends_client_connection_preface() {
38use __group::sends_client_connection_preface as test;
39$body
40}
41
42#[test]
45fn sends_invalid_connection_preface() {
46use __group::sends_invalid_connection_preface as test;
47$body
48}
49}
50
51mod _4_http_frames {
53use super::__suite::_4_http_frames as __group;
54
55#[test]
57fn sends_frame_with_unknown_type() {
58use __group::sends_frame_with_unknown_type as test;
59$body
60}
61
62#[test]
65fn sends_frame_with_unused_flags() {
66use __group::sends_frame_with_unused_flags as test;
67$body
68}
69
70#[test]
74fn sends_frame_with_reserved_bit_set() {
75use __group::sends_frame_with_reserved_bit_set as test;
76$body
77}
78
79#[test]
80fn data_frame_with_max_length() {
81use __group::data_frame_with_max_length as test;
82$body
83}
84
85#[test]
90fn frame_exceeding_max_size() {
91use __group::frame_exceeding_max_size as test;
92$body
93}
94
95#[test]
101fn large_headers_frame_exceeding_max_size() {
102use __group::large_headers_frame_exceeding_max_size as test;
103$body
104}
105
106#[test]
109fn invalid_header_block_fragment() {
110use __group::invalid_header_block_fragment as test;
111$body
112}
113
114#[test]
118fn priority_frame_while_sending_headers() {
119use __group::priority_frame_while_sending_headers as test;
120$body
121}
122
123#[test]
127fn headers_frame_to_another_stream() {
128use __group::headers_frame_to_another_stream as test;
129$body
130}
131}
132
133mod _5_streams_and_multiplexing {
135use super::__suite::_5_streams_and_multiplexing as __group;
136
137#[test]
142fn idle_sends_data_frame() {
143use __group::idle_sends_data_frame as test;
144$body
145}
146
147#[test]
152fn idle_sends_rst_stream_frame() {
153use __group::idle_sends_rst_stream_frame as test;
154$body
155}
156
157#[test]
162fn idle_sends_window_update_frame() {
163use __group::idle_sends_window_update_frame as test;
164$body
165}
166
167#[test]
172fn idle_sends_continuation_frame() {
173use __group::idle_sends_continuation_frame as test;
174$body
175}
176
177#[test]
183fn half_closed_remote_sends_data_frame() {
184use __group::half_closed_remote_sends_data_frame as test;
185$body
186}
187
188#[test]
194fn half_closed_remote_sends_headers_frame() {
195use __group::half_closed_remote_sends_headers_frame as test;
196$body
197}
198
199#[test]
205fn half_closed_remote_sends_continuation_frame() {
206use __group::half_closed_remote_sends_continuation_frame as test;
207$body
208}
209
210#[test]
215fn closed_sends_data_frame_after_rst_stream() {
216use __group::closed_sends_data_frame_after_rst_stream as test;
217$body
218}
219
220#[test]
225fn closed_sends_headers_frame_after_rst_stream() {
226use __group::closed_sends_headers_frame_after_rst_stream as test;
227$body
228}
229
230#[test]
235fn closed_sends_continuation_frame_after_rst_stream() {
236use __group::closed_sends_continuation_frame_after_rst_stream as test;
237$body
238}
239
240#[test]
245fn closed_sends_data_frame() {
246use __group::closed_sends_data_frame as test;
247$body
248}
249
250#[test]
255fn closed_sends_headers_frame() {
256use __group::closed_sends_headers_frame as test;
257$body
258}
259
260#[test]
265fn closed_sends_continuation_frame() {
266use __group::closed_sends_continuation_frame as test;
267$body
268}
269
270#[test]
274fn sends_even_numbered_stream_identifier() {
275use __group::sends_even_numbered_stream_identifier as test;
276$body
277}
278
279#[test]
283fn sends_smaller_stream_identifier() {
284use __group::sends_smaller_stream_identifier as test;
285$body
286}
287
288#[test]
289fn exceeds_concurrent_stream_limit() {
290use __group::exceeds_concurrent_stream_limit as test;
291$body
292}
293
294#[test]
297fn invalid_ping_frame_for_connection_close() {
298use __group::invalid_ping_frame_for_connection_close as test;
299$body
300}
301
302#[test]
303fn test_invalid_ping_frame_for_goaway() {
304use __group::test_invalid_ping_frame_for_goaway as test;
305$body
306}
307
308#[test]
312fn unknown_extension_frame_in_header_block() {
313use __group::unknown_extension_frame_in_header_block as test;
314$body
315}
316}
317
318mod _6_frame_definitions {
320use super::__suite::_6_frame_definitions as __group;
321
322#[test]
327fn sends_data_frame_with_zero_stream_id() {
328use __group::sends_data_frame_with_zero_stream_id as test;
329$body
330}
331
332#[test]
338fn sends_data_frame_on_invalid_stream_state() {
339use __group::sends_data_frame_on_invalid_stream_state as test;
340$body
341}
342
343#[test]
347fn sends_data_frame_with_invalid_pad_length() {
348use __group::sends_data_frame_with_invalid_pad_length as test;
349$body
350}
351
352#[test]
357fn sends_headers_frame_with_zero_stream_id() {
358use __group::sends_headers_frame_with_zero_stream_id as test;
359$body
360}
361
362#[test]
367fn sends_headers_frame_with_invalid_pad_length() {
368use __group::sends_headers_frame_with_invalid_pad_length as test;
369$body
370}
371
372#[test]
377fn sends_priority_frame_with_zero_stream_id() {
378use __group::sends_priority_frame_with_zero_stream_id as test;
379$body
380}
381
382#[test]
386fn sends_priority_frame_with_invalid_length() {
387use __group::sends_priority_frame_with_invalid_length as test;
388$body
389}
390
391#[test]
396fn sends_rst_stream_frame_with_zero_stream_id() {
397use __group::sends_rst_stream_frame_with_zero_stream_id as test;
398$body
399}
400
401#[test]
406fn sends_rst_stream_frame_on_idle_stream() {
407use __group::sends_rst_stream_frame_on_idle_stream as test;
408$body
409}
410
411#[test]
415fn sends_rst_stream_frame_with_invalid_length() {
416use __group::sends_rst_stream_frame_with_invalid_length as test;
417$body
418}
419
420#[test]
428fn sends_settings_frame_with_ack_and_payload() {
429use __group::sends_settings_frame_with_ack_and_payload as test;
430$body
431}
432
433#[test]
440fn sends_settings_frame_with_non_zero_stream_id() {
441use __group::sends_settings_frame_with_non_zero_stream_id as test;
442$body
443}
444
445#[test]
453fn sends_settings_frame_with_invalid_length() {
454use __group::sends_settings_frame_with_invalid_length as test;
455$body
456}
457
458#[test]
463fn sends_settings_enable_push_with_invalid_value() {
464use __group::sends_settings_enable_push_with_invalid_value as test;
465$body
466}
467
468#[test]
473fn sends_settings_initial_window_size_with_invalid_value() {
474use __group::sends_settings_initial_window_size_with_invalid_value as test;
475$body
476}
477
478#[test]
485fn sends_settings_max_frame_size_with_invalid_value_below_initial() {
486use __group::sends_settings_max_frame_size_with_invalid_value_below_initial as test;
487$body
488}
489
490#[test]
497fn sends_settings_max_frame_size_with_invalid_value_above_max() {
498use __group::sends_settings_max_frame_size_with_invalid_value_above_max as test;
499$body
500}
501
502#[test]
505fn sends_settings_frame_with_unknown_identifier() {
506use __group::sends_settings_frame_with_unknown_identifier as test;
507$body
508}
509
510#[test]
513fn sends_multiple_values_of_settings_initial_window_size() {
514use __group::sends_multiple_values_of_settings_initial_window_size as test;
515$body
516}
517
518#[test]
521fn sends_settings_frame_without_ack_flag() {
522use __group::sends_settings_frame_without_ack_flag as test;
523$body
524}
525
526#[test]
530fn sends_ping_frame() {
531use __group::sends_ping_frame as test;
532$body
533}
534
535#[test]
541fn sends_ping_frame_with_ack() {
542use __group::sends_ping_frame_with_ack as test;
543$body
544}
545
546#[test]
550fn sends_ping_frame_with_non_zero_stream_id() {
551use __group::sends_ping_frame_with_non_zero_stream_id as test;
552$body
553}
554
555#[test]
559fn sends_ping_frame_with_invalid_length() {
560use __group::sends_ping_frame_with_invalid_length as test;
561$body
562}
563
564#[test]
568fn sends_goaway_frame_with_non_zero_stream_id() {
569use __group::sends_goaway_frame_with_non_zero_stream_id as test;
570$body
571}
572
573#[test]
579fn sends_window_update_frame_with_zero_increment() {
580use __group::sends_window_update_frame_with_zero_increment as test;
581$body
582}
583
584#[test]
590fn sends_window_update_frame_with_zero_increment_on_stream() {
591use __group::sends_window_update_frame_with_zero_increment_on_stream as test;
592$body
593}
594
595#[test]
599fn sends_window_update_frame_with_invalid_length() {
600use __group::sends_window_update_frame_with_invalid_length as test;
601$body
602}
603
604#[test]
608fn sends_settings_frame_to_set_initial_window_size_to_1_and_sends_headers_frame() {
609use __group::sends_settings_frame_to_set_initial_window_size_to_1_and_sends_headers_frame as test;
610$body
611}
612
613#[test]
621fn sends_multiple_window_update_frames_increasing_flow_control_window_above_max() {
622use __group::sends_multiple_window_update_frames_increasing_flow_control_window_above_max as test;
623$body
624}
625
626#[test]
634fn sends_multiple_window_update_frames_increasing_flow_control_window_above_max_on_stream() {
635use __group::sends_multiple_window_update_frames_increasing_flow_control_window_above_max_on_stream as test;
636$body
637}
638
639#[test]
644fn changes_settings_initial_window_size_after_sending_headers_frame() {
645use __group::changes_settings_initial_window_size_after_sending_headers_frame as test;
646$body
647}
648
649#[test]
654fn sends_settings_frame_for_window_size_to_be_negative() {
655use __group::sends_settings_frame_for_window_size_to_be_negative as test;
656$body
657}
658
659#[test]
663fn sends_settings_initial_window_size_with_exceeded_max_window_size_value() {
664use __group::sends_settings_initial_window_size_with_exceeded_max_window_size_value as test;
665$body
666}
667
668#[test]
674fn sends_multiple_continuation_frames_preceded_by_headers_frame() {
675use __group::sends_multiple_continuation_frames_preceded_by_headers_frame as test;
676$body
677}
678
679#[test]
685fn sends_continuation_frame_followed_by_non_continuation_frame() {
686use __group::sends_continuation_frame_followed_by_non_continuation_frame as test;
687$body
688}
689
690#[test]
695fn sends_continuation_frame_with_zero_stream_id() {
696use __group::sends_continuation_frame_with_zero_stream_id as test;
697$body
698}
699
700#[test]
705fn sends_continuation_frame_preceded_by_headers_frame_with_end_headers_flag() {
706use __group::sends_continuation_frame_preceded_by_headers_frame_with_end_headers_flag as test;
707$body
708}
709
710#[test]
715fn sends_continuation_frame_preceded_by_continuation_frame_with_end_headers_flag() {
716use __group::sends_continuation_frame_preceded_by_continuation_frame_with_end_headers_flag as test;
717$body
718}
719
720#[test]
725fn sends_continuation_frame_preceded_by_data_frame() {
726use __group::sends_continuation_frame_preceded_by_data_frame as test;
727$body
728}
729}
730
731mod _7_error_codes {
733use super::__suite::_7_error_codes as __group;
734
735#[test]
739fn sends_goaway_frame_with_unknown_error_code() {
740use __group::sends_goaway_frame_with_unknown_error_code as test;
741$body
742}
743
744#[test]
748fn sends_rst_stream_frame_with_unknown_error_code() {
749use __group::sends_rst_stream_frame_with_unknown_error_code as test;
750$body
751}
752}
753
754mod _8_expressing_http_semantics_in_http2 {
756use super::__suite::_8_expressing_http_semantics_in_http2 as __group;
757
758#[test]
759fn sends_second_headers_frame_without_end_stream() {
760use __group::sends_second_headers_frame_without_end_stream as test;
761$body
762}
763
764#[test]
765fn sends_headers_frame_with_incorrect_content_length_single_data_frame() {
766use __group::sends_headers_frame_with_incorrect_content_length_single_data_frame as test;
767$body
768}
769
770#[test]
771fn sends_headers_frame_with_incorrect_content_length_multiple_data_frames() {
772use __group::sends_headers_frame_with_incorrect_content_length_multiple_data_frames as test;
773$body
774}
775
776#[test]
786fn sends_headers_frame_with_uppercase_field_name() {
787use __group::sends_headers_frame_with_uppercase_field_name as test;
788$body
789}
790
791#[test]
801fn sends_headers_frame_with_space_in_field_name() {
802use __group::sends_headers_frame_with_space_in_field_name as test;
803$body
804}
805
806#[test]
816fn sends_headers_frame_with_non_visible_ascii() {
817use __group::sends_headers_frame_with_non_visible_ascii as test;
818$body
819}
820
821#[test]
831fn sends_headers_frame_with_del_character() {
832use __group::sends_headers_frame_with_del_character as test;
833$body
834}
835
836#[test]
846fn sends_headers_frame_with_non_ascii_character() {
847use __group::sends_headers_frame_with_non_ascii_character as test;
848$body
849}
850
851#[test]
860fn sends_headers_frame_with_colon_in_field_name() {
861use __group::sends_headers_frame_with_colon_in_field_name as test;
862$body
863}
864
865#[test]
873fn sends_headers_frame_with_lf_in_field_value() {
874use __group::sends_headers_frame_with_lf_in_field_value as test;
875$body
876}
877
878#[test]
886fn sends_headers_frame_with_cr_in_field_value() {
887use __group::sends_headers_frame_with_cr_in_field_value as test;
888$body
889}
890
891#[test]
899fn sends_headers_frame_with_nul_in_field_value() {
900use __group::sends_headers_frame_with_nul_in_field_value as test;
901$body
902}
903
904#[test]
911fn sends_headers_frame_with_leading_space_in_field_value() {
912use __group::sends_headers_frame_with_leading_space_in_field_value as test;
913$body
914}
915
916#[test]
923fn sends_headers_frame_with_trailing_tab_in_field_value() {
924use __group::sends_headers_frame_with_trailing_tab_in_field_value as test;
925$body
926}
927
928#[test]
938fn sends_headers_frame_with_connection_header() {
939use __group::sends_headers_frame_with_connection_header as test;
940$body
941}
942
943#[test]
954fn sends_headers_frame_with_proxy_connection_header() {
955use __group::sends_headers_frame_with_proxy_connection_header as test;
956$body
957}
958
959#[test]
970fn sends_headers_frame_with_keep_alive_header() {
971use __group::sends_headers_frame_with_keep_alive_header as test;
972$body
973}
974
975#[test]
986fn sends_headers_frame_with_transfer_encoding_header() {
987use __group::sends_headers_frame_with_transfer_encoding_header as test;
988$body
989}
990
991#[test]
1002fn sends_headers_frame_with_upgrade_header() {
1003use __group::sends_headers_frame_with_upgrade_header as test;
1004$body
1005}
1006
1007#[test]
1011fn sends_headers_frame_with_te_trailers() {
1012use __group::sends_headers_frame_with_te_trailers as test;
1013$body
1014}
1015
1016#[test]
1020fn sends_headers_frame_with_te_not_trailers() {
1021use __group::sends_headers_frame_with_te_not_trailers as test;
1022$body
1023}
1024
1025#[test]
1029fn sends_headers_frame_with_response_pseudo_header() {
1030use __group::sends_headers_frame_with_response_pseudo_header as test;
1031$body
1032}
1033
1034#[test]
1038fn sends_headers_frame_with_pseudo_header_in_trailer() {
1039use __group::sends_headers_frame_with_pseudo_header_in_trailer as test;
1040$body
1041}
1042
1043#[test]
1048fn sends_headers_frame_with_duplicate_pseudo_headers() {
1049use __group::sends_headers_frame_with_duplicate_pseudo_headers as test;
1050$body
1051}
1052
1053#[test]
1062fn sends_headers_frame_with_mismatched_host_authority() {
1063use __group::sends_headers_frame_with_mismatched_host_authority as test;
1064$body
1065}
1066
1067#[test]
1076fn sends_headers_frame_with_empty_path_component() {
1077use __group::sends_headers_frame_with_empty_path_component as test;
1078$body
1079}
1080
1081#[test]
1086fn sends_headers_frame_without_method() {
1087use __group::sends_headers_frame_without_method as test;
1088$body
1089}
1090
1091#[test]
1092fn sends_headers_frame_without_scheme() {
1093use __group::sends_headers_frame_without_scheme as test;
1094$body
1095}
1096
1097#[test]
1098fn sends_headers_frame_without_path() {
1099use __group::sends_headers_frame_without_path as test;
1100$body
1101}
1102
1103#[test]
1104fn sends_headers_frame_without_status() {
1105use __group::sends_headers_frame_without_status as test;
1106$body
1107}
1108
1109#[test]
1114fn client_sends_push_promise_frame() {
1115use __group::client_sends_push_promise_frame as test;
1116$body
1117}
1118
1119#[test]
1135fn sends_connect_with_scheme() {
1136use __group::sends_connect_with_scheme as test;
1137$body
1138}
1139
1140#[test]
1141fn sends_connect_with_path() {
1142use __group::sends_connect_with_path as test;
1143$body
1144}
1145
1146#[test]
1147fn sends_connect_without_authority() {
1148use __group::sends_connect_without_authority as test;
1149$body
1150}
1151
1152#[test]
1155fn sends_headers_frame_with_pseudo_headers_after_regular_headers() {
1156use __group::sends_headers_frame_with_pseudo_headers_after_regular_headers as test;
1157$body
1158}
1159}
1160}
1161}
1162}
1163
1164#[macro_export]
1166macro_rules! gen_catalog {
1167 ($catalog_fn_name:ident) => {
1168 use ::httpwg::BoxedTest;
1169 pub fn $catalog_fn_name<IO: IntoHalves>() -> HashMap<&'static str, HashMap<&'static str, HashMap<&'static str, BoxedTest<IO>>>> {
1170 let mut rfcs: HashMap<&'static str, HashMap<&'static str, HashMap<&'static str, BoxedTest<IO>>>> = Default::default();
1171
1172 {
1173 let mut sections: HashMap<&'static str, _> = Default::default();
1174
1175 {
1176 use ::httpwg::rfc9113::_3_starting_http2 as s;
1177 let mut _3_starting_http2: HashMap<&'static str, BoxedTest<IO>> = Default::default();
1178
1179 _3_starting_http2.insert(
1180 "sends client connection preface",
1181 Box::new(|conn: Conn<IO>| Box::pin(s::sends_client_connection_preface(conn))),
1182 );
1183 _3_starting_http2.insert(
1184 "sends invalid connection preface",
1185 Box::new(|conn: Conn<IO>| Box::pin(s::sends_invalid_connection_preface(conn))),
1186 );
1187
1188 sections.insert("3. starting http2", _3_starting_http2);
1189 }
1190 {
1191 use ::httpwg::rfc9113::_4_http_frames as s;
1192 let mut _4_http_frames: HashMap<&'static str, BoxedTest<IO>> = Default::default();
1193
1194 _4_http_frames.insert(
1195 "sends frame with unknown type",
1196 Box::new(|conn: Conn<IO>| Box::pin(s::sends_frame_with_unknown_type(conn))),
1197 );
1198 _4_http_frames.insert(
1199 "sends frame with unused flags",
1200 Box::new(|conn: Conn<IO>| Box::pin(s::sends_frame_with_unused_flags(conn))),
1201 );
1202 _4_http_frames.insert(
1203 "sends frame with reserved bit set",
1204 Box::new(|conn: Conn<IO>| Box::pin(s::sends_frame_with_reserved_bit_set(conn))),
1205 );
1206 _4_http_frames.insert(
1207 "data frame with max length",
1208 Box::new(|conn: Conn<IO>| Box::pin(s::data_frame_with_max_length(conn))),
1209 );
1210 _4_http_frames.insert(
1211 "frame exceeding max size",
1212 Box::new(|conn: Conn<IO>| Box::pin(s::frame_exceeding_max_size(conn))),
1213 );
1214 _4_http_frames.insert(
1215 "large headers frame exceeding max size",
1216 Box::new(|conn: Conn<IO>| Box::pin(s::large_headers_frame_exceeding_max_size(conn))),
1217 );
1218 _4_http_frames.insert(
1219 "invalid header block fragment",
1220 Box::new(|conn: Conn<IO>| Box::pin(s::invalid_header_block_fragment(conn))),
1221 );
1222 _4_http_frames.insert(
1223 "priority frame while sending headers",
1224 Box::new(|conn: Conn<IO>| Box::pin(s::priority_frame_while_sending_headers(conn))),
1225 );
1226 _4_http_frames.insert(
1227 "headers frame to another stream",
1228 Box::new(|conn: Conn<IO>| Box::pin(s::headers_frame_to_another_stream(conn))),
1229 );
1230
1231 sections.insert("4. http frames", _4_http_frames);
1232 }
1233 {
1234 use ::httpwg::rfc9113::_5_streams_and_multiplexing as s;
1235 let mut _5_streams_and_multiplexing: HashMap<&'static str, BoxedTest<IO>> = Default::default();
1236
1237 _5_streams_and_multiplexing.insert(
1238 "idle sends data frame",
1239 Box::new(|conn: Conn<IO>| Box::pin(s::idle_sends_data_frame(conn))),
1240 );
1241 _5_streams_and_multiplexing.insert(
1242 "idle sends rst stream frame",
1243 Box::new(|conn: Conn<IO>| Box::pin(s::idle_sends_rst_stream_frame(conn))),
1244 );
1245 _5_streams_and_multiplexing.insert(
1246 "idle sends window update frame",
1247 Box::new(|conn: Conn<IO>| Box::pin(s::idle_sends_window_update_frame(conn))),
1248 );
1249 _5_streams_and_multiplexing.insert(
1250 "idle sends continuation frame",
1251 Box::new(|conn: Conn<IO>| Box::pin(s::idle_sends_continuation_frame(conn))),
1252 );
1253 _5_streams_and_multiplexing.insert(
1254 "half closed remote sends data frame",
1255 Box::new(|conn: Conn<IO>| Box::pin(s::half_closed_remote_sends_data_frame(conn))),
1256 );
1257 _5_streams_and_multiplexing.insert(
1258 "half closed remote sends headers frame",
1259 Box::new(|conn: Conn<IO>| Box::pin(s::half_closed_remote_sends_headers_frame(conn))),
1260 );
1261 _5_streams_and_multiplexing.insert(
1262 "half closed remote sends continuation frame",
1263 Box::new(|conn: Conn<IO>| Box::pin(s::half_closed_remote_sends_continuation_frame(conn))),
1264 );
1265 _5_streams_and_multiplexing.insert(
1266 "closed sends data frame after rst stream",
1267 Box::new(|conn: Conn<IO>| Box::pin(s::closed_sends_data_frame_after_rst_stream(conn))),
1268 );
1269 _5_streams_and_multiplexing.insert(
1270 "closed sends headers frame after rst stream",
1271 Box::new(|conn: Conn<IO>| Box::pin(s::closed_sends_headers_frame_after_rst_stream(conn))),
1272 );
1273 _5_streams_and_multiplexing.insert(
1274 "closed sends continuation frame after rst stream",
1275 Box::new(|conn: Conn<IO>| Box::pin(s::closed_sends_continuation_frame_after_rst_stream(conn))),
1276 );
1277 _5_streams_and_multiplexing.insert(
1278 "closed sends data frame",
1279 Box::new(|conn: Conn<IO>| Box::pin(s::closed_sends_data_frame(conn))),
1280 );
1281 _5_streams_and_multiplexing.insert(
1282 "closed sends headers frame",
1283 Box::new(|conn: Conn<IO>| Box::pin(s::closed_sends_headers_frame(conn))),
1284 );
1285 _5_streams_and_multiplexing.insert(
1286 "closed sends continuation frame",
1287 Box::new(|conn: Conn<IO>| Box::pin(s::closed_sends_continuation_frame(conn))),
1288 );
1289 _5_streams_and_multiplexing.insert(
1290 "sends even numbered stream identifier",
1291 Box::new(|conn: Conn<IO>| Box::pin(s::sends_even_numbered_stream_identifier(conn))),
1292 );
1293 _5_streams_and_multiplexing.insert(
1294 "sends smaller stream identifier",
1295 Box::new(|conn: Conn<IO>| Box::pin(s::sends_smaller_stream_identifier(conn))),
1296 );
1297 _5_streams_and_multiplexing.insert(
1298 "exceeds concurrent stream limit",
1299 Box::new(|conn: Conn<IO>| Box::pin(s::exceeds_concurrent_stream_limit(conn))),
1300 );
1301 _5_streams_and_multiplexing.insert(
1302 "invalid ping frame for connection close",
1303 Box::new(|conn: Conn<IO>| Box::pin(s::invalid_ping_frame_for_connection_close(conn))),
1304 );
1305 _5_streams_and_multiplexing.insert(
1306 "test invalid ping frame for goaway",
1307 Box::new(|conn: Conn<IO>| Box::pin(s::test_invalid_ping_frame_for_goaway(conn))),
1308 );
1309 _5_streams_and_multiplexing.insert(
1310 "unknown extension frame in header block",
1311 Box::new(|conn: Conn<IO>| Box::pin(s::unknown_extension_frame_in_header_block(conn))),
1312 );
1313
1314 sections.insert("5. streams and multiplexing", _5_streams_and_multiplexing);
1315 }
1316 {
1317 use ::httpwg::rfc9113::_6_frame_definitions as s;
1318 let mut _6_frame_definitions: HashMap<&'static str, BoxedTest<IO>> = Default::default();
1319
1320 _6_frame_definitions.insert(
1321 "sends data frame with zero stream id",
1322 Box::new(|conn: Conn<IO>| Box::pin(s::sends_data_frame_with_zero_stream_id(conn))),
1323 );
1324 _6_frame_definitions.insert(
1325 "sends data frame on invalid stream state",
1326 Box::new(|conn: Conn<IO>| Box::pin(s::sends_data_frame_on_invalid_stream_state(conn))),
1327 );
1328 _6_frame_definitions.insert(
1329 "sends data frame with invalid pad length",
1330 Box::new(|conn: Conn<IO>| Box::pin(s::sends_data_frame_with_invalid_pad_length(conn))),
1331 );
1332 _6_frame_definitions.insert(
1333 "sends headers frame with zero stream id",
1334 Box::new(|conn: Conn<IO>| Box::pin(s::sends_headers_frame_with_zero_stream_id(conn))),
1335 );
1336 _6_frame_definitions.insert(
1337 "sends headers frame with invalid pad length",
1338 Box::new(|conn: Conn<IO>| Box::pin(s::sends_headers_frame_with_invalid_pad_length(conn))),
1339 );
1340 _6_frame_definitions.insert(
1341 "sends priority frame with zero stream id",
1342 Box::new(|conn: Conn<IO>| Box::pin(s::sends_priority_frame_with_zero_stream_id(conn))),
1343 );
1344 _6_frame_definitions.insert(
1345 "sends priority frame with invalid length",
1346 Box::new(|conn: Conn<IO>| Box::pin(s::sends_priority_frame_with_invalid_length(conn))),
1347 );
1348 _6_frame_definitions.insert(
1349 "sends rst stream frame with zero stream id",
1350 Box::new(|conn: Conn<IO>| Box::pin(s::sends_rst_stream_frame_with_zero_stream_id(conn))),
1351 );
1352 _6_frame_definitions.insert(
1353 "sends rst stream frame on idle stream",
1354 Box::new(|conn: Conn<IO>| Box::pin(s::sends_rst_stream_frame_on_idle_stream(conn))),
1355 );
1356 _6_frame_definitions.insert(
1357 "sends rst stream frame with invalid length",
1358 Box::new(|conn: Conn<IO>| Box::pin(s::sends_rst_stream_frame_with_invalid_length(conn))),
1359 );
1360 _6_frame_definitions.insert(
1361 "sends settings frame with ack and payload",
1362 Box::new(|conn: Conn<IO>| Box::pin(s::sends_settings_frame_with_ack_and_payload(conn))),
1363 );
1364 _6_frame_definitions.insert(
1365 "sends settings frame with non zero stream id",
1366 Box::new(|conn: Conn<IO>| Box::pin(s::sends_settings_frame_with_non_zero_stream_id(conn))),
1367 );
1368 _6_frame_definitions.insert(
1369 "sends settings frame with invalid length",
1370 Box::new(|conn: Conn<IO>| Box::pin(s::sends_settings_frame_with_invalid_length(conn))),
1371 );
1372 _6_frame_definitions.insert(
1373 "sends settings enable push with invalid value",
1374 Box::new(|conn: Conn<IO>| Box::pin(s::sends_settings_enable_push_with_invalid_value(conn))),
1375 );
1376 _6_frame_definitions.insert(
1377 "sends settings initial window size with invalid value",
1378 Box::new(|conn: Conn<IO>| Box::pin(s::sends_settings_initial_window_size_with_invalid_value(conn))),
1379 );
1380 _6_frame_definitions.insert(
1381 "sends settings max frame size with invalid value below initial",
1382 Box::new(|conn: Conn<IO>| Box::pin(s::sends_settings_max_frame_size_with_invalid_value_below_initial(conn))),
1383 );
1384 _6_frame_definitions.insert(
1385 "sends settings max frame size with invalid value above max",
1386 Box::new(|conn: Conn<IO>| Box::pin(s::sends_settings_max_frame_size_with_invalid_value_above_max(conn))),
1387 );
1388 _6_frame_definitions.insert(
1389 "sends settings frame with unknown identifier",
1390 Box::new(|conn: Conn<IO>| Box::pin(s::sends_settings_frame_with_unknown_identifier(conn))),
1391 );
1392 _6_frame_definitions.insert(
1393 "sends multiple values of settings initial window size",
1394 Box::new(|conn: Conn<IO>| Box::pin(s::sends_multiple_values_of_settings_initial_window_size(conn))),
1395 );
1396 _6_frame_definitions.insert(
1397 "sends settings frame without ack flag",
1398 Box::new(|conn: Conn<IO>| Box::pin(s::sends_settings_frame_without_ack_flag(conn))),
1399 );
1400 _6_frame_definitions.insert(
1401 "sends ping frame",
1402 Box::new(|conn: Conn<IO>| Box::pin(s::sends_ping_frame(conn))),
1403 );
1404 _6_frame_definitions.insert(
1405 "sends ping frame with ack",
1406 Box::new(|conn: Conn<IO>| Box::pin(s::sends_ping_frame_with_ack(conn))),
1407 );
1408 _6_frame_definitions.insert(
1409 "sends ping frame with non zero stream id",
1410 Box::new(|conn: Conn<IO>| Box::pin(s::sends_ping_frame_with_non_zero_stream_id(conn))),
1411 );
1412 _6_frame_definitions.insert(
1413 "sends ping frame with invalid length",
1414 Box::new(|conn: Conn<IO>| Box::pin(s::sends_ping_frame_with_invalid_length(conn))),
1415 );
1416 _6_frame_definitions.insert(
1417 "sends goaway frame with non zero stream id",
1418 Box::new(|conn: Conn<IO>| Box::pin(s::sends_goaway_frame_with_non_zero_stream_id(conn))),
1419 );
1420 _6_frame_definitions.insert(
1421 "sends window update frame with zero increment",
1422 Box::new(|conn: Conn<IO>| Box::pin(s::sends_window_update_frame_with_zero_increment(conn))),
1423 );
1424 _6_frame_definitions.insert(
1425 "sends window update frame with zero increment on stream",
1426 Box::new(|conn: Conn<IO>| Box::pin(s::sends_window_update_frame_with_zero_increment_on_stream(conn))),
1427 );
1428 _6_frame_definitions.insert(
1429 "sends window update frame with invalid length",
1430 Box::new(|conn: Conn<IO>| Box::pin(s::sends_window_update_frame_with_invalid_length(conn))),
1431 );
1432 _6_frame_definitions.insert(
1433 "sends settings frame to set initial window size to 1 and sends headers frame",
1434 Box::new(|conn: Conn<IO>| Box::pin(s::sends_settings_frame_to_set_initial_window_size_to_1_and_sends_headers_frame(conn))),
1435 );
1436 _6_frame_definitions.insert(
1437 "sends multiple window update frames increasing flow control window above max",
1438 Box::new(|conn: Conn<IO>| Box::pin(s::sends_multiple_window_update_frames_increasing_flow_control_window_above_max(conn))),
1439 );
1440 _6_frame_definitions.insert(
1441 "sends multiple window update frames increasing flow control window above max on stream",
1442 Box::new(|conn: Conn<IO>| Box::pin(s::sends_multiple_window_update_frames_increasing_flow_control_window_above_max_on_stream(conn))),
1443 );
1444 _6_frame_definitions.insert(
1445 "changes settings initial window size after sending headers frame",
1446 Box::new(|conn: Conn<IO>| Box::pin(s::changes_settings_initial_window_size_after_sending_headers_frame(conn))),
1447 );
1448 _6_frame_definitions.insert(
1449 "sends settings frame for window size to be negative",
1450 Box::new(|conn: Conn<IO>| Box::pin(s::sends_settings_frame_for_window_size_to_be_negative(conn))),
1451 );
1452 _6_frame_definitions.insert(
1453 "sends settings initial window size with exceeded max window size value",
1454 Box::new(|conn: Conn<IO>| Box::pin(s::sends_settings_initial_window_size_with_exceeded_max_window_size_value(conn))),
1455 );
1456 _6_frame_definitions.insert(
1457 "sends multiple continuation frames preceded by headers frame",
1458 Box::new(|conn: Conn<IO>| Box::pin(s::sends_multiple_continuation_frames_preceded_by_headers_frame(conn))),
1459 );
1460 _6_frame_definitions.insert(
1461 "sends continuation frame followed by non continuation frame",
1462 Box::new(|conn: Conn<IO>| Box::pin(s::sends_continuation_frame_followed_by_non_continuation_frame(conn))),
1463 );
1464 _6_frame_definitions.insert(
1465 "sends continuation frame with zero stream id",
1466 Box::new(|conn: Conn<IO>| Box::pin(s::sends_continuation_frame_with_zero_stream_id(conn))),
1467 );
1468 _6_frame_definitions.insert(
1469 "sends continuation frame preceded by headers frame with end headers flag",
1470 Box::new(|conn: Conn<IO>| Box::pin(s::sends_continuation_frame_preceded_by_headers_frame_with_end_headers_flag(conn))),
1471 );
1472 _6_frame_definitions.insert(
1473 "sends continuation frame preceded by continuation frame with end headers flag",
1474 Box::new(|conn: Conn<IO>| Box::pin(s::sends_continuation_frame_preceded_by_continuation_frame_with_end_headers_flag(conn))),
1475 );
1476 _6_frame_definitions.insert(
1477 "sends continuation frame preceded by data frame",
1478 Box::new(|conn: Conn<IO>| Box::pin(s::sends_continuation_frame_preceded_by_data_frame(conn))),
1479 );
1480
1481 sections.insert("6. frame definitions", _6_frame_definitions);
1482 }
1483 {
1484 use ::httpwg::rfc9113::_7_error_codes as s;
1485 let mut _7_error_codes: HashMap<&'static str, BoxedTest<IO>> = Default::default();
1486
1487 _7_error_codes.insert(
1488 "sends goaway frame with unknown error code",
1489 Box::new(|conn: Conn<IO>| Box::pin(s::sends_goaway_frame_with_unknown_error_code(conn))),
1490 );
1491 _7_error_codes.insert(
1492 "sends rst stream frame with unknown error code",
1493 Box::new(|conn: Conn<IO>| Box::pin(s::sends_rst_stream_frame_with_unknown_error_code(conn))),
1494 );
1495
1496 sections.insert("7. error codes", _7_error_codes);
1497 }
1498 {
1499 use ::httpwg::rfc9113::_8_expressing_http_semantics_in_http2 as s;
1500 let mut _8_expressing_http_semantics_in_http2: HashMap<&'static str, BoxedTest<IO>> = Default::default();
1501
1502 _8_expressing_http_semantics_in_http2.insert(
1503 "sends second headers frame without end stream",
1504 Box::new(|conn: Conn<IO>| Box::pin(s::sends_second_headers_frame_without_end_stream(conn))),
1505 );
1506 _8_expressing_http_semantics_in_http2.insert(
1507 "sends headers frame with incorrect content length single data frame",
1508 Box::new(|conn: Conn<IO>| Box::pin(s::sends_headers_frame_with_incorrect_content_length_single_data_frame(conn))),
1509 );
1510 _8_expressing_http_semantics_in_http2.insert(
1511 "sends headers frame with incorrect content length multiple data frames",
1512 Box::new(|conn: Conn<IO>| Box::pin(s::sends_headers_frame_with_incorrect_content_length_multiple_data_frames(conn))),
1513 );
1514 _8_expressing_http_semantics_in_http2.insert(
1515 "sends headers frame with uppercase field name",
1516 Box::new(|conn: Conn<IO>| Box::pin(s::sends_headers_frame_with_uppercase_field_name(conn))),
1517 );
1518 _8_expressing_http_semantics_in_http2.insert(
1519 "sends headers frame with space in field name",
1520 Box::new(|conn: Conn<IO>| Box::pin(s::sends_headers_frame_with_space_in_field_name(conn))),
1521 );
1522 _8_expressing_http_semantics_in_http2.insert(
1523 "sends headers frame with non visible ascii",
1524 Box::new(|conn: Conn<IO>| Box::pin(s::sends_headers_frame_with_non_visible_ascii(conn))),
1525 );
1526 _8_expressing_http_semantics_in_http2.insert(
1527 "sends headers frame with del character",
1528 Box::new(|conn: Conn<IO>| Box::pin(s::sends_headers_frame_with_del_character(conn))),
1529 );
1530 _8_expressing_http_semantics_in_http2.insert(
1531 "sends headers frame with non ascii character",
1532 Box::new(|conn: Conn<IO>| Box::pin(s::sends_headers_frame_with_non_ascii_character(conn))),
1533 );
1534 _8_expressing_http_semantics_in_http2.insert(
1535 "sends headers frame with colon in field name",
1536 Box::new(|conn: Conn<IO>| Box::pin(s::sends_headers_frame_with_colon_in_field_name(conn))),
1537 );
1538 _8_expressing_http_semantics_in_http2.insert(
1539 "sends headers frame with lf in field value",
1540 Box::new(|conn: Conn<IO>| Box::pin(s::sends_headers_frame_with_lf_in_field_value(conn))),
1541 );
1542 _8_expressing_http_semantics_in_http2.insert(
1543 "sends headers frame with cr in field value",
1544 Box::new(|conn: Conn<IO>| Box::pin(s::sends_headers_frame_with_cr_in_field_value(conn))),
1545 );
1546 _8_expressing_http_semantics_in_http2.insert(
1547 "sends headers frame with nul in field value",
1548 Box::new(|conn: Conn<IO>| Box::pin(s::sends_headers_frame_with_nul_in_field_value(conn))),
1549 );
1550 _8_expressing_http_semantics_in_http2.insert(
1551 "sends headers frame with leading space in field value",
1552 Box::new(|conn: Conn<IO>| Box::pin(s::sends_headers_frame_with_leading_space_in_field_value(conn))),
1553 );
1554 _8_expressing_http_semantics_in_http2.insert(
1555 "sends headers frame with trailing tab in field value",
1556 Box::new(|conn: Conn<IO>| Box::pin(s::sends_headers_frame_with_trailing_tab_in_field_value(conn))),
1557 );
1558 _8_expressing_http_semantics_in_http2.insert(
1559 "sends headers frame with connection header",
1560 Box::new(|conn: Conn<IO>| Box::pin(s::sends_headers_frame_with_connection_header(conn))),
1561 );
1562 _8_expressing_http_semantics_in_http2.insert(
1563 "sends headers frame with proxy connection header",
1564 Box::new(|conn: Conn<IO>| Box::pin(s::sends_headers_frame_with_proxy_connection_header(conn))),
1565 );
1566 _8_expressing_http_semantics_in_http2.insert(
1567 "sends headers frame with keep alive header",
1568 Box::new(|conn: Conn<IO>| Box::pin(s::sends_headers_frame_with_keep_alive_header(conn))),
1569 );
1570 _8_expressing_http_semantics_in_http2.insert(
1571 "sends headers frame with transfer encoding header",
1572 Box::new(|conn: Conn<IO>| Box::pin(s::sends_headers_frame_with_transfer_encoding_header(conn))),
1573 );
1574 _8_expressing_http_semantics_in_http2.insert(
1575 "sends headers frame with upgrade header",
1576 Box::new(|conn: Conn<IO>| Box::pin(s::sends_headers_frame_with_upgrade_header(conn))),
1577 );
1578 _8_expressing_http_semantics_in_http2.insert(
1579 "sends headers frame with te trailers",
1580 Box::new(|conn: Conn<IO>| Box::pin(s::sends_headers_frame_with_te_trailers(conn))),
1581 );
1582 _8_expressing_http_semantics_in_http2.insert(
1583 "sends headers frame with te not trailers",
1584 Box::new(|conn: Conn<IO>| Box::pin(s::sends_headers_frame_with_te_not_trailers(conn))),
1585 );
1586 _8_expressing_http_semantics_in_http2.insert(
1587 "sends headers frame with response pseudo header",
1588 Box::new(|conn: Conn<IO>| Box::pin(s::sends_headers_frame_with_response_pseudo_header(conn))),
1589 );
1590 _8_expressing_http_semantics_in_http2.insert(
1591 "sends headers frame with pseudo header in trailer",
1592 Box::new(|conn: Conn<IO>| Box::pin(s::sends_headers_frame_with_pseudo_header_in_trailer(conn))),
1593 );
1594 _8_expressing_http_semantics_in_http2.insert(
1595 "sends headers frame with duplicate pseudo headers",
1596 Box::new(|conn: Conn<IO>| Box::pin(s::sends_headers_frame_with_duplicate_pseudo_headers(conn))),
1597 );
1598 _8_expressing_http_semantics_in_http2.insert(
1599 "sends headers frame with mismatched host authority",
1600 Box::new(|conn: Conn<IO>| Box::pin(s::sends_headers_frame_with_mismatched_host_authority(conn))),
1601 );
1602 _8_expressing_http_semantics_in_http2.insert(
1603 "sends headers frame with empty path component",
1604 Box::new(|conn: Conn<IO>| Box::pin(s::sends_headers_frame_with_empty_path_component(conn))),
1605 );
1606 _8_expressing_http_semantics_in_http2.insert(
1607 "sends headers frame without method",
1608 Box::new(|conn: Conn<IO>| Box::pin(s::sends_headers_frame_without_method(conn))),
1609 );
1610 _8_expressing_http_semantics_in_http2.insert(
1611 "sends headers frame without scheme",
1612 Box::new(|conn: Conn<IO>| Box::pin(s::sends_headers_frame_without_scheme(conn))),
1613 );
1614 _8_expressing_http_semantics_in_http2.insert(
1615 "sends headers frame without path",
1616 Box::new(|conn: Conn<IO>| Box::pin(s::sends_headers_frame_without_path(conn))),
1617 );
1618 _8_expressing_http_semantics_in_http2.insert(
1619 "sends headers frame without status",
1620 Box::new(|conn: Conn<IO>| Box::pin(s::sends_headers_frame_without_status(conn))),
1621 );
1622 _8_expressing_http_semantics_in_http2.insert(
1623 "client sends push promise frame",
1624 Box::new(|conn: Conn<IO>| Box::pin(s::client_sends_push_promise_frame(conn))),
1625 );
1626 _8_expressing_http_semantics_in_http2.insert(
1627 "sends connect with scheme",
1628 Box::new(|conn: Conn<IO>| Box::pin(s::sends_connect_with_scheme(conn))),
1629 );
1630 _8_expressing_http_semantics_in_http2.insert(
1631 "sends connect with path",
1632 Box::new(|conn: Conn<IO>| Box::pin(s::sends_connect_with_path(conn))),
1633 );
1634 _8_expressing_http_semantics_in_http2.insert(
1635 "sends connect without authority",
1636 Box::new(|conn: Conn<IO>| Box::pin(s::sends_connect_without_authority(conn))),
1637 );
1638 _8_expressing_http_semantics_in_http2.insert(
1639 "sends headers frame with pseudo headers after regular headers",
1640 Box::new(|conn: Conn<IO>| Box::pin(s::sends_headers_frame_with_pseudo_headers_after_regular_headers(conn))),
1641 );
1642
1643 sections.insert("8. expressing http semantics in http2", _8_expressing_http_semantics_in_http2);
1644 }
1645
1646 rfcs.insert("RFC 9113", sections);
1647 }
1648
1649 rfcs
1650 }
1651 }
1652}