We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f6e9485 commit 7a99b6dCopy full SHA for 7a99b6d
src/libstd/time.rs
@@ -481,7 +481,8 @@ mod tests {
481
let (a, b) = ($a, $b);
482
if a != b {
483
let (a, b) = if a > b {(a, b)} else {(b, a)};
484
- assert!(a - Duration::new(0, 100) <= b);
+ assert!(a - Duration::new(0, 100) <= b,
485
+ "{:?} is not almost equal to {:?}", a, b);
486
}
487
})
488
@@ -503,7 +504,10 @@ mod tests {
503
504
fn instant_math() {
505
let a = Instant::now();
506
let b = Instant::now();
507
+ println!("a: {:?}", a);
508
+ println!("b: {:?}", b);
509
let dur = b.duration_since(a);
510
+ println!("dur: {:?}", dur);
511
assert_almost_eq!(b - dur, a);
512
assert_almost_eq!(a + dur, b);
513
0 commit comments