Union tests: the undeclared negative key assertion matches the message wording

Builds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-10-11 04:39:34 +02:00
commit fb51df9d75

View file

@ -364,7 +364,7 @@ mod arm_keys {
fn a_negative_undeclared_key_is_an_unknown_arm_naming_the_key() {
for (key, shown) in [(&[0xe0][..], "-32"), (&[0xd0, 0xdf], "-33"), (&[0xd1, 0x80, 0x00], "-32768"), (&[0xd2, 0x80, 0x00, 0x00, 0x01], "-2147483647")] {
let text = message(&pair(key));
assert!(text.contains(&format!("unknown arm key {shown};")), "{text}");
assert!(text.contains(&format!("unknown arm key {shown} ")), "{text}");
assert!(text.contains("declared keys: -2147483648, -1, 7, 2147483647"), "{text}");
assert!(!text.contains("CA"), "{text}");
}