[domistream] Control: tests first, START_B, PERIODIC_PING and the IDR request with empty bodies (START_A stays refused)
This commit is contained in:
@@ -381,11 +381,18 @@ fn client_messages() {
|
||||
encode_client_message(&ClientMessage::Input(ev.clone())).unwrap(),
|
||||
domistream::input::encode_input(&ev).unwrap()
|
||||
);
|
||||
// Bodies still UNKNOWN (U10) are refused rather than guessed.
|
||||
for m in [ClientMessage::StartA, ClientMessage::StartB, ClientMessage::PeriodicPing, ClientMessage::RequestIdrFrame]
|
||||
{
|
||||
assert_err!(encode_client_message(&m), Error::Unsupported { .. }, "{m:?}");
|
||||
// START_B, PERIODIC_PING and the IDR request go with an empty body (PROTOCOL.md 3.3: what Moonshine and Lumen
|
||||
// read; the lead's decision of 2026-12-04). START_A's body is still UNKNOWN (U10) and stays refused.
|
||||
for (m, t) in [
|
||||
(ClientMessage::StartB, 0x0307u16),
|
||||
(ClientMessage::PeriodicPing, 0x0200),
|
||||
(ClientMessage::RequestIdrFrame, 0x0302),
|
||||
] {
|
||||
let mut want = t.to_le_bytes().to_vec();
|
||||
want.extend_from_slice(&0u16.to_le_bytes());
|
||||
assert_eq!(encode_client_message(&m).unwrap(), want, "{m:?}");
|
||||
}
|
||||
assert_err!(encode_client_message(&ClientMessage::StartA), Error::Unsupported { .. });
|
||||
}
|
||||
|
||||
proptest! {
|
||||
|
||||
Reference in New Issue
Block a user