diff options
author | cooldome <ariabushenko@bk.ru> | 2018-04-26 23:56:43 +0100 |
---|---|---|
committer | cooldome <ariabushenko@bk.ru> | 2018-04-26 23:56:43 +0100 |
commit | e2a4a43acc98743d0d2d4db1f9478f2582507dcf (patch) | |
tree | 1d011264c5ffcb5fd06c8331644ce3ae1ec62ffa /tests/stdlib | |
parent | a95316f78bf3a785c441c5832b5b11c262ef70ce (diff) | |
parent | 397e1731393be598991df302006ec3634baa3583 (diff) | |
download | Nim-e2a4a43acc98743d0d2d4db1f9478f2582507dcf.tar.gz |
Merge branch 'devel' into range_float_type
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 |