summary refs log tree commit diff stats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* [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>
* add testcase for #15937 (#15933)Bung2020-12-131-0/+6
| | | | | | | | | | | | | * test for issue #15624 and PR #15915 for patch #13823 * Update thashes.nim no need mention PR #15915, fixed in https://github.com/nim-lang/Nim/pull/15937 * rebase to devel(issue maybe fixed), ignore ouputs * Apply suggestions from code review Co-authored-by: flywind <43030857+xflywind@users.noreply.github.com>
* Added strscans.scanTuple (#16300)Jason Beetham2020-12-121-0/+51
| | | | * Added since and changelog
* improve tests for collections (#16328)Timothee Cour2020-12-125-179/+182
| | | | | | | * improve tests for collections * remove remaining code blocks in deques.nim * improve runnableExamples
* add math.isNaN (#16179)Timothee Cour2020-12-111-5/+26
| | | | | | | * add math.isNaN * isNaN now works with --passc:-ffast-math; tests * Update lib/pure/math.nim Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* fix partially #13115 (now works for cpp; but still fails for js on openbsd) ↵Timothee Cour2020-12-111-10/+36
| | | | | | (#16167) * fix partially #13115 properly (works for c,js,cpp,vm; still fails for js on openbsd) * address comment: also test with -d:danger, -d:debug
* enable tests for random (#16297)flywind2020-12-101-34/+41
|
* unittest: use defines instead of env vars (#16165)Timothee Cour2020-12-104-19/+6
| | | | | | | | | * unittest: use defines instead of env vars * use defines in testament * fixup Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* fix #16150 improve type mismatch errors (#16152)Timothee Cour2020-12-091-0/+1
| | | | | | | * fix #16150 improve type mismatch errors * allow -d:nimLegacyTypeMismatch * address comment
* rationals.nim: Use `func` everywhere (#16302)ee72020-12-091-0/+1
|
* sequtils.nim: Use `func` (#16293)ee72020-12-091-0/+1
| | | | | | | | | * sequtils.nim: proc -> func * sequtils.nim: proc -> func in links * sequtils.nim: proc -> func in non-link doc comments * test: add `sequtils` to strictFuncs test
* complex.nim: Use `func` everywhere (#16294)ee72020-12-091-0/+1
|
* Added Python to highlite module. (#16286)Xabier Bello2020-12-081-4/+20
| | | | | | | | | | | * Added Python to highlite module. * Added the keywords for Python * Refactored the 'pythonLikeNextToken' into 'nimNextToken': - `lang` property added to GeneralTokenizer object, is set in `getNextToken`. - `nimNextToken` accepts `keywords` parameter, used for languages different from Nim. - Multiline comment available only for `langNim`.
* math.nim: Use `func` everywhere (#16285)ee72020-12-071-1/+9
| | | | | | | | | | | * math.nim: procs with {.noSideEffect} -> funcs * math.nim: procs without {.noSideEffect.} -> funcs * math.nim: proc -> func in links * math.nim: proc -> func in doc comments * test: add `math` to strictFuncs test
* strutils.nim: Use `func` everywhere (#16281)ee72020-12-072-5/+5
| | | | | | | | | | | | | * strutils.nim: procs with {.noSideEffect.} -> func * strutils.nim: procs without {.noSideEffect.} -> func * strutils.nim: proc -> func for links * strutils.nim: proc -> func in doc comments * test: add strutils to strictFuncs test * test: proc -> func in errmsg test
* fix #16206 (#16207)flywind2020-12-061-17/+72
| | | | * better docs and tests * a bit better only clean trailing whitespace
* ORC: make the adaptive strategy the default in order to fight memory ↵Andreas Rumpf2020-12-052-1/+39
| | | | | | | consumption (#16250) * ORC: make the adaptive strategy the default in order to fight memory consumption * added missing test case
* RST tables: fix latex col number; allow less than three of `=` (#16040)Andrey Makarov2020-12-041-4/+182
|
* cleanup docs and tests (#16235)flywind2020-12-031-9/+9
| | | | | * js module also uses runnableExamples * cleanup docs and tests
* add collect with infered init, refs #16078 fixes #14332 (#16089)Antonis Geralis2020-12-031-3/+19
| | | | * changelog * add testcase, fixes #14332
* add support for parsing chars in `scanf` macro (#16240)Miran2020-12-031-1/+18
|
* fixes #15939, fixes #15464, fixes #16169, fixes #16226 VM now supports ↵Timothee Cour2020-12-031-0/+66
| | | | | | | | | `addr(mystring[ind])` (index + index assignment) (#15987) * fix #15939, fix #15464 VM now supports `addr(mystring[ind])` (index + index assignment), var char return etc * cleanups * cstring tests * add test for bug #15464 * improve test coverage
* Fixes #16219, `hasArgOfName` ignoring argument sets. (#16233)Aditya Siram2020-12-031-0/+9
| | | | | | | | | | | | | | | * Fixes #16219, `hasArgOfName` ignoring argument sets. * Fix test and simplify ident traversal. * Moved test into a block and removed some boilerplate. * Fix some argument formatting. * use ..< * Change the preceding line too Co-authored-by: Clyybber <darkmine956@gmail.com>
* merge two parsecfg tests into one (#16237)flywind2020-12-032-76/+77
| | | | | | | | | | | | * try to fix #16206 * merge two parsecfg tests into one * Revert "fix" This reverts commit 668bdec2c499cf9967abfb7aad24975a04b092eb. * Revert "try to fix #16206" This reverts commit c399cc2153190299c9cbb0ad83f6ce85a7bbbb89.
* styleCheck: Fix error for `sugar` and `std/with` (#16176)ee72020-12-021-1/+1
| | | | | | | | | | | | | | | | With this commit, we no longer see an error if we pass `--styleCheck:error` when compiling a file that contains `import sugar` or `import std/with`. The problem was that those modules (and only those modules) import `std/private/underscored_calls`, which contained a styleCheck issue: its spelling of `nnkArgList` didn't match the `nnkArglist` spelling in `macros.nim`. This commit fixes the issue by renaming `nnkArgList` to `nnkArglist` repo-wide. The other way around would be a breaking change for code that used `nnkArglist` and `--styleCheck:error`. Fixes: #16174
* fixed article duplication typos (#16216)ihlec2020-12-022-2/+2
|
* add test for --eval; fix a minor bug (#16224)Timothee Cour2020-12-011-0/+6
|
* nimout now consistently uses nimoutCheck (#16189)Timothee Cour2020-12-012-8/+14
|
* error instead of echo when testament category is empty; fix realtimeGC (#16162)Timothee Cour2020-12-016-46/+29
|
* better addInt (#16160)flywind2020-12-011-0/+46
| | | | | | * better addint * Update lib/system/strmantle.nim Co-authored-by: Juan Carlos <juancarlospaco@gmail.com>
* fix broken => for typed procs with pragmas (#16190)hlaaftana2020-12-011-0/+13
| | | | | | | * fix broken => for typed procs with pragmas * add more sugar tests * add ending quote
* Revert "fix #16185 (#16195)" (#16197)Andreas Rumpf2020-11-301-50/+1
| | | This reverts commit bb4b27a2ca414f06fbb9d14ff76fa02a088ac141.
* fix #16185 (#16195)cooldome2020-11-301-1/+50
| | | | | | | | | | | * fix #16185 * fix test * fix comment * fix comment * better approach
* cleanup old codes (#16173)flywind2020-11-301-9/+2
|
* testament spec: remove errmsg alias of errormsg (#16188)Timothee Cour2020-11-2912-12/+12
|
* testament: error instead of silently overwrite a spec (#16166)Timothee Cour2020-11-293-19/+36
|