summary refs log tree commit diff stats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* array literals uses typed arrays; fix a jsgen bug (#16850)flywind2021-02-153-15/+32
| | | | | | | * array litterals uses typed arrays * Update compiler/jsgen.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* fixed dot operator recursive loop & macro suggest (#16922)Saem Ghani2021-02-152-8/+25
| | | | | | | | | | | | | | | | | | * basic stability improvements; refs nimsuggest * fixed dot operator recursive loop & macro suggest * hacky fix for run away dot operator sem check Committing this mostly to make the issue more clear. Perhaps get better feedback. * semExprWithType seems like a better place to check * fixed error messages const case expressions * Clean-up test * stopped the dot operator madness No longer get infinite recursion when seming broken code with a dot operator macro like in jsffi. Co-authored-by: Araq <rumpf_a@web.de>
* fix #16978 unittest js foreign exception (#16998)Timothee Cour2021-02-131-0/+16
| | | | * fix #16978 unittest js foreign exception
* followup #17001: improve coverage for tests/openarray/topenarray.nim (#17006)Timothee Cour2021-02-131-3/+17
| | | | * followup #17001: improve coverage for tests/openarray/topenarray.nim
* Make parseopt available on all backends (#17009)hlaaftana2021-02-132-3/+7
| | | | | | | | | * Make parseopt available on all backends * fix spaces * fix getopt and update prelude * no crazy unnecessary version checks, use doAssert
* compilesettings: add libpath (#16997)Timothee Cour2021-02-121-13/+10
| | | | | | | | | | | * compilesettings: add libpath * add test * changelog * fixup Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* Improve math module (#17019)konsumlamm2021-02-122-311/+358
| | | | | | | | | | | | | | | | | | | | | | | | | * Improve documentation for math Support empty input for cumsummed Use runnableExamples Move some examples to tests Add more tests * Update tests/stdlib/tmath.nim Move some tests to trandom.nim Move tests into main template where possible Add test for #17017 * Add more tests for gamma & lgamma Remove gamma(-1.0) example Small fixes/changes * Move more tests into template main() * Fix typos * Add edge case examples for copySign
* typeToString: type float => typedesc[float] (#17011)Timothee Cour2021-02-1211-17/+17
| | | | | | | * typeToString: type float => typedesc[float] * fixup * fix tests
* parse RST headings when EOF follows them (#17014)Andrey Makarov2021-02-121-0/+7
|
* add system random to stdlib: std/sysrand (#16459)flywind2021-02-111-0/+13
|
* [backport:1.4] JS cstring null fixes (#16979)hlaaftana2021-02-112-2/+33
| | | | | * [backport:1.4] JS cstring null fixes * fix JS move string * make it look cleaner
* Improve documentation for assertions (#16988)konsumlamm2021-02-111-3/+3
| | | | | | | | | | | * Improve documentation for assertions * Apply suggestions Fix tests/assert/tassert_c.nim * Use runnableExamples * Move runnableExamples to module scope
* [JS] Ref #15952 make toOpenArray works better (#17001)flywind2021-02-101-0/+13
| | | | | * ref 15952 toOpenArray works in JS * fix
* ARC: Analysis in one pass v2 (#17000)Clyybber2021-02-102-3/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Analyse last reads all at once * Integrate firstWrite analysis * Small cleanup * Use sets instead of seqs * Remove instrTargets * Reap the benefits * Implement error diagnostics * Operate on DFA index for lastRead analysis * Use mgetOrPut * Cache alias results This improves performance by a lot, since many CFG locations map to a single PNode * Improve performance * Improve performance * Cleanup
* Revert "ARC Analysis in one pass (#16849)" (#16984)Clyybber2021-02-092-29/+3
| | | This reverts commit ab740cb5b9bfbacece26956fa2444763a790ccd1.
* Remove declPragmas from lambdas [backport:1.0] (#16966)hlaaftana2021-02-091-0/+7
| | | | | | | | | * Remove declPragmas from lambdas [backport:1.0] * add test for exportc * fix test * fix align, nodecl -> noinit
* ARC Analysis in one pass (#16849)Clyybber2021-02-092-3/+29
| | | | | | | | | | | | | | | | | | | * Analyse last reads all at once * Integrate firstWrite analysis * Small cleanup * Use sets instead of seqs * Remove instrTargets * Reap the benefits * Implement error diagnostics * Operate on DFA index for lastRead analysis * Use mgetOrPut
* fix #16967 [backport:1.2] (#16976)hlaaftana2021-02-091-0/+16
| | | | | * fix #16967 [backport:1.2] * move test to tsugar
* tests and docs for call operator (#16980)hlaaftana2021-02-093-0/+91
| | | | | | | * tests and docs for call operator * fix leftover * add extra dot test
* std/lists: Various changes to `lists` (RFC #303) (#16536)Peter Salvi2021-02-081-20/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Various changes to `lists` (RFC #303) * Removing a non-element is no-op; better tests * Remove preserves cycles; add appendMove alias; tests. * Return value for (singly linked) `lists.remove` * More test for lists.remove * Moved `lists.append` to the end of the file to see all `add` definitions * Disable testing js for now * Use workaround for swap js bug * Smaller diff * Undo "silent" deprecation of append * Correct typo in changelog Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * Remove `appendMoved` Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * Don't remove appendMoved Co-authored-by: Clyybber <darkmine956@gmail.com> Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
* rename case statement macro from match to `case` (#16923)hlaaftana2021-02-081-0/+35
| | | | | * rename case statement macro from match to `case` * fix test
* basic cleanups regarding SSL handling (#16940) [backport:1.0]Andreas Rumpf2021-02-081-1/+1
| | | | | | | * basic cleanups regarding SSL handling * enabled certificate checking on Windows * updated the SSL test * quoting helps
* fix #16949 --app:staticlib works on openbsd; --app:staticlib tested in CI ↵Timothee Cour2021-02-081-0/+27
| | | | (#16950)
* use typeof instead type (#16962)flywind2021-02-089-39/+39
|
* close #16921 (#16951)flywind2021-02-061-0/+3
|
* stdlib/os: handle symlinks in copy/move functions (#16709)Roman Inflianskas2021-02-042-0/+134
| | | | | | | | | | | | | | | | | | | | | | | | | | * stdlib/os: handle symlinks in copy/move functions - Added optional `options` argument to `copyFile`, `copyFileToDir`, and `copyFileWithPermissions`. By default, symlinks are followed (copy files symlinks point to). - `copyDir` and `copyDirWithPermissions` copy symlinks as symlinks (instead of skipping them as it was before). - `moveFile` and `moveDir` move symlinks as symlinks (instead of skipping them sometimes as it was before). - Added optional `followSymlinks` argument to `setFilePermissions`. See also: https://github.com/nim-lang/RFCs/issues/319 Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * Address comments in #16709 Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * Address comments in #16709 (second iteration) Skip symlinks on Windows. Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
* strictFuncs+views: add test that imports stdlib modules (#16878)ee72021-02-033-12/+198
| | | | | | | | | | | | | | | This commit attempts to improve testing of strictFuncs and views, and prevent regressions like #16873 (resolved by 0b01eddace6a). We previously only explicitly tested strictFuncs and views with a smaller number of stdlib modules, mostly in: - tests/effects/tstrict_funcs.nim - tests/views/tcan_compile_nim.nim Note that this commit leaves the `pegs` module commented out; it cannot currently be compiled with `--experimental:views` (see #16892). Note also that this commit is not sufficient to test strictFuncs and views, but it does detect a subset of problems.
* remove .github/workflows/ci_ssl.yml; instead run via trunner_thirdparty (#16221)Timothee Cour2021-02-026-237/+267
|
* Sugar tests (#16820)konsumlamm2021-02-021-118/+215
|
* Add testcase for #16897 (#16917)Clyybber2021-02-021-0/+33
|
* tests/tuples/ttuples_issues.nim: test on all backends + various improvements ↵Timothee Cour2021-02-023-110/+123
| | | | | | | (#16907) * improve tests/tuples/ttuples_issues.nim: test on all backends * address comments
* IC: bugfixes (WIP) (#16836)Andreas Rumpf2021-02-021-0/+29
| | | | | | | | * minor improvements * IC: added the required logic for compilerProcs * LazySym ftw * we need this testing logic * reimplement the old way we use for module package creation * fixes a regression; don't pick module names if you can avoid it
* `dumpToString`: improves on `sugar.dump` (#16841)Timothee Cour2021-02-021-1/+11
| | | | | | | * dumpToString * _ * fixup * changelog * address comment: removed the word "Deprecated"
* Improve doc comments (#16902)konsumlamm2021-02-021-83/+85
| | | | | Add runnableExamples Use `reduce` in `initRational` and `//` Add static tests
* 2.5x- 3x faster copyFile on osx (#16883)Timothee Cour2021-02-011-9/+14
|
* add finally as post expr block [backport:1.4] (#16896)hlaaftana2021-02-011-0/+115
|
* fix #16822 (#16884)flywind2021-02-012-2/+30
| | | | | | | | | * see whether it breaks * fix #16884 * correct * fix #14574
* critbits: fix error from strictFuncs (#16877)ee72021-02-011-0/+1
| | | | | | | | | Previously, compiling a file containing just `import critbits` with `nim c --experimental:strictFuncs` would produce the following error: critbits.nim(529, 6) Error: 'toCritBitTree' can have side effects This was introduced by 2aed4186989e (#16564). Fixes: #16873
* distinctBase now is identity instead of error for non distinct types (#16891)Timothee Cour2021-02-011-0/+2
|
* Fix #12595 (#16874)konsumlamm2021-01-311-2/+8
|
* add lost functions (#16843)flywind2021-01-291-0/+2
|
* fix floats slice (#16853)flywind2021-01-291-3/+3
| | | | | | | | | | | | | | | | | | | | | | | * see whether it breaks * fix * fix * minor * fix * add enum * use Ordinal types * fix tests * fix * another style * fix remainning cases
* 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
* fix #16752: threadvar now works with importcpp types; osx now uses native ↵Timothee Cour2021-01-274-0/+147
| | | | | | | | | | | TLS (`--tlsEmulation:off`), which can be orders of magnitude faster (#16750) * osx now uses native TLS, which can be orders of magnitude faster * add {.cppNonPod.} * improve test * changelog, docs, disable part of windows test
* 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
* Finer analysis for array access (#16787)Clyybber2021-01-241-0/+31
| | | | | * Refine the analysis for array access * Cleanup * Add comments
* fix manual to reflect reality for .nosideeffect (#16781)Timothee Cour2021-01-221-0/+24
|
* Improve the marshal module (#16777)konsumlamm2021-01-221-94/+85
| | | | | | | | | | * Improve marshal Use runnableExamples Refactor tests * Readd {.inheritable.} test Apply suggestions