Commit graph

5,058 commits

Author SHA1 Message Date
flywind
5af13c5ace
close #9655 add testcase (#16683) 2021-01-11 18:02:32 +01:00
flywind
0c128259bb
close #7097 add testcase (#16682) 2021-01-11 15:13:13 +01:00
flywind
aa185c0e9b
fix #13517 (#16681) 2021-01-11 15:07:48 +01:00
flywind
be6e8916fa
fix negative nan (#16628) 2021-01-11 11:39:38 +01:00
Timothee Cour
f6c2450cdb
fix #16555, fixes #16405: len, high honors '\0' for cstring in vm (#16610) 2021-01-11 10:16:20 +01:00
cooldome
0286a0879b
fix #16651 (#16658)
* fix #16651
2021-01-11 10:09:38 +01:00
flywind
2c6f5ae681
fix #16650 (#16660) 2021-01-10 21:51:29 +00:00
Antonis Geralis
7bde6aa37f
Httpclient improvements (#15919)
* 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>
2021-01-10 13:40:53 +00:00
flywind
dbff2cd938
close #4834 add testcase (#16649) 2021-01-09 11:54:26 +01:00
flywind
38b8d080f2
close #1550 add testcase (#16640) 2021-01-08 14:42:38 +01:00
rockcavera
0da4cb93d1
minor fix (#16624) 2021-01-07 19:16:26 +01:00
PMunch
0e7902b976
Implements streams for sockets (#15729) 2021-01-07 16:09:57 +01:00
flywind
89a21e4ec7
oids: switch from PRNG to random module (#16203)
* switch from PRNG to random module
* fix the regression
* comments + tests
* runnableExamples
* make oids better
2021-01-07 09:38:31 +01:00
flywind
bab0aa6ecf
add math.signbit (#16592) 2021-01-07 08:48:02 +01:00
inv2004
04b765c16d
Jsonutils: pass opt for object in object (#16615)
* jsonutils: fromJson forward opt param fix

* jsonutils: object in object test + fix: opt pass
2021-01-07 03:09:02 +01:00
Timothee Cour
025ca660f7
[backport 1.0] add backend support for js bigint (#16606)
* add backend support for js bigint

* cleanup

* add tests

* add -d:nimHasJsBigIntBackend

* cleanup

* more tests
2021-01-06 20:28:24 +01:00
inv2004
0d5cab77f6
jsonutils: fromJson forward opt param fix (#16612) 2021-01-06 18:42:49 +01:00
cooldome
58b9191354
fix #16516 method dispatch for sink args (#16594)
* fix #16516

* fix comment

* Trigger build
2021-01-06 10:47:03 +00:00
konsumlamm
2c2baa9fad
Link the <fenv.h> header (#16597) 2021-01-05 20:51:51 +01:00
flywind
c04f305bf7
make cstrutils work in VM (#16590)
* make cstrutils work in VM

* more
2021-01-05 17:52:26 +01:00
konsumlamm
0c4bd65e8d
Improve documentation for complex (#16588)
* 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
2021-01-05 17:50:15 +01:00
flywind
df9e74b510
fix #9125 (#16582)
* 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>
2021-01-05 17:47:10 +01:00
Clyybber
9f1dd5c00f
Make tmath test more strict (#16593)
Don't use approximate equality when comparing
numbers that are representable with perfect precision.
2021-01-05 15:52:24 +01:00
Timothee Cour
b2a53795dc
merge tmath_misc.nim into tmath.nim (#16591) 2021-01-05 14:29:21 +01:00
Timothee Cour
00144ee4e9
fix #16576: honor matrix in testament by making such tests non joinable (#16577)
* refs #16576: honor matrix in testament by making such tests non joinable

* add tests + misc fixes

* fix test for i386 with -d:danger
2021-01-04 19:45:46 +01:00
Andreas Rumpf
6317e4004d
make --gc:arc --exceptions:quirky work again [backport:1.4] (#16583)
* make --gc:arc --exceptions:quirky work again [backport:1.4]

* fixes #16404 [backport:1.4]
2021-01-04 19:44:50 +01:00
Clyybber
80c8f06663
Add test for static proc/lambda params (#16584) 2021-01-04 18:41:02 +01:00
flywind
9531afac48
fix #16499 (#16514) 2021-01-04 18:27:58 +01:00
flywind
7c2c1ad072
enable tmath tests for JS backend (#16562) 2021-01-04 11:40:56 +01:00
konsumlamm
435f829348
Improve sequtils documentation (#16559)
* Improve sequtils documentation

Uncomment assertions in tests

* Use present tense
2021-01-04 11:04:30 +01:00
flywind
c80261bc00
fix #12311 (#16578) 2021-01-04 10:24:52 +01:00
Clyybber
a0134671ee
Make test independent of repo location (#16571)
* Make test independent of repo location

* Fix differently
2021-01-03 19:15:56 +01:00
flywind
c71f5650c6
Revert "Make config processing order test more robust" (#16561)
This reverts commit cf714c129f.
2021-01-03 12:55:08 +08:00
Clyybber
cf714c129f
Make config processing order test more robust 2021-01-02 21:47:26 +01:00
Timothee Cour
471aab86a0
fix #16526 run config.nims before foo.nim.cfg (#16557)
* fix #16526 run config.nims before foo.nim.cfg

* add test
2021-01-02 21:41:44 +01:00
konsumlamm
2eccef7ad6
Algorithm improvements (#16529)
* 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.
2021-01-02 20:28:59 +01:00
flywind
e869767aa7
fix #16061 (#16551) 2021-01-02 17:13:01 +01:00
flywind
b8775bff57
fix is "closure" (#16552) 2021-01-02 17:11:46 +01:00
flywind
d8b1ffc857
fix #16542 (#16549)
* fix #16542
2021-01-02 14:32:37 +01:00
Andreas Rumpf
73a8b950cb
big steps torwards an efficient, simple IC implementation (#16543)
* reworked ID handling
* the packed AST now has its own ID mechanism
* basic serialization code works
* extract rodfiles to its own module
* rodfiles: store and compare configs
* rodfiles: store dependencies
* store config at the end
* precise dependency tracking
* dependency tracking for rodfiles
* completed loading of PSym, PType, etc
* removed dead code
* bugfix: do not realloc seqs when taking addr into an element
* make IC opt-in for now
* makes tcompilerapi green again
* final cleanups

Co-authored-by: Andy Davidoff <github@andy.disruptek.com>
2021-01-02 07:30:39 +01:00
Timothee Cour
0d0e43469f
fix #14340 (#16386) 2021-01-01 22:55:22 +01:00
flywind
b5101b23b5
refactor the tests of options (#16527) 2021-01-01 19:01:07 +01:00
flywind
9d4a1f9554
fix #16494 (#16513)
* 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>
2021-01-01 10:59:19 +01:00
flywind
5fb56a3b2c
refactor cmpIgnoreStyle and cmpIgnoreCase (#16399)
* 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>
2020-12-31 11:54:40 +01:00
Andrey Makarov
5984f7a7dd
RST: improve line blocks (#16518) 2020-12-31 11:20:04 +01:00
flywind
515cd45420
Add math.copySign (#16406)
* add math.copySign
* fix + tests
2020-12-30 15:09:30 +01:00
flywind
73f778e441
follow #16505 move and active tests (#16508)
* fix printing negative zero in JS backend

* move tests
2020-12-30 15:06:50 +01:00
Saem Ghani
84a7544988
nim-gdb.py fixes mostly for nimsuggest debugging (#16479)
These fixes were primarily developed to assist in nimsuggest debugging. There
is nothing intentionally specific done for nimsuggest, but beyond the automated
tests all practical testing was done with nimsuggest. Undoubltedly these will
also assist in other debugging scenarios.

The current nim-dbg.py script was broken in a few ways:
- failed to provide detailed value information for common types (see below)
- was not passing existing tests
- could not produce type summary information

Broken types now working somewhat better:
- sequences with ref types like strings
- sequences with value types like ints
- arrays with ref types like strings
- tables with int or string keys

Other improvements:
- slightly more test coverage

Future considerations:
- this, data used by it, should be something the compiler can generates
- account for different memory layouts ([arc/orc differ](https://github.com/nim-lang/Nim/pull/16479#issuecomment-751469536))

Attempts at improving nim-gdb.py

More tests, few fixes for seq and type printing

Tables debugging fixed added further tests

Fixed type printing
2020-12-30 15:02:51 +01:00
Timothee Cour
8508c4e1c2
fix hintProcessing dots interference with static:echo and hintCC; add tests for nim secret, add tests for hintProcessing, misc other bug fixes (#16495)
* fix dots interfering with static:echo
* add tests
* fix hintProcessing dots for hintCC
* improve trunner tests
* fix bug: readLineFromStdin now writes prompt to stdout, consistent with linenoise and rdstdin
* disable a failing test for windows
2020-12-30 14:58:41 +01:00
flywind
95f599ca2d
move asciitables to std/private/ (#16498)
* move asciitables

* minor
2020-12-29 16:20:47 +01:00