From b67f57afdd80e75c93c4ae49e12b8bb16d209916 Mon Sep 17 00:00:00 2001 From: Michael Woerister Date: Fri, 26 Aug 2016 12:26:20 -0400 Subject: [PATCH] incr. comp.: Fix test_timestamp_serialization so it does not overflow on some 32bit systems. --- src/librustc_incremental/persist/fs.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/librustc_incremental/persist/fs.rs b/src/librustc_incremental/persist/fs.rs index 6eb3124e08ee..9e4a16fd43c0 100644 --- a/src/librustc_incremental/persist/fs.rs +++ b/src/librustc_incremental/persist/fs.rs @@ -902,9 +902,9 @@ fn test_all_except_most_recent() { #[test] fn test_timestamp_serialization() { for i in 0 .. 1_000u64 { - let time = UNIX_EPOCH + Duration::new(i * 3_434_578, (i as u32) * 239_000); + let time = UNIX_EPOCH + Duration::new(i * 1_434_578, (i as u32) * 239_000); let s = timestamp_to_string(time); - assert_eq!(time, string_to_timestamp(&s).unwrap()); + assert_eq!(Ok(time), string_to_timestamp(&s)); } }