summary refs log tree commit diff stats
path: root/tests/stdlib
Commit message (Collapse)AuthorAgeFilesLines
* [bugfix] fix #11588, don't check if SharedTable is initializednarimiran2019-06-261-0/+14
|
* [feature] Added os.delEnv; add delEnv support to nimscript too (#11466)Kaushal Modi2019-06-151-0/+13
| | | [feature] Fixes https://github.com/nim-lang/Nim/issues/11452.
* Attempt to close https://github.com/nim-lang/Nim/issues/11430Charles Blake2019-06-121-7/+14
|
* Use TMPDIR env var if available to get the temp dir name (#11443) [bugfix]Kaushal Modi2019-06-101-0/+12
| | | | | | Additionally, use normalizePathEnd to suffix the dir name with "/" or "\" as appropriate for the current OS. Fixes https://github.com/nim-lang/Nim/issues/11439.
* Bit operator names 2 (#11413)Arne Döring2019-06-061-1/+37
| | | | | | * add bit operator names * add test for bitop alias
* fixes #11369 (#11381)Andreas Rumpf2019-06-021-0/+7
|
* move test for #7632 above `import strformat` (#11270)jcosborn2019-05-201-10/+11
|
* fixes #10952, UNC paths (#11260)Miran2019-05-161-0/+9
|
* fixes #7816 (#11261)Andreas Rumpf2019-05-151-1/+10
|
* Allow for locale-based parsing/formatting of dates (#11170)Matt Haggard2019-05-081-0/+27
| | | | | | | | | | | | | | | * Allow for locale-based parsing/formatting of dates * Updates based on review feedback of PR 11170 DateTimeLocale arrays are now indexed by Month and WeekDay enums. More sane date used for testing. Documentation newline. Case change of DefaultLocale (and make it public) * Add changelog entry for DateTimeLocale addition to times module * Use pattern symbols for DateTimeLocale attribute names
* fixes another regression; the behaviour of 'array' formatting was changedAraq2019-04-151-0/+8
|
* fixes #11012Araq2019-04-152-22/+18
|
* rst: parse brackets individually, fixes #10475 (#10997)Miran2019-04-101-0/+12
|
* Strformat symbol binding (#10927)Arne Döring2019-04-053-2/+74
|
* fixes json.nim regressionAndreas Rumpf2019-03-291-4/+0
|
* bitops: add reverseBits and test (#10835)Tomohiro2019-03-131-0/+42
|
* StringStream and parseJson, parseCfg, parseSql et al for the vm (#10746)Arne Döring2019-02-281-0/+40
|
* Handle IPv6 in bindAddr #7633Federico Ceratto2019-02-231-0/+14
| | | | Add test
* Replace the duration conversion procs with new improved ones (#10710)Oscar Nihlgård2019-02-191-0/+9
|
* 32 bit fixes (#10608)Arne Döring2019-02-131-6/+2
|
* New implementation of times.between (#10523)Oscar Nihlgård2019-02-061-35/+138
| | | | | | | | * Refactor ttimes * New implementation of times.between * Deprecate times.toTimeInterval
* Vm bitops fixes (#10520)Arne Döring2019-02-051-51/+16
|
* move tests from `tospaths` to `tos`, fixes #9671narimiran2019-01-232-142/+111
| | | | Also, change some of `echo`s to `doAssert`.
* Added basic bit manipulation procs to bitops (#10338)Ico Doornekamp2019-01-231-0/+57
|
* Fix spelling errors (#10379)Federico Ceratto2019-01-191-1/+1
|
* json: support tuple (#10010)Timothee Cour2019-01-161-0/+4
|
* Fixes #10065 (#10260)Arne Döring2019-01-141-4/+4
| | | | CountTable now returns 0 instead of 'key not found' for get requests.
* fixes #7878Araq2019-01-141-1/+10
|
* make tests more robust; tests should be deterministic, no randomize() calls ↵Araq2019-01-133-14/+16
| | | | in tests
* fixes #10273 execShellCmd now returns nonzero when child killed with signal ↵Timothee Cour2019-01-133-18/+95
| | | | | | | | | | + other fixes (#10274) * s/exitStatus(...)/exitStatusLikeShell(...)/ * fix #10273 execShellCmd now returns nonzero when child exits with signal * test case for #10249 and explanation for the bug * fix test failure * add tests/nim.cfg
* os.execShellCmd: fixes #10231 (#10232)alaviss2019-01-081-0/+13
| | | | | | | Darwin has long deprecated the wait union, but their macros still assume it unless you define _POSIX_C_SOURCE. This trips up C++ compilers. This commit duplicates the behavior of WEXITSTATUS when _POSIX_C_SOURCE is defined.
* Fix getAddrInfo, add IPPROTO_ICMPV6 Closes #10198Federico Ceratto2019-01-061-0/+36
|
* Resolve things raised in https://github.com/nim-lang/Nim/issues/10081 ? (#10084)c-blake2018-12-311-9/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Resolve things raised in https://github.com/nim-lang/Nim/issues/10081 ? CDF is a standard ident in all things related to random numbers/sampling, and full words "cumulativeDistributionFunction" would be silly long, in this case, IMO. We use lowercase `cdf` to make it not look like a type, remove all looping from `sample` letting callers do it. Besides just side-stepping any `sampleSize` name choice, callers may want to filter out samples anyway which this makes slightly simpler. Also add two variants of `cumsum`, value return and in-place update distinguished by the var-ness of the first argument. Add tests for `int` and `float` for both `cumsum` and the new `sample`. (The sample tests exercise the value return mode of `cumsum`.) Functionality pre-this-PR `sample(a, w)` is now the almost as simple `for i in 0..<n: sample(a, w.cumsum)`, but this new code factoring is almost surely better. The statistical tests pass, as before. * Address Araq comment in https://github.com/nim-lang/Nim/pull/10084 We can always add in some `var` version later if desired to save memory, but this change now at least firms up the `sample` interface. * Rename `cumsum` -> `cumsummed` to honor NEP1 style. Re-instate `cumsum` as the in-place transformation. Test both in `tests/stdlib/tmath.nim` and use `cumsummed` in the example code for sample since that's a simpler example. * Fix requests from https://github.com/nim-lang/Nim/pull/10084 : example in lib/pure/math.nim and comment whitespace in lib/pure/random.nim
* Add ability to sample elements from openArray according to a weight array ↵c-blake2018-12-231-1/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | (#10072) * Add the ability to sample elements from an openArray according to a parallel array of weights/unnormalized probabilities (any sort of histogram, basically). Also add a non-thread safe version for convenience. * Address Araq comments on https://github.com/nim-lang/Nim/pull/10072 * import at top of file and space after '#'. * Put in a check for non-zero total weight. * Clarify constraint on `w`. * Rename `rand(openArray[T])` to `sample(openArray[T])` to `sample`, deprecating old name and name new (openArray[T], openArray[U]) variants `sample`. * Rename caller-provided state version of rand(openArray[T]) and also clean up doc comments. * Add test for new non-uniform array sampler. 3 sd bound makes it 99% likely that it will still pass in the future if the random number generator changes. We cannot both have a tight bound to check distribution *and* loose check to ensure resilience to RNG changes. (We cannot *guarantee* resilience, anyway. There's always a small chance any test hits a legitimate random fluctuation.)
* Don't use parseutils.parseInt in the times module (#10028)Oscar Nihlgård2018-12-221-0/+11
|
* os.walkDir: correctly evaluate paths when relative = true (#10057) [backport]alaviss2018-12-211-0/+8
|
* fix test failureTimothee Cour2018-12-191-0/+1
|
* fix #8255 numerous issues with splitFileTimothee Cour2018-12-191-0/+15
|
* [os] fix #10017 regression, fix #10025 regression (#10018)Timothee Cour2018-12-181-2/+5
| | | | | * [os] fix #10017 regression * [os] fix #10025 regression
* os.nim: use the new pathnorm.normalizePath implementationAraq2018-12-141-55/+26
|
* fixes joinPath regressionsAraq2018-12-131-0/+5
|
* os.nim: big refactoring, use the new pathnorm that was extracted by ↵Araq2018-12-131-63/+94
| | | | compiler/pathutils.nim; added os.relativePath
* Rework nil/option for nre in light of ""==nilFlaviu Tamas2018-12-113-18/+25
| | | | Fixes #9243
* Revert 7f49364fd0 for nreFlaviu Tamas2018-12-112-5/+5
|
* Merge pull request #9805 from pacien/181126-list-appendAndreas Rumpf2018-12-111-1/+2
|\ | | | | add SinglyLinkedList.append procs
| * add SinglyLinkedList.append procspacien2018-11-271-1/+2
| |
* | testament: joinable is now an explicit concept of a test specAndreas Rumpf2018-12-111-0/+1
| |
* | lots of small changesArne Döring2018-12-111-1/+1
| |
* | megatest checks output and nimoutArne Döring2018-12-111-11/+0
| |
* | megatest can be executedArne Döring2018-12-112-2/+2
| |