in neqo-qpack/src/encoder_instructions.rs [312:391]
fn encoding_decoding_instructions() {
test_encoding_decoding(&EncoderInstruction::Capacity { value: 1 }, false);
test_encoding_decoding(&EncoderInstruction::Capacity { value: 10_000 }, false);
test_encoding_decoding(
&EncoderInstruction::InsertWithNameRefStatic {
index: 1,
value: &[0x62, 0x64, 0x65],
},
false,
);
test_encoding_decoding(
&EncoderInstruction::InsertWithNameRefStatic {
index: 1,
value: &[0x62, 0x64, 0x65],
},
true,
);
test_encoding_decoding(
&EncoderInstruction::InsertWithNameRefStatic {
index: 10_000,
value: &[0x62, 0x64, 0x65],
},
false,
);
test_encoding_decoding(
&EncoderInstruction::InsertWithNameRefStatic {
index: 10_000,
value: &[0x62, 0x64, 0x65],
},
true,
);
test_encoding_decoding(
&EncoderInstruction::InsertWithNameRefDynamic {
index: 1,
value: &[0x62, 0x64, 0x65],
},
false,
);
test_encoding_decoding(
&EncoderInstruction::InsertWithNameRefDynamic {
index: 1,
value: &[0x62, 0x64, 0x65],
},
true,
);
test_encoding_decoding(
&EncoderInstruction::InsertWithNameRefDynamic {
index: 10_000,
value: &[0x62, 0x64, 0x65],
},
false,
);
test_encoding_decoding(
&EncoderInstruction::InsertWithNameRefDynamic {
index: 10_000,
value: &[0x62, 0x64, 0x65],
},
true,
);
test_encoding_decoding(
&EncoderInstruction::InsertWithNameLiteral {
name: &[0x62, 0x64, 0x65],
value: &[0x62, 0x64, 0x65],
},
false,
);
test_encoding_decoding(
&EncoderInstruction::InsertWithNameLiteral {
name: &[0x62, 0x64, 0x65],
value: &[0x62, 0x64, 0x65],
},
true,
);
test_encoding_decoding(&EncoderInstruction::Duplicate { index: 1 }, false);
test_encoding_decoding(&EncoderInstruction::Duplicate { index: 10_000 }, false);
}