Neelesh Chandola
cbbdcb2669
Show deprecation warning for fields of a deprecated enum ( #10112 )
...
* Show deprecation warning for fields of a deprecated enum
* Add test
2018-12-30 09:45:39 +01:00
Neelesh Chandola
c5ad4c10cb
Deprecated pragma is now supported on enum fields ( #10113 )
...
* {.deprecated.} pragma is now supported for enum fields
* Add tests
* Simplify code
2018-12-30 09:43:59 +01:00
Timothee Cour
a6633b9658
fix typetraits.$ regression https://github.com/c-blake/cligen/issues/84 ( #10131 )
...
* fix typetraits.`$` regression https://github.com/c-blake/cligen/issues/84
* add test
2018-12-30 09:40:21 +01:00
Alexander Ivanov
aadbdd6b06
Support undefined in isNil ( #9960 )
2018-12-30 02:48:37 +01:00
Andreas Rumpf
062d7e3a39
fixes #10082
2018-12-30 02:45:43 +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
ee7
cc4720fac1
Const tuple unpacking: add tests ( #10100 )
2018-12-27 22:40:40 +01:00
Timothee Cour
1b7c8482fe
fixes #10101 ( #10103 )
2018-12-27 22:40:09 +01:00
c-blake
e1d5356ae9
Add ability to sample elements from openArray according to a weight array ( #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.)
2018-12-23 12:23:20 +00:00
Araq
bdb67201b2
fixes #10033 [backport]
2018-12-22 18:39:20 +01:00
Oscar Nihlgård
2539363851
Don't use parseutils.parseInt in the times module ( #10028 )
2018-12-22 10:41:54 +01:00
Yuriy Glukhov
39a8ab469a
Fixed insert for nil seq in js ( #10068 )
2018-12-21 22:45:20 +01:00
Araq
4a6d699bc5
C++: make async tests green on Windows
2018-12-21 22:03:41 +01:00
alaviss
b6257f3f21
os.walkDir: correctly evaluate paths when relative = true ( #10057 ) [backport]
2018-12-21 14:12:48 +01:00
Timothee Cour
f9d58b9305
lots of testament bug fixes and improvements: ( #10044 )
2018-12-20 11:49:32 +01:00
Andreas Rumpf
2fd522cf58
use anon structs and unions for a much better debug experience ( #10055 )
2018-12-20 11:44:26 +01:00
rec
ca18dc2505
Make copies for params which are captured in closures. Fixes #7048 ( #10050 )
...
* Copy params which are captured in closures. Fixes #7048
* Forgot to emit a newline; minor adjustments to the test
2018-12-20 08:24:57 +01:00
Timothee Cour
fc7df3283c
fix test failure
2018-12-19 16:11:23 -08:00
Timothee Cour
656770402c
fix #8255 numerous issues with splitFile
2018-12-19 16:11:23 -08:00
Neelesh Chandola
730b1b2b87
proc does not take untyped/typed as argument ( #9981 )
...
* proc does not take untyped/typed as argument
* Add TODO
2018-12-19 16:18:57 +01:00
Timothee Cour
25d3539da7
[os] fix #10017 regression, fix #10025 regression ( #10018 )
...
* [os] fix #10017 regression
* [os] fix #10025 regression
2018-12-18 12:43:25 +01:00
Timothee Cour
c4e3c4ca2d
add getCurrentCompilerExe to vmops (eg allows to get nim compiler at CT); add tests for vmops ( #9925 )
2018-12-18 09:07:12 +01:00
recloser
19f5835d5c
Fixes #10005
2018-12-15 22:57:18 +01:00
Andreas Rumpf
b53327c92a
fixes #9994
2018-12-15 14:30:21 +01:00
Andreas Rumpf
675b6f0773
fixes #9978
2018-12-14 17:15:03 +01:00
Araq
ce9815bcf5
os.nim: use the new pathnorm.normalizePath implementation
2018-12-14 08:57:55 +01:00
Araq
5b39c7aca9
fixes joinPath regressions
2018-12-13 16:19:00 +01:00
Araq
9cc4a57768
os.nim: big refactoring, use the new pathnorm that was extracted by compiler/pathutils.nim; added os.relativePath
2018-12-13 12:05:50 +01:00
Andreas Rumpf
e4ae7a8929
Merge pull request #8748 from LemonBoy/when-in-objects
...
Pervasive replacement of nkRecWhen in generic types
2018-12-12 18:19:52 +01:00
Andreas Rumpf
d9ae9201c4
Merge pull request #9937 from cooldome/pragmablock_custom_pragma
...
Language feature: implement custom pragmas in pragma blocks
2018-12-12 10:15:25 +01:00
Andrii Riabushenko
1d16676dd6
add test
2018-12-11 23:53:59 +00:00
Flaviu Tamas
c0a47f7e22
Rework nil/option for nre in light of ""==nil
...
Fixes #9243
2018-12-11 22:15:57 +00:00
Flaviu Tamas
22b3e9df27
Revert 7f49364fd0 for nre
2018-12-11 22:15:02 +00:00
Andreas Rumpf
239846a528
Merge pull request #9805 from pacien/181126-list-append
...
add SinglyLinkedList.append procs
2018-12-11 22:18:40 +01:00
Andreas Rumpf
bb1ce398af
Merge pull request #9881 from timotheecour/pr_ref_9880
...
refs #9880 show index and bound in lots of `index out of bounds` errors
2018-12-11 21:49:08 +01:00
Araq
f18fcf65b3
make tests green again
2018-12-11 21:23:26 +01:00
Araq
f3d2c18a12
attempt to make travis green
2018-12-11 21:23:25 +01:00
Araq
34815a4697
megatest: make it green on Linux
2018-12-11 21:23:25 +01:00
Araq
916955dc95
make more tests green
2018-12-11 21:23:25 +01:00
Araq
4d616b5dc4
make tests green; better output for when megatest execution fails
2018-12-11 21:23:24 +01:00
Araq
0d99ff6113
testament megatest: furher refactorings making more tests green
2018-12-11 21:23:24 +01:00
Andreas Rumpf
ac785b0623
testament: joinable is now an explicit concept of a test spec
2018-12-11 21:23:24 +01:00
Araq
3b783f7e13
Testament: refactoring; makes the test joiner green
2018-12-11 21:23:23 +01:00
Arne Döring
a5ecbf823f
lots of small changes
2018-12-11 21:23:22 +01:00
Arne Döring
3859878db8
megatest checks output and nimout
2018-12-11 21:23:22 +01:00
Arne Döring
2a4c09ff88
megatest can be executed
2018-12-11 21:23:21 +01:00
Arne Döring
fb1f5c62b5
tshouldfail is stricter
2018-12-11 21:23:21 +01:00
Arne Döring
1105d03644
require errormsg to be specified before file.
2018-12-11 21:23:21 +01:00
Arne Döring
ca394ebd95
allow to disable backend logging
2018-12-11 21:23:20 +01:00
Arne Döring
465e742182
fix js category
2018-12-11 21:23:19 +01:00