Andreas Rumpf
eefb13d638
better nativestacktrace support; refs #15284 ; backport [1.2] ( #15384 )
...
* nimStackTraceOverride: enable stack traces in exceptions
This is a two-step stack trace collection scheme, because re-raised
exceptions will collect multiple stack traces but use them rarely, when
printing info about an uncaught exception, so it makes sense to only do
the cheap stack unwinding all the time and the relatively expensive
debugging information collection on-demand.
`asyncfutures` implements its own `$` proc for printing
`seq[StackTraceEntry]`, so we have to add the debugging info there, just
like we do for the private `$` proc in `system/excpt`.
* cleaned up PR #15284
Co-authored-by: Ștefan Talpalaru <stefantalpalaru@yahoo.com >
(cherry picked from commit 1fae66e4df )
2020-10-06 08:45:13 +02:00
Miran
8088633250
faster CIs ( #13803 )
...
* ttables: smaller table, 5x speedup
* thavlak: less iterations, less loops; 30% speedup
* tasyncclosestall: shorter timeout; 35% speedup
* gcleak4: less iterations, 2x speedup
* ttimes: remove deprecated stuff
* tdangerisrelease: remove cpp backend, 3x speedup
* tfrexp1: smaller range, 2x speedup
* trtree: fix warnings, less iterations, 6x speedup
* tasyncawait_cyclebreaker: smaller swarm size; 2x speedup
* trealloc: smaller number of iterations; 10x speedup
* towned_binary_tree: less iterations, 4x speedup
* tclosure: remove unused code, less iterations; 2x speedup
* twaitany: less durations; 1.4x speedup
* tasync_misc: less iterations, 2x speedup
* t8535: smaller sleep, 1.5x speedup
* tmanyjoin: smaller sleep, 2x speedup
* t12221: shorter sleeps, removed two slower tests; 1.6x speedup
* tfuturestream: smaller sleep; 1.5x speedup
* growobjcrash: less iterations; 2x speedup
* ttryrecv: smaller sleep; 1.5x speedup
* treusetvar: less threads; 2x speedup
* delete tthreadanalysis2, basically a duplicate of tthreadanalysis
* t7758: less iterations, 1.5x speedup
* tasyncawait: smaller swarm, less messages; 1.5x speedup
* tjsandnativeasync: smaller sleep, 1.5x speedup
* tpendingcheck: smaller sleep, 1.5x speedup
* remove rodfiles test category
* move tseq from its own category to 'collections' category
* remove unneeded tests and helpers from 'assert' category
* stdlib: merge tbitops2 into tbitops
* remove 'trepr2' from 'stdlib' cat
* merge 'tstreams' into one file
* remove 'tinefficient_const_table' from 'ccbugs' cat
* merge 'tcollections_to_string' into 'tcollections'
* tblocking_channel: smaller sleep, small speedup
* tconvexhull: less iterartions; 1.2x speedup
* merge 'tdeepcopy2' into 'tdeepcopy'
* merge 'tdisjoint_slice2' into 'tdisjoint_slice1'
* tmissing_deepcopy: smaller sequence
* tsendtwice: smaller arrays; 5x speedup
* remove 'tindexerrorformatbounds'
* disable multimethod tests
* remove 'gc:none' and 'refc' without 'd:useRealtimeGC' from gc tests
* koch.nim: bootstrap just with '-d:release', no need for 'csource'
* add github workflow for documentation
* testament: no need for 8 sub-second decimals
2020-03-30 13:18:12 +02:00
Miran
14b2354b7d
rename lenTuple and lenVarargs ( #13639 )
...
* rename 'lenTuple' to 'tupleLen'
Rationale:
`lenTuple` is a tuple consisting of lengths (e.g. `(1, 5, 0)`),
`tupleLen` is a length of a tuple (e.g. `tupleLen((1, 5, 0) == 3`)
* rename 'lenVarargs' to 'varargsLen'
The same rationale as a previous commit. Consistency.
2020-03-12 20:07:02 +01:00
Timothee Cour
6a0e87eb38
cleanup Ordinal ( #13501 )
2020-02-27 10:43:13 +01:00
Timothee Cour
e4415422fe
Revert "printing float values will have one more digit. ( #13276 ) [backport]" ( #13363 )
...
This reverts commit b2c6db97f9 .
2020-02-08 09:30:24 +01:00
Arne Döring
b2c6db97f9
printing float values will have one more digit. ( #13276 ) [backport]
...
* printing float values will have one more digit. Fixes #13196
2020-02-07 17:10:25 +01:00
Timothee Cour
bf22b44b1f
miscellaneous bug fixes ( #13291 )
...
* fix for emscripten etc
* add testcase for #13290
* replace deprecated isNilOrWhitespace
2020-01-30 10:54:50 +01:00
Timothee Cour
a0980c88c9
lenVarargs: number of varargs elements ( #12907 )
2019-12-23 09:42:32 +01:00
Andreas Rumpf
f30da2f266
fixes #12315 [backport]; refs #12314 ( #12385 )
2019-10-08 20:49:45 +02:00
Leorize
73c8391fd3
azure: disable failing tests
2019-10-03 18:36:18 +02:00
Arne Döring
3d4ad9739c
fix min/max for float numbers ( #12068 )
2019-09-02 11:21:26 +02:00
Arne Döring
d564130a3b
Fix to int to biggest int ( #12066 )
...
* fix to(Biggest)Int
* kill toFloat magics as well
2019-08-27 23:18:46 +02:00
Andreas Rumpf
742862b847
more enhancements for #11618 ( #11976 )
...
* finish the Windows IO layer changes; refs #11618
* added system.getOsFileHandle which is less error-prone on Windows
* make tests green again
2019-08-18 22:57:56 +02:00
Andreas Rumpf
d2684cdfd2
fixes #11447
2019-07-06 21:20:16 +02:00
Arne Döring
1ae61767f8
disable talloc2 on 32 bits ( #10656 )
2019-02-13 23:30:14 +01:00
Arne Döring
28394153ab
32 bit fixes ( #10608 )
2019-02-13 23:30:14 +01:00
Miran
268197add8
properly deprecate parseopt2 ( #10452 )
2019-01-25 13:13:55 +01:00
Timothee Cour
6ce3949c8a
add isNamedTuple; make $(1, 2) be (1, 2) instead of (Field0: 1, Field1: 2) which leaked implementation detail ( #10070 )
...
* add `isNamedTuple`; make $(1, 2) be (1, 2) instead of leaking implementation detail (Field0: 1, Field1: 2)
fixes this: #8670 (comment) /cc @alehander42 @Vindaar @mratsim
* Note: isNamedTuple is useful in other places, eg #10010 (comment)
* move isNamedTuple to helpers.nim to avoid exposing new symbol to system.nim
* remove workaround in tests/vm/tissues.nim failing test now that #10218 was makes it work
2019-01-08 18:37:25 -08:00
Timothee Cour
319b46230c
fix bug in doAssertRaises when exception==Exception ( #10172 )
...
* fix bug in doAssertRaises when exception==Exception
* add testcase for doAssertRaises
2019-01-04 13:54:02 +01:00
Timothee Cour
0831292863
revives: Move typetraits.$ to system. Fixes #5827 ( #10071 )
...
* Move typetraits.`$` to system. Fixes #5827 .
* revive PR; adjust code to make sure everything works and add tests
* fix tests/concepts/tstackconcept.nim
* address comments
2018-12-30 01:09:47 +01:00
Andreas Rumpf
ac785b0623
testament: joinable is now an explicit concept of a test spec
2018-12-11 21:23:24 +01:00
Arne Döring
a5ecbf823f
lots of small changes
2018-12-11 21:23:22 +01:00
Arne Döring
2a4c09ff88
megatest can be executed
2018-12-11 21:23:21 +01:00
Araq
562d185cb7
cleanup tests; don't use non-working 'msg' spec field
2018-11-23 13:16:45 +01:00
Arne Döring
be553e691b
more eyewash
2018-11-23 11:58:31 +01:00
Arne Döring
161e14829a
disable tio.nim, it just causes problems
2018-11-23 11:58:30 +01:00
Arne Döring
bfcf82c7e5
maybe this time?
2018-11-23 11:58:29 +01:00
Arne Döring
d60615583f
hopefully this time the tests will compile on the server
2018-11-23 11:58:29 +01:00
Arne Döring
e012eb1001
updated tests to be executed
2018-11-23 11:58:28 +01:00
Arne Döring
031bfdec6f
make run the default action of a test in tester
2018-11-23 11:58:28 +01:00
Ștefan Talpalaru
f8fa94cb20
fix segfault when calling shallow() on an empty string ( #9782 ) [backport]
...
shallow() casts its string argument to a seq and then tries to access
its fields. Guess what happens when that string is nil, which seems to
be the representation of an empty string (both the default value and an
explicitly assigned "").
Segfault encountered when running "ntags -R ." on a large project. The relevant line:
a1c62c38e5/ntags.nim (lines-125)
2018-11-22 14:47:27 +01:00
c-blake
1b3725e395
Add toOpenArray[T](ptr UncheckedArray[T]) for clarity. ( #9316 )
...
* Add `toOpenArray[T](ptr UncheckedArray[T])` for clarity. `ptr array[0,T]`
for some unchecked type already works but A) `UncheckedArray` seems to be
the intended future way for this kind of access, and B) essentially all use
cases will have a `ptr` for that kind of array source and this call signature
lets callers drop the trailing `[]` corresponding to that `ptr` deref.
This PR relates to issue https://github.com/nim-lang/Nim/issues/9001 .
* Add a test for toOpenArray() for UncheckedArray[T]s.
2018-10-12 17:40:07 +02:00
Araq
d48e964950
fixes #9281
2018-10-11 19:52:48 +02:00
Araq
fa338768a3
fixes #8847
2018-09-03 08:37:32 +02:00
Andreas Rumpf
f2263cd129
make tests green again
2018-08-18 18:52:39 +02:00
Araq
420ed0596b
fixes more nil handling regressions
2018-08-13 17:27:44 +02:00
Araq
de263a43c6
deprecate isNil for strings and seqs
2018-08-08 11:21:56 +02:00
jcosborn
8f4c5a8955
fixed #7894 ( #8496 )
...
make system tests run properly
2018-08-01 10:57:35 +02:00
Andreas Rumpf
2e3f477957
VM: accessing the string terminator is not allowed anymore; cleanup tests/system/tostring.nim
2018-07-17 18:22:20 +02:00
Dmitry Atamanov
a6c3bbf01a
Add proc toOpenArray[byte] for strings ( #7820 )
2018-07-07 21:03:22 +02:00
nitely
7297195f9f
test negative range array
2018-06-06 02:22:33 -03:00
nitely
ba39f359aa
check bounds instead of index
2018-06-05 20:22:27 -03:00
data-man
b4626a220b
Added $ for openarrays. Fixes #7940 .
2018-06-01 21:28:23 +03:00
Andreas Rumpf
f64f9e50cc
correct comparisons for nil strings/seqs
2018-04-28 15:13:44 +02:00
Andreas Rumpf
7c538b26ad
nil in string concats does not produce crashes anymore
2018-04-27 21:33:05 +02:00
Araq
1d9343080d
added toOpenArray builtin for zero-copy slices; syntax sugar yet to come
2018-03-24 20:26:34 +01:00
jcosborn
e39f2a9283
fix allocator corruption for large sizes ( #7338 )
...
* fix allocator corruption for large sizes
* allow large chunks to coalesce and added test case
* use correct constants in MaxBigChunkSize
2018-03-17 23:59:04 +01:00
pqflx3
8d8df5807b
Fixes #7121 ( #7148 )
...
* Replace ftell and fseek with (windows) _ftelli64, _fseeki64 and (posix) ftello, fseeko
* disable large file test
2018-01-31 16:38:37 +01:00
Fabian Keller
6df6ec27ec
Improved collection-to-string behavior ( #6825 )
2017-12-14 14:02:13 +01:00
Andreas Rumpf
46275f6b8f
fixes #6710
2017-11-08 15:45:26 +01:00