Skip to content

Commit 7a99b6d

Browse files
committed
std: Add debugging for a failing test on appveyor
I'm not sure why this is failing, so let's hopefully get some more information to help investigation!
1 parent f6e9485 commit 7a99b6d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/libstd/time.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,8 @@ mod tests {
481481
let (a, b) = ($a, $b);
482482
if a != b {
483483
let (a, b) = if a > b {(a, b)} else {(b, a)};
484-
assert!(a - Duration::new(0, 100) <= b);
484+
assert!(a - Duration::new(0, 100) <= b,
485+
"{:?} is not almost equal to {:?}", a, b);
485486
}
486487
})
487488
}
@@ -503,7 +504,10 @@ mod tests {
503504
fn instant_math() {
504505
let a = Instant::now();
505506
let b = Instant::now();
507+
println!("a: {:?}", a);
508+
println!("b: {:?}", b);
506509
let dur = b.duration_since(a);
510+
println!("dur: {:?}", dur);
507511
assert_almost_eq!(b - dur, a);
508512
assert_almost_eq!(a + dur, b);
509513

0 commit comments

Comments
 (0)