From 4904d6367a176ac790916bf9a5a8b292e6fffb18 Mon Sep 17 00:00:00 2001 From: vangel76 Date: Sun, 15 Nov 2026 18:35:06 +0100 Subject: [PATCH] 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 --- crates/raw/src/crx.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/crates/raw/src/crx.rs b/crates/raw/src/crx.rs index 935975224..4d8f53ba8 100644 --- a/crates/raw/src/crx.rs +++ b/crates/raw/src/crx.rs @@ -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]