summary refs log tree commit diff stats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Make config processing order test more robust" (#16561)flywind2021-01-031-1/+1
| | | This reverts commit cf714c129f7dd598863d1cc588e685df2438c658.
* Make config processing order test more robustClyybber2021-01-021-1/+1
|
* fix #16526 run config.nims before foo.nim.cfg (#16557)Timothee Cour2021-01-026-0/+19
| | | | | * fix #16526 run config.nims before foo.nim.cfg * add test
* Algorithm improvements (#16529)konsumlamm2021-01-021-2/+2
| | | | | | | | | | | | * 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.
* fix #16061 (#16551)flywind2021-01-021-1/+6
|
* fix `is "closure"` (#16552)flywind2021-01-021-0/+9
|
* fix #16542 (#16549)flywind2021-01-021-1/+30
| | | * fix #16542
* big steps torwards an efficient, simple IC implementation (#16543)Andreas Rumpf2021-01-021-1/+1
| | | | | | | | | | | | | | | | | | | * 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>
* fix #14340 (#16386)Timothee Cour2021-01-011-0/+17
|
* refactor the tests of options (#16527)flywind2021-01-011-143/+182
|
* fix #16494 (#16513)flywind2021-01-011-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* refactor cmpIgnoreStyle and cmpIgnoreCase (#16399)flywind2020-12-313-38/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* RST: improve line blocks (#16518)Andrey Makarov2020-12-311-4/+34
|
* Add math.copySign (#16406)flywind2020-12-301-1/+49
| | | | | * add math.copySign * fix + tests
* follow #16505 move and active tests (#16508)flywind2020-12-302-30/+26
| | | | | * fix printing negative zero in JS backend * move tests
* nim-gdb.py fixes mostly for nimsuggest debugging (#16479)Saem Ghani2020-12-302-20/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* fix `hintProcessing` dots interference with `static:echo` and `hintCC`; add ↵Timothee Cour2020-12-301-8/+56
| | | | | | | | | | 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
* move asciitables to std/private/ (#16498)flywind2020-12-291-1/+1
| | | | | * move asciitables * minor
* fix printing negative zero in JS backend (#16505)flywind2020-12-291-0/+30
|
* improve examples in manual (#16497)flywind2020-12-291-1/+1
| | | | | | | | | | | | | * improve examples in manual * Update doc/manual.rst Co-authored-by: Clyybber <darkmine956@gmail.com> * Update tests/cpp/ttemplatetype.nim Co-authored-by: Clyybber <darkmine956@gmail.com> Co-authored-by: Clyybber <darkmine956@gmail.com>
* Added cmpMem export (#16484)Antonis Geralis2020-12-291-0/+15
| | | | | | | | | | | | | * added cmpMem export * updates * fix test * Tiny changelog change * Add a dot. Co-authored-by: Clyybber <darkmine956@gmail.com>
* improve turi.nim tests: js, vm; merge tdecodequery.nim (#16500)Timothee Cour2020-12-292-194/+181
| | | | | | | | | | | * improve turi tests: js, vm; merge tdecodequery.nim * improve test * add test in js, improve test * remove matrix: "--styleCheck:hint --panics:on" * fixup
* Nil type check implementation (#15287)Alexander Ivanov2020-12-292-0/+564
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Nil checking * Enable current older not nil checking again, run new checking only under flag, skip our test * Enable tests, work on try/except and bugs, fix notnil tests * Enable strictNotNil tests (currently with lowercase category) and add some expected output * Work on try/except/finally: still some things unclear and a lot of code can raise out of try * Fix the notnil build by going back to the old version of a test which I shouldn't have changed * Fix test : use action compile * Work on mutation and aliasing: not finished * Render var parititions graph, try to understand it, fix a nilcheck if bug * Rebase, progress on working with partitions * Improve time logic * Fix some bugs, use graph indices instead of symbol in nil map * Fix bugs, test simpler ident aliasing for now, support two mutation levels * Support ContentMutation and ReAssignment: for now just detect possible re assignment for var parameters of calls * Enable several simple passing tests * Cleanup a bit, fix condition/branch infix-related bug * Remove some files, address some comments by Araq * Use internalError and no quit for now * Separate tests with expected warnings and with expected ok, fix a bug with if with a single branch related to copyMap * Fix new data structures, bugs: make tests pass, disable some for now * Work on fixing errors with non-sym nodes, aliasing: tests fail * Work on alias support: simple set-based logic, todo more tests and ref sets? * Use ref sets: TODO can we think of handle seq-s similar to varpartitions' Araq ones * Handle defers in one place, stop raising in reverse to make an async test compile with strictNotNil, add a commented out test * Dot expressions: call/reassignment. Other refactorings and distinct, SeqOfDistinct support. Checkout an older varpartitions * Work on field tracking * Backup : trying to fix bugs when running some stdlib stuff for running an async test * Start a section about strict not nil checking in experimental manual * Fix experimental strict not nil manual section and move it to another file based on Araq feedback * Fix unstructured flow and double warning problems, fix manual, cleanup * Fix if/elif/else : take in account structure according to Araq feedback * Refactor a bit * Work on bracket expr support, re-enable tests, clarify in manual/tests/implementation static index support for now * Work on compiling stdlib and compiler with strictNotNil * Small fixes to the manual for strictNotNil * Fix idgen for strict check nil rebase * Enable some simple tests, remove old stuff, comment out code/print * Copy the original varpartitions source instead of my changes * Remove some files
* RST: fix directive with fields (#16490) (#16493)Andrey Makarov2020-12-291-0/+11
| | | | | | | * RST: fix directive with fields (#16490) * Update tests/stdlib/trstgen.nim Co-authored-by: Clyybber <darkmine956@gmail.com>
* use doAssert in tests (#16486)flywind2020-12-2878-1075/+1075
|
* fix #15043 (#16441) [backport:1.4]cooldome2020-12-271-0/+16
| | | | | * fix #15043 * Trigger build
* follow #15860 clean cgi module (#16487)flywind2020-12-272-27/+10
| | | | | * follow #15860 clean cgi module * follow #15860 clean cgi module
* remove some noises in tests (#16448)flywind2020-12-2717-181/+140
|
* fix #16469 vm float constants: do not conflate -0.0 and 0.0 (#16470)Timothee Cour2020-12-271-1/+14
| | | | | * fix #16469 vm float constants: do not conflate -0.0 and 0.0 * fix test for 32bit
* follow #15357 and move decodeQuery (#15860)flywind2020-12-271-0/+7
| | | | | | | | | * follow #15357 and move decodeQuery * solve problem one * minor * deprecate decodeData * add changelog and since * add testcase for decodeQuery
* RST: implement admonitions (#16438)Andrey Makarov2020-12-271-0/+49
|
* fix nim js cmp fails at CT (#16473)flywind2020-12-272-15/+41
|
* fix #16474 `unittest.check type1 is type2` gives CT error (#16476)flywind2020-12-271-0/+19
| | | | * fix #16474 * more tests
* add `euclDiv` and `euclMod` to `math` (#16414)flywind2020-12-231-0/+28
| | | | | | | | * add `euclDiv` and `euclMod` to `math` * use abs * Update lib/pure/math.nim Co-authored-by: Clyybber <darkmine956@gmail.com>
* strip minor improvement (#16444)flywind2020-12-231-0/+13
| | | | | | | * strip minor improvement * add more tests * Update tests/stdlib/tstrutils.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
* [backport => 1.0] fix #16428 vmops now works for generic procs (#16429)Timothee Cour2020-12-221-0/+4
| | | | | * fix #16428 vmops now works for generic procs * remove duplication
* O(1) concatenation of singly- and doubly linked lists. (#16362)Peter Salvi2020-12-201-1/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * O(1) concatenation of singly- and doubly linked lists. There is also new `toSinglyLinkedList` and `toDoublyLinkedList` functions for conversion from `openArray`s, similarly to `toHashSet` or `toTable`. * Add `sequtils` import to runnable examples with `toSeq`. * Added missing call to runnable examples. * Add .since annotation, changelog, and tests. * Rename `lists.concat` as an overload to `lists.append`. * Renamed `append` to `add` in lists. * Remove faulty `add` for `DoublyLinkedList`s. * Improved tests for lists. * `lists.add` moves the second list; added `lists.copy` for shallow copy. * More tests for `lists.add` and `lists.copy`. * More compact tests for lists with templates. * List concatenation with copying (`add`) and moving (tentatively `addMove`) * Renamed `addMove` to `addMoved`; renamed arguments according to the style guide. * Added extended example to `lists.copy`. * Corrected .since annotations to 1.6 * Add .since annotation, changelog, and tests. * Rename `lists.concat` as an overload to `lists.append`. * Renamed `append` to `add` in lists. * Remove faulty `add` for `DoublyLinkedList`s. * `lists.add` moves the second list; added `lists.copy` for shallow copy. * More tests for `lists.add` and `lists.copy`. * List concatenation with copying (`add`) and moving (tentatively `addMove`) * Renamed `addMove` to `addMoved`; renamed arguments according to the style guide. * Since declarations changed to (1,5,1). * Add .since annotation, changelog, and tests. * Rename `lists.concat` as an overload to `lists.append`. * Renamed `append` to `add` in lists. * Remove faulty `add` for `DoublyLinkedList`s. * `lists.add` moves the second list; added `lists.copy` for shallow copy. * More tests for `lists.add` and `lists.copy`. * List concatenation with copying (`add`) and moving (tentatively `addMove`) * Renamed `addMove` to `addMoved`; renamed arguments according to the style guide. * Changelog update. * Fix rebasing errors. * Self-adding with `lists.addMove` results in a cycle now. Added some extra tests.
* RST enumlist followup (#16382)Andrey Makarov2020-12-191-3/+39
| | | | | * fix matching of enumerator #) * RST: markdown list with auto-enumerator `1`
* active windows tests and use doAssert (#16395)flywind2020-12-181-11/+10
|
* fix cmpIgnoreStyle bug (#16392)flywind2020-12-181-0/+11
|
* Make 'echo' raise IOErrors when appropriate (#16367)Matt Haggard2020-12-181-0/+11
| | | | | | | | | | | | | | | * Make 'echo' raise IOError when fwrite/fflush fail * Fix fwrite return value comparison * Add test for echo raising error and don't fail to release locks in echo * Fix exitcode expectation * Make 'echo' raise IOError on Windows if it fails * Add nimLegacyEchoNoRaise for prior no-IOError echo behavior * Use checkErrMaybe template
* fixes #16365 [backport] (#16381)Andreas Rumpf2020-12-171-1/+31
|
* use hexchar in stdlib (#16290)flywind2020-12-171-0/+27
|
* refactorings to prepare the compiler for IC (#15935)Andreas Rumpf2020-12-173-0/+14
| | | | | | | | | | | | | | * added ic specific Nim code; WIP * make the symbol import mechanism lazy; WIP * ensure that modules can be imported multiple times * ambiguity checking * handle converters and TR macros properly * make 'enum' test category green again * special logic for semi-pure enums * makes nimsuggest tests green again * fixes nimdata * makes nimpy green again * makes more important packages work
* improve tstrutils: test c, cpp, js, vm; cleanups (#16357)Timothee Cour2020-12-152-676/+689
| | | | | | | * renamed: tests/stdlib/tstrutil.nim -> tests/stdlib/tstrutils.nim * improve test * enable tstrutils for js, vm
* Adds toSet to create sets from iterables (#16276)Jason Beetham2020-12-141-0/+14
|
* doc/rst2html: some few fixes for enumerated and bullet lists (#16295)Andrey Makarov2020-12-141-0/+138
| | | | | | | | | | | | * fix bullet/enumarated lists with many blank lines * fix enumerated list parsing * fix parse failure when next line after list empty * implement arbitrary start of enumerator * check that enumerators are in order * remove redundant start=x if x=1 or a * add some doc on implemented features * update start in rst_examples.rst * allow upper-case letters + more docs
* fix #16330 tshould_not_work (#16342)Timothee Cour2020-12-141-3/+1
|
* fix #16265; fix #13999 (HCR on OSX); cgen now does not line wrap string ↵Timothee Cour2020-12-141-2/+15
| | | | | | | | | | | | | | | | | litterals (#16329) * fix #16265: cgen now does not line wrap string litterals which, in combination with other hacks, caused a really obscure looking bug * fix #13999; nimhcr_integration.nim now works for osx * try to make appveyor CI disappear * disable openbsd + add diagnostic for openbsd * enable for openbsd * PTEMP * re-disable openbsd
* testament: error instead of silently ignore invalid targets; remove ↵Timothee Cour2020-12-1422-22/+21
| | | | | | | | | | | pointless alias target vs targets; document matrix; DRY (#16343) * testament: error instead of silently ignore invalid targets * s/target/targets/ * fix test; refs #16344 * address comments * Update testament/specs.nim Co-authored-by: Andreas Rumpf <rumpf_a@web.de>