libfreemkv 0.31.4: prune 144 vacuous tests (keep spec-grounded subset)

This commit is contained in:
Matthew Jackson
2026-06-08 07:28:55 -07:00
parent d181362460
commit f79c2a0aa9
51 changed files with 7 additions and 2142 deletions
-28
View File
@@ -157,11 +157,6 @@ mod tests {
assert_eq!(mask_string("café9"), "AAAé0");
}
#[test]
fn mask_string_empty_is_empty() {
assert_eq!(mask_string(""), "");
}
#[test]
fn mask_bytes_matches_string_masking_for_ascii() {
// mask_bytes is the byte-wise analogue: letters→b'A', digits→b'0'.
@@ -178,19 +173,6 @@ mod tests {
assert_eq!(mask_bytes(&input), vec![0x00, b'A', 0x20, b'0', 0xFF, b'-']);
}
#[test]
fn mask_bytes_length_preserved() {
// Masking is 1:1 — output length always equals input length so
// fixed-offset fields stay aligned.
let input = vec![0u8; 96];
assert_eq!(mask_bytes(&input).len(), 96);
}
#[test]
fn mask_bytes_empty_is_empty() {
assert!(mask_bytes(&[]).is_empty());
}
#[test]
fn feature_table_has_no_duplicate_codes() {
// capture_drive_data iterates FEATURES once per code; a duplicate
@@ -211,14 +193,4 @@ mod tests {
"AACS feature 0x010D must be captured"
);
}
#[test]
fn feature_table_codes_are_sorted_ascending() {
// The table is maintained in ascending MMC-6 code order; a code
// inserted out of order is a maintenance smell that this pins.
let codes: Vec<u16> = FEATURES.iter().map(|&(c, _)| c).collect();
let mut sorted = codes.clone();
sorted.sort_unstable();
assert_eq!(codes, sorted, "FEATURES must stay in ascending code order");
}
}