Skip to content

Commit

Permalink
Reformat with rustfmt
Browse files Browse the repository at this point in the history
  • Loading branch information
thomask7b committed Nov 12, 2024
1 parent d435eae commit 78d82ec
Showing 1 changed file with 20 additions and 5 deletions.
25 changes: 20 additions & 5 deletions src/bitcoin/d/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1560,10 +1560,25 @@ mod tests {

#[test]
fn test_rounded_up_progress() {
assert_eq!(SyncProgress::new(0.6, 1_000, 1_000).rounded_up_progress(), 0.6);
assert_eq!(SyncProgress::new(0.67891, 1_000, 1_000).rounded_up_progress(), 0.6789);
assert_eq!(SyncProgress::new(0.99991, 1_000, 1_000).rounded_up_progress(), 1.0);
assert_eq!(SyncProgress::new(1.2, 1_000, 1_000).rounded_up_progress(), 1.0);
assert_eq!(SyncProgress::new(1.0, 1_000, 999).rounded_up_progress(), 0.9999);
assert_eq!(
SyncProgress::new(0.6, 1_000, 1_000).rounded_up_progress(),
0.6
);
assert_eq!(
SyncProgress::new(0.67891, 1_000, 1_000).rounded_up_progress(),
0.6789
);
assert_eq!(
SyncProgress::new(0.99991, 1_000, 1_000).rounded_up_progress(),
1.0
);
assert_eq!(
SyncProgress::new(1.2, 1_000, 1_000).rounded_up_progress(),
1.0
);
assert_eq!(
SyncProgress::new(1.0, 1_000, 999).rounded_up_progress(),
0.9999
);
}
}

0 comments on commit 78d82ec

Please sign in to comment.