mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-25 20:22:39 +00:00
style: format DPX decoded budget assertion
This commit is contained in:
@@ -534,6 +534,9 @@ fn widened_samples_obey_the_exact_decoded_pixel_budget() {
|
||||
let options = |max_alloc| DecodeOptions { limits: Limits { max_alloc, ..Limits::default() }, ..Default::default() };
|
||||
let budget = 5 * 3 * 3 * 2;
|
||||
assert!(decode_with(&bytes, &options(budget)).is_ok(), "the exact U16 pixel budget accepts the frame");
|
||||
assert!(matches!(decode_with(&bytes, &options(budget - 1)), Err(CodecError::LimitExceeded(_))), "one byte below the decoded size rejects the frame");
|
||||
assert!(
|
||||
matches!(decode_with(&bytes, &options(budget - 1)), Err(CodecError::LimitExceeded(_))),
|
||||
"one byte below the decoded size rejects the frame"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user