diff options
| author | Sean Griffin <sean@seantheprogrammer.com> | 2015-12-03 08:27:32 -0700 |
|---|---|---|
| committer | Sean Griffin <sean@seantheprogrammer.com> | 2015-12-03 08:27:32 -0700 |
| commit | 5dbc373f708fb203a354f2b6b08009c28d694244 (patch) | |
| tree | 20d5dd32367a8e02459b69054550c1f340dbe0f0 /src/libstd | |
| parent | a59cd363cc77bbfb7ba95fb7a063577436fd533a (diff) | |
| download | rust-5dbc373f708fb203a354f2b6b08009c28d694244.tar.gz rust-5dbc373f708fb203a354f2b6b08009c28d694244.zip | |
Fix tests for SystemTime addition on mac and ios
Those platforms don't support nanosecond precision, so adding 1 nanosecond does nothing.
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/time/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/time/mod.rs b/src/libstd/time/mod.rs index b7509cd3800..e3ce8e0de4b 100644 --- a/src/libstd/time/mod.rs +++ b/src/libstd/time/mod.rs @@ -305,8 +305,8 @@ mod tests { assert_almost_eq!(a - (eighty_years * 10) + (eighty_years * 10), a); let one_second_from_epoch = UNIX_EPOCH + Duration::new(1, 0); - let one_second_from_epoch2 = UNIX_EPOCH + Duration::new(0, 999_999_999) - + Duration::new(0, 1); + let one_second_from_epoch2 = UNIX_EPOCH + Duration::new(0, 500_000_000) + + Duration::new(0, 500_000_000); assert_eq!(one_second_from_epoch, one_second_from_epoch2); } |
