Nim/tests/stdlib
Jonathan Bernard 68d3486f5a Bugfix for times.initInterval (issue #4889)
`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)
```
2016-10-12 15:44:21 -05:00
..
nre make tests green again 2016-07-29 23:51:01 +02:00
talgorithm.nim tests: Trim .nim files trailing whitespace 2015-09-04 23:04:32 +02:00
tcount.nim fixes #1845, fixes #2224 2015-03-12 11:08:03 +01:00
tcputime.nim new tester; all tests categorized 2014-01-13 02:10:03 +01:00
tcritbits.nim tests: Trim .nim files trailing whitespace 2015-09-04 23:04:32 +02:00
techo.nim further adaptations 2014-08-29 09:12:12 +02:00
testequivalence.nim Remove unnecessary import 2014-07-19 14:37:47 +02:00
tformat.nim tests: Trim .nim files trailing whitespace 2015-09-04 23:04:32 +02:00
tgetfileinfo.nim Fix tests a bit more 2015-03-10 15:34:15 +01:00
thashes.nim new tester; all tests categorized 2014-01-13 02:10:03 +01:00
thtmlparser2813.nim Added test file for #2813. 2015-06-20 11:37:29 +01:00
thtmlparser2814.nim Update htmlparser test `output` variable 2016-07-28 20:25:12 +04:00
thttpclient.nim Implements onProgressChanged callback for httpclient. 2016-09-24 22:58:10 +02:00
tio.nim tests: Trim .nim files trailing whitespace 2015-09-04 23:04:32 +02:00
tlists.nim tests: Trim .nim files trailing whitespace 2015-09-04 23:04:32 +02:00
tmarshal.nim Use array encoding for non-UTF-8 strings in marshal. Fixes #4779. 2016-09-16 17:02:34 +07:00
tmath.nim moved random procs from math to its own module (breaking change) 2016-05-30 16:24:52 +02:00
tmath2.nim tests: Trim .nim files trailing whitespace 2015-09-04 23:04:32 +02:00
tmemfiles1.nim minor fix - remove comments from discard section 2015-09-27 16:21:47 +10:00
tmemfiles2.nim fixes #2473; cleanup of some tests 2015-09-30 21:13:13 +02:00
tmemlines.nim Move tests to stdlib. 2015-08-03 12:35:57 -04:00
tmemlinesBuf.nim Move tests to stdlib. 2015-08-03 12:35:57 -04:00
tmemslices.nim Move tests to stdlib. 2015-08-03 12:35:57 -04:00
tmget.nim Rename mget to [] 2015-03-31 00:32:39 +02:00
tmitems.nim Fix tmitems test for changed behaviour of json 2016-02-24 19:03:55 +01:00
tnet.nim Make IP address checking more obvious, and add tests for the net module. 2015-03-07 12:37:52 +11:00
tnet_ll.nim Fixed tests to expect [Suite] output from unittest 2016-08-24 22:32:29 +02:00
tnre.nim Rearrange nre files 2015-05-26 19:14:04 -04:00
tos.nim Add os tests for directory creation, iteration and deletion 2016-06-20 14:32:01 -06:00
tosprocterminate.nim tests: Trim .nim files trailing whitespace 2015-09-04 23:04:32 +02:00
tparscfg.nim Update tparscfg.nim 2016-05-02 16:59:38 +08:00
tparseuints.nim Fixed tests to expect [Suite] output from unittest 2016-08-24 22:32:29 +02:00
tparsopt.nim renamed writeln to writeLine in tests 2015-06-19 01:34:34 -05:00
tpegs.nim makes tests green 2016-01-15 14:44:54 +01:00
tpermutations.nim Adapt the tester for permutations 2015-02-02 08:06:19 +01:00
tposix.nim renamed writeln to writeLine in tests 2015-06-19 01:34:34 -05:00
tquit.nim tests: Trim .nim files trailing whitespace 2015-09-04 23:04:32 +02:00
tregex.nim tests: Trim .nim files trailing whitespace 2015-09-04 23:04:32 +02:00
treguse.nim tests: Trim .nim files trailing whitespace 2015-09-04 23:04:32 +02:00
treloop.nim Add test case for infinite loop in RE 2015-04-09 17:28:26 +02:00
trepr.nim tests: Trim .nim files trailing whitespace 2015-09-04 23:04:32 +02:00
trepr2.nim tests: Trim .nim files trailing whitespace 2015-09-04 23:04:32 +02:00
trstgen.nim Fixes to YAML highlighting support, added tests 2016-04-01 21:35:46 +02:00
tsinglylinkedring.nim Fix SinglyLinkedRing in lists module 2015-02-01 03:04:18 +01:00
tsortcall.nim new tester; all tests categorized 2014-01-13 02:10:03 +01:00
tsplit.nim Fix split stdlib test 2016-07-01 07:24:30 -06:00
tstreams.nim new tester; all tests categorized 2014-01-13 02:10:03 +01:00
tstreams2.nim fix discard output: section 2015-09-27 15:49:40 +10:00
tstrset.nim tests: Trim .nim files trailing whitespace 2015-09-04 23:04:32 +02:00
tstrtabs.nim tests: Trim .nim files trailing whitespace 2015-09-04 23:04:32 +02:00
tstrutil.nim Add a unit test that covers issue 3477 2015-11-19 07:03:06 -05:00
ttime.nim Bugfix for times.initInterval (issue #4889) 2016-10-12 15:44:21 -05:00
tunidecode.nim further adaptations 2014-08-29 09:12:12 +02:00
tunittest.nim fixes #4494 2016-07-22 22:31:09 +02:00
twalker.nim tests: Trim .nim files trailing whitespace 2015-09-04 23:04:32 +02:00
twchartoutf8.nim cleaned up twchartoutf8 test 2015-08-21 21:40:24 +02:00
txmlgen.nim further adaptations 2014-08-29 09:12:12 +02:00
txmltree.nim further adaptations 2014-08-29 09:12:12 +02:00