summary refs log tree commit diff stats
path: root/tests/stdlib/ttime.nim
Commit message (Collapse)AuthorAgeFilesLines
* Fix #4922, bug in times.parse, mishandling DST.Jonathan Bernard2016-10-211-0/+16
|
* Bugfix for times.initInterval (issue #4889)Jonathan Bernard2016-10-121-1/+8
| | | | | | | | | | | | | | | | | | | | | | | `initInterval` had logic to calculate and carry overflowed fields (65 seconds turns into 5 seconds and carries 1 minute). However, we were not including that carried value when we recalculate the carry over for the next period of time.So if you had, for example, 3600 seconds, we carried 60 minutes into the minutes calculation, but when we calculated how much we should carry into the hours value we only considered what the user originally supplied for the minutes field, and forgot to include those 60 carried minute. So, for example, with the previous implementation this was true: `seconds(60 * 60 * 24) == seconds(0)` Or, as failing tests: ```nimrod import times assert seconds(60 * 60 * 24) != seconds(0) assert seconds(60 * 60 * 24) == days(1) ```
* Improved times testsFelix Krause2016-08-211-38/+32
| | | | | | | * Added check for yearday * Changed some test dates to check different equivalence classes of yearday (before leap day, at leap day, after february in leap year, after february in non-leap year)
* Fixed TimeInterval bug.Dominik Picheta2016-01-081-0/+5
|
* Fixed ttime test. Improved docs in times module.Dominik Picheta2016-01-081-1/+0
|
* add timeinterval helping functions as per issue #3609JamesP2015-12-081-37/+57
| | | | | | | | | | add tests to ttime.nim for timeinterval add/subtract functionality Changed assert to doAssert in ttime.nim Added extra tests to ttime.nim Removal of singular help procs for working with TimeIntervals Added TimeIin proc toSeconds(a: TimeInfo, interval: TimeInterval) where subtracting a year gave wrong results Add overflow of units on initInterval eg, 65 seconds is 5 seconds and 1 minute
* add assertion tests from times module to ttime.nim test file in tests\stdlibJamesP2015-12-011-2/+121
|
* tests: Trim .nim files trailing whitespaceAdam Strzelecki2015-09-041-6/+6
| | | | via OSX: find . -name '*.nim' -exec sed -i '' -E 's/[[:space:]]+$//' {} +
* new tester; all tests categorizedAraq2014-01-131-0/+6