diff options
Diffstat (limited to 'tests/stdlib')
-rw-r--r-- | tests/stdlib/ttimes.nim | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/stdlib/ttimes.nim b/tests/stdlib/ttimes.nim index 945d7ba3d..37e14c1e2 100644 --- a/tests/stdlib/ttimes.nim +++ b/tests/stdlib/ttimes.nim @@ -367,6 +367,10 @@ suite "ttimes": check d(seconds = 0) - d(milliseconds = 1500) == d(milliseconds = -1500) check d(milliseconds = -1500) == d(seconds = -1, milliseconds = -500) check d(seconds = -1, milliseconds = 500) == d(milliseconds = -500) + check initDuration(seconds = 1, nanoseconds = 2) <= + initDuration(seconds = 1, nanoseconds = 3) + check (initDuration(seconds = 1, nanoseconds = 3) <= + initDuration(seconds = 1, nanoseconds = 1)).not test "large/small dates": discard initDateTime(1, mJan, -35_000, 12, 00, 00, utc()) @@ -413,7 +417,7 @@ suite "ttimes": test "fromWinTime/toWinTime": check 0.fromUnix.toWinTime.fromWinTime.toUnix == 0 - check (-1).fromWinTime.nanoseconds == convert(Seconds, Nanoseconds, 1) - 100 + check (-1).fromWinTime.nanosecond == convert(Seconds, Nanoseconds, 1) - 100 check -1.fromWinTime.toWinTime == -1 # One nanosecond is discarded due to differences in time resolution - check initTime(0, 101).toWinTime.fromWinTime.nanoseconds == 100 \ No newline at end of file + check initTime(0, 101).toWinTime.fromWinTime.nanosecond == 100 \ No newline at end of file |