Commit Graph

219 Commits

Author SHA1 Message Date
Mathias Stearn
6bd3a2826f cmp(x, y: string) now uses memcmp rather than strcmp (#6869) (#6968) 2017-12-24 15:23:17 +01:00
Dominik Picheta
8d992c4176 Merge pull request #6725 from FedericoCeratto/unittest-5114
Add unittest suite/test name filters
2017-12-22 15:26:45 +00:00
skilchen
a89b81eb96 fixes #6353 (#6951) 2017-12-21 16:32:26 +01:00
GULPF
a879973081 Better times module (#6552)
* First work on better timezones

* Update tests to new api.
Removed tests for checking that `isDst` was included when formatting, since `isDst` no longer affects utc offset (the entire utc offset is stored directly in `utcOffset` instead).

* Deprecate getLocaltime & getGmTime
* Add `now()` as a shorthand for GetTIme().inZone(Local)
* Add FedericoCeratto's timezone tests (#6548)
* Run more tests in all timezones

* Make month enum start at 1 instead of 0
* Deprecate getDayOfWeekJulian
* Fix issues with gc safety
* Rename TimeInfo => DateTime
* Fixes #6465
* Improve isLeapYear
* FIx handling negative adjTime

* Cleanup:
- deprecated toSeconds and fromSeconds, added fromUnix and toUnix instead (that returns int64 instead of float)
- added missing doc comments
- removed some unnecessary JS specific implementations

* Fix misstake in JS `-` for Time

* Update usage of TimeEffect
* Removed unecessary use of `difftime`
* JS fix for local tz
* Fix subtraction of months
* Fix `days` field in `toTimeInterval`
* Style and docs
* Fix getDayOfYear for real this time...
* Fix handling of adding/subtracting time across dst transitions
* Fix some bad usage of the times module in the stdlib
* Revert to use proper time resoultion for seeding in random.nim
* Move deprecated procs to bottom of file
* Always use `epochTime` in `randomize`
* Remove TimeInterval normalization
* Fixes #6905

* Fix getDayOfWeek for year < 1
* Export toEpochDay/fromEpochDay and change year/month/monthday order
* Add asserts for checking that the monthday is valid
* Fix some remaining ambiguous references to `Time`
* Fix ambiguous reference to Time
2017-12-18 23:11:28 +01:00
Araq
8caa3df1c3 Merge branch 'parsesql' of https://github.com/treeform/Nim into treeform-parsesql 2017-12-15 16:49:59 +01:00
Andreas Rumpf
e92883466a Merge branch 'devel' of github.com:nim-lang/Nim into devel 2017-12-15 00:36:41 +01:00
treeform
ee5a76fd9d fix 2017-12-14 18:36:18 +00:00
treeform
08d7b5d031 fix 2017-12-14 18:36:17 +00:00
treeform
c6b33de127 fix 2017-12-14 18:36:17 +00:00
Fabian Keller
6df6ec27ec Improved collection-to-string behavior (#6825) 2017-12-14 14:02:13 +01:00
Andreas Rumpf
e860334377 added SQL parser test 2017-12-14 12:46:09 +01:00
Dominik Picheta
578ab935cb Support all int, uint and float variants in json.to macro. 2017-11-30 21:34:30 +00:00
Dominik Picheta
2bb2e6975e Fix infinite recursion when using json.to on ref with cycle. 2017-11-30 21:34:30 +00:00
Dominik Picheta
8d61262372 Implement support for JsonNode in json.to. 2017-11-30 21:34:30 +00:00
Dominik Picheta
8187e83645 Implement Table/OrderedTable support for json.to macro. 2017-11-30 21:34:30 +00:00
Dominik Picheta
8ca41ce637 Implement support for Option[T] in json.to macro. Fixes #5848. 2017-11-30 21:34:30 +00:00
Dominik Picheta
d3c9b58c00 Fixes #6604. Rejects unnamed tuples with error. 2017-11-30 21:34:30 +00:00
Dominik Picheta
e0681715dc Fixes #6095. 2017-11-30 21:34:30 +00:00
Dominik Picheta
11fcae5705 Fixes #5856. Code based on @loloiccl's PR (#5879). 2017-11-30 21:34:30 +00:00
Dominik Picheta
b74a5148a9 Fixes #6223. 2017-11-28 14:33:53 +00:00
Federico Ceratto
25831a83d7 Add unittest suite/test name filters
Support simple globbing
2017-11-28 13:12:23 +00:00
Andreas Rumpf
58187f2120 added a warning that the .deprecate statement is unreliable for routines 2017-11-21 11:27:35 +01:00
Fredrik Høisæther Rasch
3d5d6931f0 Appveyor thttpclient (#6744)
* App option value for disabling tests for AppVeyor

* Disable thttpclient on AppVeyor
2017-11-15 17:25:48 +01:00
Andreas Rumpf
4ea09e4df5 attempt to make travis green again 2017-11-05 21:44:22 +01:00
Araq
3174cfe55c make tests green again 2017-11-01 00:20:40 +01:00
Bo Lingen
c182d37f45 Update removeSuffix implementations to match removePrefix (#6636) 2017-10-30 22:45:13 +01:00
Andreas Rumpf
f1dab39086 remove old implementation of the roof operator; make tests green again; close #6292 2017-10-29 20:36:07 +01:00
Bo Lingen
e135135469 add strutils.removePrefix proc (#6473) 2017-10-28 10:47:23 +02:00
Viktor Marosvary
ce04288d64 isAlphaNumberic and isDigit improvement + tests (#6579)
if we encounter a character that does not satisfy the proc, we return immediately, without continuing to loop over the rest of the chars in the string.
2017-10-24 10:22:18 +02:00
Dominik Picheta
955b48cf15 Merge pull request #6495 from GULPF/Fix-countLeapYears
Fix countLeapYears
2017-10-16 15:40:29 +01:00
Daniil Yarancev
e29e6ec76e [JSON] getBVal -> getBool; getFNum -> getFloat 2017-10-14 15:49:53 +03:00
Oscar Nihlgård
f2ba3d174c Fix countLeapYears 2017-10-10 15:47:12 +02:00
GULPF
8bd9c7a4e6 Add dst formatting tests (#6468)
* Rename ttime.nim => ttimes.nim
* Add formating tests for DST, closes #3199
* Make appveyor green
* Remove broken test
2017-10-10 01:05:31 +02:00
Andreas Rumpf
ddc131cf07 the parser finally parses 'echo {1,2}' as it should 2017-09-30 21:35:30 +02:00
GULPF
5cf789ac3f Improved unittest check macro, fixes #5784 (#6446) 2017-09-30 15:39:00 +02:00
Mamy Ratsimbazafy
5b8f33a905 Reorder json add and %, fixes #6385 (#6388)
* Reorder json `add` and `%`, fixes https://github.com/nim-lang/Nim/issues/6385

* rename json test files
2017-09-16 19:09:44 +01:00
Yuriy Glukhov
7d49fc796d Changed JSON stringification to preserve UTF (#6330) 2017-09-15 10:53:58 +02:00
Simon Krauter
94e336fe85 Fix wrong result of countLines() (#6371) 2017-09-15 10:45:22 +02:00
Araq
cf28222d2c attempt to make travis green again 2017-09-05 23:26:17 +02:00
Arne Döring
000b8afd26 Remove expr/stmt (#5857) 2017-07-25 09:28:23 +02:00
andri lim
2ecdf582a8 fixes #6049 add mixin release, acquire to withLock (#6113) 2017-07-16 16:54:09 +02:00
andri lim
ca0155a458 fixes #6046 parsecfg failed to parse negative int (#6097) 2017-07-14 16:28:39 +02:00
Fabian Keller
a6e0494a6f fixes #5966 2017-06-20 12:11:09 +02:00
Parashurama
cd51628f57 fix orderedtable enlarge proc. (#5937)
This fixes issue #5917
2017-06-05 13:16:30 +02:00
Araq
8f67b90997 Merge branch 'araq2' into devel 2017-05-17 22:13:57 +02:00
Dominik Picheta
d1daccac2f Fixes #5761. 2017-05-17 16:11:26 +01:00
Andreas Rumpf
61a0eba14f Merge branch 'zahary' into araq2 2017-05-17 15:27:04 +02:00
Dominik Picheta
8dd5e94f5a Merge pull request #5019 from FedericoCeratto/json_tests
Add JSON tests based on https://github.com/nst/JSONTestSuite
2017-05-16 14:37:42 +01:00
Andreas Rumpf
6c7d2ce8fb disable fragile parts of thttpclient.nim 2017-05-04 22:37:07 +02:00
Andreas Rumpf
c066932635 added IP v6 parsing tests 2017-05-04 22:25:29 +02:00