Skip to content

Commit

Permalink
tests: properly format a limb on 32-bit arch
Browse files Browse the repository at this point in the history
  • Loading branch information
vkrasnov authored and briansmith committed Jan 24, 2024
1 parent 14c6e3d commit ee5db43
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/ec/suite_b/ops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1154,9 +1154,10 @@ mod tests {
let mut actual_s = alloc::string::String::new();
let mut expected_s = alloc::string::String::new();
for j in 0..ops.num_limbs {
let formatted = format!("{:016x}", actual[ops.num_limbs - j - 1]);
let width = LIMB_BITS / 4;
let formatted = format!("{:0width$x}", actual[ops.num_limbs - j - 1]);
actual_s.push_str(&formatted);
let formatted = format!("{:016x}", expected[ops.num_limbs - j - 1]);
let formatted = format!("{:0width$x}", expected[ops.num_limbs - j - 1]);
expected_s.push_str(&formatted);
}
panic!(
Expand Down

0 comments on commit ee5db43

Please sign in to comment.