From 72edac0eb2db7ed4289670eb58c0e4796b0cd9a6 Mon Sep 17 00:00:00 2001 From: Elisha Hollander Date: Wed, 17 Apr 2024 23:33:51 +0300 Subject: allow the tests to pass tidy --- src/tools/tidy/src/style/tests.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/tools/tidy/src/style/tests.rs b/src/tools/tidy/src/style/tests.rs index bf2a7bc6ebd..292e23916d2 100644 --- a/src/tools/tidy/src/style/tests.rs +++ b/src/tools/tidy/src/style/tests.rs @@ -5,13 +5,13 @@ fn test_generate_problematic_strings() { let problematic_regex = RegexSet::new( generate_problematic_strings( ROOT_PROBLEMATIC_CONSTS, - &[('A', '4'), ('B', '8'), ('E', '3'), ('F', '0')].iter().cloned().collect(), + &[('A', '4'), ('B', '8'), ('E', '3'), ('0', 'F')].iter().cloned().collect(), // use "futile" F intentionally ) .as_slice(), ) .unwrap(); - assert!(problematic_regex.is_match("524421")); // check for only "decimal" hex digits (converted to integer intentionally) - assert!(problematic_regex.is_match("721077")); // check for char replacements (converted to integer intentionally) - assert!(problematic_regex.is_match("8FF85")); // check for hex display but use "futile" F intentionally + assert!(problematic_regex.is_match("786357")); // check with no "decimal" hex digits - converted to integer + assert!(problematic_regex.is_match("589701")); // check with "decimal" replacements - converted to integer + assert!(problematic_regex.is_match("8FF85")); // check for hex display assert!(!problematic_regex.is_match("1193046")); // check for non-matching value } -- cgit 1.4.1-3-g733a5