15 lines
1.2 KiB
Diff
15 lines
1.2 KiB
Diff
# must fail: abr_out_of_bounds_last_n abr_out_of_bounds_horizon
|
|
# a parameter past its type truncated (the corpus tool's policy reading)
|
|
diff --git a/wai/wai-rs/src/bin/wai_cli/http_vectors_playlists.rs b/wai/wai-rs/src/bin/wai_cli/http_vectors_playlists.rs
|
|
index 3d4fecbb..b61542ec 100644
|
|
--- a/wai/wai-rs/src/bin/wai_cli/http_vectors_playlists.rs
|
|
+++ b/wai/wai-rs/src/bin/wai_cli/http_vectors_playlists.rs
|
|
@@ -420,7 +420,7 @@ fn bounded_opt(v: &Value, max: u64, what: &str) -> Result<Option<u64>, Stop> {
|
|
/// and the like, each parameter within its type (Appendix F).
|
|
pub(super) fn policy(v: &Value) -> Result<Box<dyn Policy>, Stop> {
|
|
let u = |k: &str, max: u64| bounded(&v[k], max, &format!("policy.{k}"));
|
|
- let (u8m, u16m, u32m) = (u64::from(u8::MAX), u64::from(u16::MAX), u64::from(u32::MAX));
|
|
+ let (u8m, u16m, u32m) = (u64::MAX, u64::MAX, u64::MAX);
|
|
Ok(match v["id"].as_str() {
|
|
Some("throughput") => Box::new(Throughput { last_n: u("last_n", u8m)? as u8, safety_permille: u("safety_permille", u16m)? as u16 }),
|
|
Some("buffer_based") => Box::new(BufferBased { reservoir_ms: u("reservoir_ms", u32m)? as u32, cushion_ms: u("cushion_ms", u32m)? as u32 }),
|