summary refs log tree commit diff stats
path: root/tests/stdlib
Commit message (Collapse)AuthorAgeFilesLines
* fix #16815 round(x,places) works again in vm (#16825)Timothee Cour2021-01-281-28/+30
| | | | | | | * fix #16815 round+places works again in vm * improve tests; fix for linux 32bit * fix test for windows
* Improve documentation for the mersenne module (#16824)konsumlamm2021-01-271-0/+11
| | | | | | | * Improve documentation for mersenne Add tests for mersenne * Add link to Wikipedia article
* Moved json enum index test to the proper file (#16826)Jason Beetham2021-01-252-11/+12
|
* added enum indexed array support to json (#16807)Jason Beetham2021-01-261-0/+11
| | | | | | | * added enum indexed array support to json * Added json test * Removed when statement for enum indexed arrays
* Improve the marshal module (#16777)konsumlamm2021-01-221-94/+85
| | | | | | | | | | * Improve marshal Use runnableExamples Refactor tests * Readd {.inheritable.} test Apply suggestions
* addQuitProc => addExitProc (#16765)Timothee Cour2021-01-221-1/+3
|
* Fix SIGSEGV in httpclient response body (#16766)Daehee2021-01-221-0/+6
| | | | | | | | | * initialize httpclient response bodyStream; prevent SIGSEGV when getBody is false * Update lib/pure/httpclient.nim * Update lib/pure/httpclient.nim Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* fix noDecl => nodecl (#16760)Timothee Cour2021-01-201-0/+1
| | | | | | | * fix noDecl => nodecl * address comment * disable flaky tests/stdlib/thttpclient.nim on freebsd
* jsonutils.jsonTo: support opt (#16739)Timothee Cour2021-01-171-0/+3
|
* js: improve tests + some docs (#16727)Timothee Cour2021-01-161-0/+6
| | | | | | | | | | | * js: improve tests * _ * _ * _ * fixup
* Deprecate TaintedString (#15423)Juan Carlos2021-01-152-8/+8
| | | | Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> Co-authored-by: Dominik Picheta <dominikpicheta@googlemail.com>
* Add js BigInts (#16409)Juan Carlos2021-01-141-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | * Add BigInts * Renames tos plurals * Improve Stringifications * Update changelog.md Co-authored-by: flywind <43030857+xflywind@users.noreply.github.com> * RunnableExamplerize * discard the discardable pragma * Several improvements from peer reviews, more docs * More doc, more test * More doc, more test * Better error message 'Error: usage of low is an {.error.} defined at jsbigints.nim' instead of just 'type mismatch JsBigInt' * is an overload, rename * proc to scare kids away * Update lib/js/jsbigints.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * https://github.com/nim-lang/Nim/pull/16409#discussion_r554365041 Co-authored-by: flywind <43030857+xflywind@users.noreply.github.com> Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
* Transfer-Encoding:chunked tests (#16678)vabresto2021-01-141-0/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add tests and fix extra newlines in body * Fixes per comments * Slight rephrase per comments * Improvements per comments * Add getSocket to reduce test flakiness per comment * Remove unused lines from header * Add doc comment to getSocket per comment * Apply witchcraft to replace `discard Future` * Return HTTP 400 on bad encoding in request * Fix runnable example for getSocket * Fix import to fix runnable examples * Even more imports for the example * Better self documenting runnable example * Add missing import * Import from module with correct signature * Resolve port type mismatch
* enable tests/stdlib/thttpclient.nim (#16710)Timothee Cour2021-01-141-5/+6
| | | | | * enable tests/stdlib/thttpclient.nim * disable windows, openbsd
* Fixes #16436 (#16695)Yuriy Glukhov2021-01-141-0/+23
| | | | | * Fixes #16436 * Comments addressed
* fix #16703; revert most of #16480; add tests/stdlib/tmimetypes.nim (#16711)Timothee Cour2021-01-131-0/+13
|
* revive PR #16320 (CRLF fix); fix #16308; Update openssl.nim (#16648)Timothee Cour2021-01-121-0/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Update openssl.nim Fix issue # 16308 * Update openssl.nim These are also related to Issues [#16308](https://github.com/nim-lang/Nim/issues/16308) * Update openssl.nim * Add files via upload SSL PEM_read_RSAPUBKEY check * Delete topenssl_rsa_private_key.pem * Delete topenssl_rsa_public_key.pem * Delete topenssl.nim * Add files via upload * Update topenssl.nim This test makes me dizzy. Variables such as' PRSA 'must be declared in advance, otherwise they will run incorrectly. The argument uses a cString, and string also makes an error. * Update topenssl.nim ``` lhf@lhf-pc:/media/lhf/D$ cat -e ./topenssl.nim import std/wordwrap$ import openssl$ ``` * Update topenssl.nim * dos2unix tests/stdlib/topenssl.nim Co-authored-by: lihaifeng <lihaifeng@wxm.com>
* Improve uri.parseQuery to never raise an error (#16647)Mildred Ki'Lya2021-01-121-2/+1
| | | | | | | | | | | | | | | | | In case of malformed query string where there is `=` on the value, handle this character as part of the value instead of throwing an error. The following query string should no longer crash a program: key=value&key2=x=1 It will be interpreted as [("key", "value"), ("key2", "x=1")] This is correct according to latest WhatWG's HTML5 specification recarding the urlencoded parser: https://url.spec.whatwg.org/#concept-urlencoded-parser Older behavior can be restored using the -d:nimLegacyParseQueryStrict flag.
* RST: implement internal targets (#16614)Andrey Makarov2021-01-111-0/+158
|
* fix negative nan (#16628)flywind2021-01-111-2/+14
|
* fix #16555, fixes #16405: len, high honors '\0' for cstring in vm (#16610)Timothee Cour2021-01-112-3/+49
|
* Httpclient improvements (#15919)Antonis Geralis2021-01-101-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Allow passing Uri instead of strings * Teach httpclient about 308 * Deprecate request proc where httpMethod is string * More use of HttpMethod enum Also fix handling of 308, I forgot to add the hunk to the previous commit. * Well behaved redirect handler * Also remove Transfer-Encoding * Removed unused proc * Secure redirection rules Strip sensitive headers for cross-domain redirects. * Allow httpMethod to be a string again This way unknown http verbs can be used without any problem. * Respect user-specified Host header * Missed multipart argument. * Try another method * add changelog * Fix hidden deprecation warning, parseEnum failing * This is wrong * Have to do it manually, parseEnum is not suitable * Review comments * update Co-authored-by: LemonBoy <thatlemon@gmail.com> Co-authored-by: Dominik Picheta <dominikpicheta@googlemail.com>
* minor fix (#16624)rockcavera2021-01-071-1/+1
|
* Implements streams for sockets (#15729)PMunch2021-01-071-0/+64
|
* oids: switch from PRNG to random module (#16203)flywind2021-01-071-0/+6
| | | | | | | * switch from PRNG to random module * fix the regression * comments + tests * runnableExamples * make oids better
* add math.signbit (#16592)flywind2021-01-071-0/+10
|
* Jsonutils: pass opt for object in object (#16615)inv20042021-01-071-0/+6
| | | | | * jsonutils: fromJson forward opt param fix * jsonutils: object in object test + fix: opt pass
* jsonutils: fromJson forward opt param fix (#16612)inv20042021-01-061-0/+14
|
* Link the <fenv.h> header (#16597)konsumlamm2021-01-051-3/+2
|
* make cstrutils work in VM (#16590)flywind2021-01-051-2/+10
| | | | | * make cstrutils work in VM * more
* Improve documentation for complex (#16588)konsumlamm2021-01-051-6/+6
| | | | | | | | | | | | | * Improve documentation for complex Add missing doc comments * Add runnableExample Add links for principal values Optimize `-` Change var to let * Use std prefix for imports
* fix #9125 (#16582)flywind2021-01-051-4/+26
| | | | | | | | | | | | * fix #9125 * Update tests/stdlib/tmath.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * back Co-authored-by: Andreas Rumpf <rumpf_a@web.de> Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
* Make tmath test more strict (#16593)Clyybber2021-01-051-13/+13
| | | | Don't use approximate equality when comparing numbers that are representable with perfect precision.
* merge tmath_misc.nim into tmath.nim (#16591)Timothee Cour2021-01-052-24/+13
|
* fix #16576: honor matrix in testament by making such tests non joinable (#16577)Timothee Cour2021-01-041-4/+6
| | | | | | | * refs #16576: honor matrix in testament by making such tests non joinable * add tests + misc fixes * fix test for i386 with -d:danger
* enable tmath tests for JS backend (#16562)flywind2021-01-041-6/+5
|
* Improve sequtils documentation (#16559)konsumlamm2021-01-041-4/+2
| | | | | | | * Improve sequtils documentation Uncomment assertions in tests * Use present tense
* Algorithm improvements (#16529)konsumlamm2021-01-021-2/+2
| | | | | | | | | | | | * Improve documentation for algorithm Remove unused import in algorithm tests Improve formatting * Reapply fix for reverse on empty openArray * Use 3rd person singular Add more explanations.
* fix #16061 (#16551)flywind2021-01-021-1/+6
|
* fix `is "closure"` (#16552)flywind2021-01-021-0/+9
|
* fix #16542 (#16549)flywind2021-01-021-1/+30
| | | * fix #16542
* refactor the tests of options (#16527)flywind2021-01-011-143/+182
|
* fix #16494 (#16513)flywind2021-01-011-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * fix #16494 * fix * fix * fix * fix * fix * fix performance * add comments * improve performance * Update lib/system.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * Update lib/system.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * Update tests/stdlib/tmath_misc.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * Update tests/stdlib/tmath_misc.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
* refactor cmpIgnoreStyle and cmpIgnoreCase (#16399)flywind2020-12-312-22/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * init * support strutils * more * better * Call len once per string/cstring * Change var to let * Compare ternary on first char * More appropriate param name * fix * better * one test * impl * more efficient * minor Co-authored-by: Clyybber <darkmine956@gmail.com>
* RST: improve line blocks (#16518)Andrey Makarov2020-12-311-4/+34
|
* Add math.copySign (#16406)flywind2020-12-301-1/+49
| | | | | * add math.copySign * fix + tests
* Added cmpMem export (#16484)Antonis Geralis2020-12-291-0/+15
| | | | | | | | | | | | | * added cmpMem export * updates * fix test * Tiny changelog change * Add a dot. Co-authored-by: Clyybber <darkmine956@gmail.com>
* improve turi.nim tests: js, vm; merge tdecodequery.nim (#16500)Timothee Cour2020-12-292-194/+181
| | | | | | | | | | | * improve turi tests: js, vm; merge tdecodequery.nim * improve test * add test in js, improve test * remove matrix: "--styleCheck:hint --panics:on" * fixup
* RST: fix directive with fields (#16490) (#16493)Andrey Makarov2020-12-291-0/+11
| | | | | | | * RST: fix directive with fields (#16490) * Update tests/stdlib/trstgen.nim Co-authored-by: Clyybber <darkmine956@gmail.com>
* use doAssert in tests (#16486)flywind2020-12-2830-563/+563
|