@@ -1453,11 +1453,10 @@ fn test_subs() {
14531453 parse_multi_syllable_symex ( SymexSyllableRule :: Multiple , Script :: Normal ) ,
14541454 no_state_setup,
14551455 ) ;
1456- if got != expected {
1457- panic ! (
1458- "Parsing '{input}' with parse_multi_syllable_symex, expected '{expected}', got '{got}'"
1459- ) ;
1460- }
1456+ assert_eq ! (
1457+ got, expected,
1458+ "Parsing '{input}' with parse_multi_syllable_symex, expected '{expected}', got '{got}'"
1459+ ) ;
14611460 }
14621461
14631462 check ( "@beta@" , "β" ) ;
@@ -1485,11 +1484,10 @@ fn test_greek_letters() {
14851484 parse_multi_syllable_symex ( SymexSyllableRule :: Multiple , Script :: Normal ) ,
14861485 no_state_setup,
14871486 ) ;
1488- if got != input {
1489- panic ! (
1490- "Parsing '{input}' with parse_multi_syllable_symex, expected '{input}', got '{got}'"
1491- ) ;
1492- }
1487+ assert_eq ! (
1488+ got, input,
1489+ "Parsing '{input}' with parse_multi_syllable_symex, expected '{input}', got '{got}'"
1490+ ) ;
14931491 }
14941492 check ( "β" ) ;
14951493 check ( "γ" ) ;
@@ -2699,11 +2697,11 @@ fn test_make_bit_designator_literal() {
26992697 BitDesignatorValidation :: Good ( literal) => {
27002698 dbg ! ( & literal) ;
27012699 let n = literal. unshifted_value ( ) ;
2702- if ( n & ( ! MASK ) ) != 0 {
2703- panic ! (
2704- "bit designator {what} produced output {n:o} but that has bits set outside the allowed mask {MASK:o}"
2705- ) ;
2706- }
2700+ assert_eq ! (
2701+ ( n & ( ! MASK ) ) ,
2702+ 0 ,
2703+ "bit designator {what} produced output {n:o} but that has bits set outside the allowed mask {MASK:o}"
2704+ ) ;
27072705 if let Some ( ( prevq, prevb) ) = seen. insert ( n, ( q, bit) ) {
27082706 panic ! (
27092707 "two distinct bit designators both evaluate to {n}: {what} and {}" ,
0 commit comments