Skip to content

Commit acb5a40

Browse files
committed
test: add check for iteration count when test is in error
The api does not return an iteration count, so it is easier to read if a customary value is used. Zero seems like the most logical.
1 parent d4fdb9f commit acb5a40

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/coin_grinder.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,7 @@ mod tests {
371371
Err(e) => {
372372
let expected_error = self.expected_error.clone().unwrap();
373373
assert!(self.expected_utxos.is_empty());
374+
assert!(self.expected_iterations == 0);
374375
assert_eq!(e, expected_error);
375376
}
376377
}
@@ -611,7 +612,7 @@ mod tests {
611612
],
612613
expected_utxos: &[],
613614
expected_error: Some(Overflow(Addition)),
614-
expected_iterations: 8,
615+
expected_iterations: 0,
615616
}
616617
.assert();
617618
}
@@ -626,7 +627,7 @@ mod tests {
626627
weighted_utxos: &["10 sats/8 wu", "7 sats/4 wu", "5 sats/4 wu", "4 sats/8 wu"],
627628
expected_utxos: &[],
628629
expected_error: Some(Overflow(Addition)),
629-
expected_iterations: 8,
630+
expected_iterations: 0,
630631
}
631632
.assert();
632633
}

0 commit comments

Comments
 (0)