[domistream] Tests: properties cannot pass against Unimplemented

The never-panic properties (XML, RTSP, ENet, control, input, media) and the
allocation-cap checks only asserted inside `if let Ok`, so a stub returning
Unimplemented for everything passed them. Each now also requires the parser
to answer something other than Unimplemented (common::implemented); the XML
truncation property wants Malformed or Truncated, not any error.
This commit is contained in:
2026-11-25 13:15:00 +01:00
parent 2740d3dd45
commit e67daea536
8 changed files with 94 additions and 112 deletions
+6
View File
@@ -40,6 +40,12 @@ macro_rules! assert_too_large {
};
}
/// False for `Err(Unimplemented)`. "Never panics" properties assert this on every result, so they cannot pass
/// against a stub that returns `Unimplemented` for everything.
pub fn implemented<T>(r: &domistream::Result<T>) -> bool {
!matches!(r, Err(domistream::Error::Unimplemented))
}
// ------------------------------------------------------------------------------------------------ randomness
/// A seeded, deterministic random source (splitmix64). Never for production.