mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-16 23:42:27 +00:00
test(raw): a corrupt CR3 QP map is reported as a QP error, not a plane error
Part of #1654 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ee87ab6c9e
commit
4904d6367a
1 file changed
+5
@@ -1310,6 +1310,11 @@ mod tests {
|
||||
for end in 0..sample.len() {
|
||||
assert!(decode(&sample[..end], &config).is_err());
|
||||
}
|
||||
// A corrupt QP map (nonzero alignment bits) is reported as such, not as a plane error.
|
||||
let at = sample.windows(5).position(|bytes| bytes == [0, 0, 1, 0x2c, 0x94]).unwrap() + 4;
|
||||
sample[at] ^= 1;
|
||||
let error = decode(&sample, &config).unwrap_err().to_string();
|
||||
assert!(error.contains("alignment") && !error.contains("plane"), "{error}");
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in new issue
Block a user