summary refs log tree commit diff stats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* fix sdl_test test that failed in CI cpp mode (#10314)Timothee Cour2019-01-151-6/+18
| | | | | | * fix sdl_test test that failed in CI cpp mode * preserve old code for NimInAction in `nim c` mode
* parseopt2.cmdLineRest is now correct too (#10304)Timothee Cour2019-01-151-16/+19
|
* fix #10305 nim cpp is now nan-correct at CT (#10310)Timothee Cour2019-01-151-0/+28
| | | | | * fix #10305 nim cpp is now nan-correct at CT * add example where simply `nim cpp -d:release` would exhibit nan bug
* fix twrong_refcounts in nim cpp mode (#10313)Timothee Cour2019-01-151-0/+3
|
* fixes #10203 (#10290)Andreas Rumpf2019-01-151-0/+20
| | | | | | * fixes #10203 * make typredef test green again * fixes the regressions differently
* disable one more test for C++Andreas Rumpf2019-01-151-0/+1
|
* typed/untyped return type is invalid for everything except templates and ↵Neelesh Chandola2019-01-151-0/+12
| | | | macros (#10275)
* fix testTimothee Cour2019-01-141-2/+13
|
* fix #9842 #9951: `nim -r` and parseopt.cmdLineRest are now correctTimothee Cour2019-01-141-44/+92
|
* improve formatting in assertEqualsTimothee Cour2019-01-141-11/+11
|
* make tests green againAndreas Rumpf2019-01-141-0/+1
|
* Fixes #10065 (#10260)Arne Döring2019-01-141-4/+4
| | | | CountTable now returns 0 instead of 'key not found' for get requests.
* fixes #7878Araq2019-01-141-1/+10
|
* fixes #7524Araq2019-01-141-0/+10
|
* make megatest greenAraq2019-01-131-2/+1
|
* closes #3744Araq2019-01-131-0/+11
|
* fixes #10075 [backport]Araq2019-01-131-1/+30
|
* make tests more robust; tests should be deterministic, no randomize() calls ↵Araq2019-01-133-14/+16
| | | | in tests
* fixes #10273 execShellCmd now returns nonzero when child killed with signal ↵Timothee Cour2019-01-134-18/+96
| | | | | | | | | | + other fixes (#10274) * s/exitStatus(...)/exitStatusLikeShell(...)/ * fix #10273 execShellCmd now returns nonzero when child exits with signal * test case for #10249 and explanation for the bug * fix test failure * add tests/nim.cfg
* Fixes 10202 (#10283)rec2019-01-121-10/+27
| | | | | | * Add a test case for #10202 * Fix asgn for object tyVars; fixes #10202 * Check the variant kind before accessing the sym field
* void object fields are now ignored by codegen and fields/fieldPairs iterator ↵Neelesh Chandola2019-01-101-0/+17
| | | | | | | | | (#10144) * Codegen now ignores object fields of type void * Fix `$` bug for objects/tuples where it does not add a comma * fields/fieldPairs iterators now ignore void types * Use `isEmptyType` instead of checking for `tyVoid` directly
* Merge pull request #10248 from narimiran/graveyardMiran2019-01-102-3/+7
|\ | | | | Move four modules to graveyard
| * remove `scgi`narimiran2019-01-101-2/+7
| |
| * remove `subexes`narimiran2019-01-101-1/+0
| |
* | destructors: lift type bound operations for case and distinct objects (#10238)cooldome2019-01-101-21/+50
|/
* add `alignTable`, `parseTableCells` to align/format a tab(etc) delimited ↵Timothee Cour2019-01-093-0/+171
| | | | | | | | table (#10182) * add compiler/unittest_light.nim for easy diffing: assertEquals and mismatch * fixup * add alignTable, parseTableCells
* add `isNamedTuple`; make $(1, 2) be (1, 2) instead of (Field0: 1, Field1: 2) ↵Timothee Cour2019-01-0810-17/+74
| | | | | | | | | | | | | 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
* [error messages, stacktraces] fix #8794 #9270 #9767 #9768 (#9766)Timothee Cour2019-01-083-0/+71
| | | | | | | | | | | | | | | | | | | * fixes #8794 : `Error: undeclared field: 'foo'` should show type (+ where type is defined) (hard to guess in generic code) * fixes #9270: `--listFullPaths` not honored by `declared in foo.nim` messages * fixes #9767: VM stacktrace doesn't honor --excessiveStackTrace:on * fixes #9768: VM stacktrace misses column info, can lead to ambiguous or harder to read stacktraces * refactors some col+1 code to col + ColOffset (self documents code) * make getProcHeader show declared info location also for types and all routine kinds (including macros,templates) instead of just (rather arbitrarily) for iterator,proc,func,method * --listFullPaths now is honored in more places * fix typo system/except.nim => lib/system/excpt.nim * remove substr(foo, 0) hack in compiler/vm.nim which seems old and not applicable anymore
* {.deprecated: msg.} now works for vars and lets (#10234)Neelesh Chandola2019-01-082-7/+9
|
* os.execShellCmd: fixes #10231 (#10232)alaviss2019-01-081-0/+13
| | | | | | | Darwin has long deprecated the wait union, but their macros still assume it unless you define _POSIX_C_SOURCE. This trips up C++ compilers. This commit duplicates the behavior of WEXITSTATUS when _POSIX_C_SOURCE is defined.
* Fix for sizeof bitsize combination (#10227)Arne Döring2019-01-071-0/+12
| | | | | | | | * fix #10082 * added test
* add custom pragma support for var and let symbols (#9582)jcosborn2019-01-071-6/+29
| | | | | | * add custom pragma support for var and let symbols * updated changelog for custom pragmas on var and let symbols * add oldast switch for backwards compatibility
* Fix #10073 (#10218)zah2019-01-071-0/+16
|
* remove deprecated modules (#10215)Miran2019-01-077-62/+3
| | | | | | | | | | | | | | | | | | * removed from `compiler`: * lists (deprecated 2 years ago) * removed from `lib` (all deprecated 3 years ago): * ssl * matchers * httpserver * removed from `lib/deprecated`: * unsigned * actors (and three accompanying tests) * parseurl * moved to `lib/deprecated`: * securehash (the reason for not directly removing - it was deprecated (only) one year ago)
* Fix defer not not-working at top level (#10191)Neelesh Chandola2019-01-072-11/+2
|
* Fix getAddrInfo, add IPPROTO_ICMPV6 Closes #10198Federico Ceratto2019-01-061-0/+36
|
* Guard against null exception (#10162)rec2019-01-041-0/+3
|
* fix bug in doAssertRaises when exception==Exception (#10172)Timothee Cour2019-01-041-0/+12
| | | | | * fix bug in doAssertRaises when exception==Exception * add testcase for doAssertRaises
* exportc is now not allowed for type aliases (#9979)Neelesh Chandola2019-01-021-0/+12
|
* fixes #10148 (#10149)cooldome2018-12-311-0/+29
| | | | | * fixes #10148 * fix a typo
* fix off by 1 error in `col` shown by toFileLineCol (#10138)Timothee Cour2018-12-313-3/+3
| | | | | * fix off by 1 error in `col` shown by toFileLineCol * fix test failures
* Resolve things raised in https://github.com/nim-lang/Nim/issues/10081 ? (#10084)c-blake2018-12-311-9/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Resolve things raised in https://github.com/nim-lang/Nim/issues/10081 ? CDF is a standard ident in all things related to random numbers/sampling, and full words "cumulativeDistributionFunction" would be silly long, in this case, IMO. We use lowercase `cdf` to make it not look like a type, remove all looping from `sample` letting callers do it. Besides just side-stepping any `sampleSize` name choice, callers may want to filter out samples anyway which this makes slightly simpler. Also add two variants of `cumsum`, value return and in-place update distinguished by the var-ness of the first argument. Add tests for `int` and `float` for both `cumsum` and the new `sample`. (The sample tests exercise the value return mode of `cumsum`.) Functionality pre-this-PR `sample(a, w)` is now the almost as simple `for i in 0..<n: sample(a, w.cumsum)`, but this new code factoring is almost surely better. The statistical tests pass, as before. * Address Araq comment in https://github.com/nim-lang/Nim/pull/10084 We can always add in some `var` version later if desired to save memory, but this change now at least firms up the `sample` interface. * Rename `cumsum` -> `cumsummed` to honor NEP1 style. Re-instate `cumsum` as the in-place transformation. Test both in `tests/stdlib/tmath.nim` and use `cumsummed` in the example code for sample since that's a simpler example. * Fix requests from https://github.com/nim-lang/Nim/pull/10084 : example in lib/pure/math.nim and comment whitespace in lib/pure/random.nim
* Check there are no side effects before optimizing away compile time ↵deech2018-12-311-0/+42
| | | | expressions. (#9934)
* Dead code elimination for entire modules and their init procs if empty (#10032)cooldome2018-12-302-1/+7
| | | | | | * fixes #9798 * Change order of write modules * Move datInit calls ahead of initStackBottom
* Show deprecation warning for fields of a deprecated enum (#10112)Neelesh Chandola2018-12-301-4/+14
| | | | | | * Show deprecation warning for fields of a deprecated enum * Add test
* Deprecated pragma is now supported on enum fields (#10113)Neelesh Chandola2018-12-302-0/+32
| | | | | | * {.deprecated.} pragma is now supported for enum fields * Add tests * Simplify code
* fix typetraits.`$` regression https://github.com/c-blake/cligen/issues/84 ↵Timothee Cour2018-12-301-0/+3
| | | | | | | (#10131) * fix typetraits.`$` regression https://github.com/c-blake/cligen/issues/84 * add test
* Support undefined in isNil (#9960)Alexander Ivanov2018-12-301-0/+16
|
* fixes #10082Andreas Rumpf2018-12-301-0/+11
|
* revives: Move typetraits.`$` to system. Fixes #5827 (#10071)Timothee Cour2018-12-301-0/+14
| | | | | | * 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