summary refs log tree commit diff stats
path: root/tests/stdlib
Commit message (Collapse)AuthorAgeFilesLines
* fix #17264 [backport:1.4] (#17266)flywind2021-03-051-0/+16
| | | | | * fix #17264 * fix vm * fix js and add tests
* follow up #17165 (#17262)flywind2021-03-043-54/+40
|
* reuse jsffi in json module (#17165)flywind2021-03-043-3/+10
| | | | | | | | | * remove unnecessary when statement * remove outdated codes * reuse jsffi * move js json coverage
* Added math.clamp for slice clamping (#17246)Jason Beetham2021-03-031-0/+11
| | | | | | | * Added math.clamp for slice clamping * Added inline to math.clamp * Cleaned up math.clamp + test
* fix #16384 and #17144 (#17126) [backport]flywind2021-03-031-218/+223
|
* https://github.com/nim-lang/Nim/pull/15826/files#r585368355 (#17233)Juan Carlos2021-03-031-1/+5
|
* RST heading improvements (fix #17091) (#17195)Andrey Makarov2021-03-021-0/+156
|
* re-enable disabled tests after #17173 (#17228)Timothee Cour2021-03-021-111/+75
|
* add overload `add(a: var string, b: openArray[char])` (#15951)Timothee Cour2021-03-011-120/+133
| | | Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* hashes: support object default hash (#17175)Timothee Cour2021-02-261-0/+46
|
* `std/options`: `$some(3)` is now `"some(3)"`, etc. (#17147)Timothee Cour2021-02-242-7/+7
| | | | | | | * std/options: $some(3) is now "some(3)", not "Some(3)", `$none(int)` is now `"none(int)"` instead of `"None[int]"` * fix tests * disable optionsutils
* remove deprecated stuff in unittest module (#17156)flywind2021-02-241-5/+18
| | | | | | | | | * remove unnecessary when statement * remove outdated codes * remove deprecated stuff in testament * fix
* wrapnils: add `??.` which returns an `Option` (#16931)Timothee Cour2021-02-241-17/+20
| | | | | | | * wrapnils: add option-like API with ??., isSome, get * fix test after rebase * cleanups * fix changelog * address comments regarding get vs unsafeGet
* fix #17159 items(cstring) works in VM (#17160)Timothee Cour2021-02-241-14/+87
| | | | | | | | | * fix #17159 items(cstring) works in VM * improve test coverage tests/stdlib/tcstring.nim; add helpers: whenRuntimeJs, whenVMorJs * document items(cstring) * address comments
* cleanup tests/stdlib/tstring.nim (#17158)Timothee Cour2021-02-241-98/+82
| | | | | | | * cleanup tests/stdlib/tstring.nim * cleanup tests/stdlib/tstring.nim * cleanup rest of test
* close #15563 add testcase (#17168)flywind2021-02-241-0/+18
| | | | | | | | | | | | | | | | | * remove unnecessary when statement * remove outdated codes * close #15563 * Update tests/typerel/t15563.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * address comments * tiny Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
* add strbasics.strip (#16280)flywind2021-02-241-0/+126
|
* [stdlib] make cookies module modern (#17116)flywind2021-02-241-1/+6
| | | | | | * update cookies module * introduce sameSite.Default Co-authored-by: hlaaftana <10591326+hlaaftana@users.noreply.github.com>
* add enumutils.items for sparse enums, typetraits.SomeSparseEnum (#17080)Timothee Cour2021-02-231-0/+16
| | | | | | | * add enumutils.items for enum with holes * changelog * ref in lib.rst * use `type SomeSparseEnum* = (not Ordinal) and enum` instead of concept * address comment: rename back to enum with holes
* add io.readChars overload (simpler, less error prone) (#16044)Timothee Cour2021-02-221-0/+37
| | | | | | | | | | * add simpler to use readChars overload * use new readChars overload * Update lib/wrappers/openssl.nim Co-authored-by: Andreas Rumpf <rumpf_a@web.de> Co-authored-by: flywind <xzsflywind@gmail.com>
* Improve the ropes module (#17145)konsumlamm2021-02-221-54/+83
| | | | | | | | | | | | | | * Improve ropes module Improve wording Update runnableExamples Add index bound check for `[]` Minor format changes * Update tests/stdlib/tropes.nim Run on C & JS target Test in VM Add tests for `[]`
* fix #15215 (#17142)rockcavera2021-02-221-0/+22
| | | | | | | | | | | | | | | | * fix 15215 * fix test * end line * Update tests/stdlib/tnetconnect.nim Co-authored-by: flywind <xzsflywind@gmail.com> * Update lib/pure/net.nim Co-authored-by: flywind <xzsflywind@gmail.com> Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* [JS + docs] improve std/monotimes module (#17103)flywind2021-02-221-1/+5
|
* make rst.nim use object variant (#17138)Andrey Makarov2021-02-221-0/+5
| | | | | | | * make rst.nim use object variant * add workaround * fix mistake
* fix #17118 (#17119) [backport:1.2]flywind2021-02-221-18/+20
| | | | | * fix js unsigned integer * Use `std` prefix for standard library modules * fix #17118
* make copySign for js consistent with other backends (#16609)Timothee Cour2021-02-221-18/+15
| | | | | | * make copySign work more robustly in js * improve tests * improve tests/vm/tcastint.nim
* remove unnecessary when statement (#17135)flywind2021-02-211-1/+10
|
* move prelude so that `include std/prelude` also works (#17110)Timothee Cour2021-02-201-0/+14
| | | | | * move prelude so that `include std/prelude` also works * add test
* Improve the strformat module (#17106)konsumlamm2021-02-201-512/+498
| | | | | | | | | | | | | | | | | | | | | | * Improve the strformat module Improve documentation Use runnableExamples * Fix overflow error for low(int64) Add test * Use assert in runnableExamples * Improve tstrformat Put tests in proc & test VM Put tests in blocks Add c, js targets * Use doAssert in tests * Disable JS & VM tests
* enable bsd for tsetutils; improve setutils API (#17098)Timothee Cour2021-02-201-2/+4
|
* stricter checks for RST headlines (#17089)Andrey Makarov2021-02-201-4/+20
|
* uri: document removeDotSegments, add tests, show failure modes (#17064)Timothee Cour2021-02-201-8/+1
| | | | * uri: document removeDotSegments, add tests, show failure modes * address comments
* close #13859; add testcase (#17099)flywind2021-02-191-0/+19
| | | | | | | * fix js unsigned integer * better * close #13859; add testcase
* Add setutils.complement, setutils.fullSet (#17066)Jason Beetham2021-02-181-7/+27
|
* [nodejs backend] paramStr, paramCount (#17082)flywind2021-02-181-0/+11
|
* fix math.frexp function signature (#16725)flywind2021-02-171-3/+10
|
* make system random work in VM (#17059)flywind2021-02-171-6/+29
| | | | * make system random work in VM
* Fix bug in removeDotSegments: added test (#17050)Benoit Favre2021-02-161-0/+1
| | | | | * Fix bug in removeDotSegments when path ends with dot * Add test for trailing period bug in uri
* Improve documentation for bitops (#16961)konsumlamm2021-02-151-336/+173
| | | | | | | | | | * Improve documentation for bitops Use func Use let in runnableExamples * Remove unnecessary tests Fix #7587
* RST: implement footnotes and citations (#16960)Andrey Makarov2021-02-151-0/+208
| | | | | | | | | * RST: implement footnotes and citations * manual fixup of nimdoc.out.css * remove unused code * shorter printing code * Update lib/packages/docutils/rst.nim Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* Improve the heapqueue module (#17034)konsumlamm2021-02-151-34/+83
| | | | | | Improve documentation Optimize toHeapQueue Rename siftup and siftdown Add tests for the heap property
* Improve math module (#17019)konsumlamm2021-02-122-311/+358
| | | | | | | | | | | | | | | | | | | | | | | | | * Improve documentation for math Support empty input for cumsummed Use runnableExamples Move some examples to tests Add more tests * Update tests/stdlib/tmath.nim Move some tests to trandom.nim Move tests into main template where possible Add test for #17017 * Add more tests for gamma & lgamma Remove gamma(-1.0) example Small fixes/changes * Move more tests into template main() * Fix typos * Add edge case examples for copySign
* parse RST headings when EOF follows them (#17014)Andrey Makarov2021-02-121-0/+7
|
* add system random to stdlib: std/sysrand (#16459)flywind2021-02-111-0/+13
|
* fix #16967 [backport:1.2] (#16976)hlaaftana2021-02-091-0/+16
| | | | | * fix #16967 [backport:1.2] * move test to tsugar
* std/lists: Various changes to `lists` (RFC #303) (#16536)Peter Salvi2021-02-081-20/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Various changes to `lists` (RFC #303) * Removing a non-element is no-op; better tests * Remove preserves cycles; add appendMove alias; tests. * Return value for (singly linked) `lists.remove` * More test for lists.remove * Moved `lists.append` to the end of the file to see all `add` definitions * Disable testing js for now * Use workaround for swap js bug * Smaller diff * Undo "silent" deprecation of append * Correct typo in changelog Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * Remove `appendMoved` Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * Don't remove appendMoved Co-authored-by: Clyybber <darkmine956@gmail.com> Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
* basic cleanups regarding SSL handling (#16940) [backport:1.0]Andreas Rumpf2021-02-081-1/+1
| | | | | | | * basic cleanups regarding SSL handling * enabled certificate checking on Windows * updated the SSL test * quoting helps
* close #16921 (#16951)flywind2021-02-061-0/+3
|
* stdlib/os: handle symlinks in copy/move functions (#16709)Roman Inflianskas2021-02-041-0/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | * stdlib/os: handle symlinks in copy/move functions - Added optional `options` argument to `copyFile`, `copyFileToDir`, and `copyFileWithPermissions`. By default, symlinks are followed (copy files symlinks point to). - `copyDir` and `copyDirWithPermissions` copy symlinks as symlinks (instead of skipping them as it was before). - `moveFile` and `moveDir` move symlinks as symlinks (instead of skipping them sometimes as it was before). - Added optional `followSymlinks` argument to `setFilePermissions`. See also: https://github.com/nim-lang/RFCs/issues/319 Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * Address comments in #16709 Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * Address comments in #16709 (second iteration) Skip symlinks on Windows. Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
* Sugar tests (#16820)konsumlamm2021-02-021-118/+215
|