summary refs log tree commit diff stats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Simplify addInt, remove digits10 (#18356)Clyybber2021-06-281-23/+0
| | | | | | | | | | | | | * Simplify addInt, remove digits10 Co-authored-by: Charles Blake <charlechaud@gmail.com> * Fix bootstrapping * Add noInit to tmp array * noInit -> noinit Co-authored-by: Charles Blake <charlechaud@gmail.com>
* Peg captures get stack-like behavior (#18369)gemath2021-06-281-0/+28
| | | | | * Implements reverse capture indexing. * Now works for modified backrefs too. * Changed reverse indexing syntax prefix for back-references to '$^'.
* followup #18362: make `UnusedImport` work robustly (#18366)Timothee Cour2021-06-274-1/+154
| | | | * warnDuplicateModuleImport => hintDuplicateModuleImport * improve DuplicateModuleImport msg, add test
* rst: fix bug 20 from #17340 (#18360)Andrey Makarov2021-06-261-0/+47
| | | and a leftover bug: priority of option list inside definition list
* even lighter version of #17938: fix most issues with UnusedImport, ↵Timothee Cour2021-06-267-8/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | XDeclaredButNotUsed, etc; fix #17511, #17510, #14246 (without realModule) (#18362) * {.used: symbol} * add tests * fix tests with --import * --import works without giving spurious unused warnings * new warning warnDuplicateModuleImport for `import foo; import foo` * fix test, add resolveModuleAlias, use proper line info for module aliases * fix spurious warnings * fix deprecation msg for deprecated modules even with `import foo as bar` * disable a test for i386 pending sorting XDeclaredButNotUsed errors * UnusedImport now works with re-exported symbols * fix typo [skip ci] * ic support * add genPNode to allow writing PNode-based compiler code similarly to `genAst` * fix DuplicateModuleImport warning * adjust test * fixup * fixup * fixup * fix after rebase * fix for IC * keep the proc inline, move the const out * [skip ci] fix changelog * experiment: remove calls to resolveModuleAlias * followup * fixup * fix tests/modules/tselfimport.nim * workaround tests/deprecated/tmodule1.nim * fix properly * simplify
* docs now show nimExperimentalX APIs (#18345)Timothee Cour2021-06-251-0/+3
| | | | | * docs now show nimExperimentalX APIs * fix for windows
* fixes #18240 (#18354)Andreas Rumpf2021-06-251-0/+32
| | | | | * ORC: track escaping parameters properly * fixes #18240
* fixes #18287 (#18346)Andreas Rumpf2021-06-251-1/+50
|
* float parsing: Add test for a fixed issue (#18232)Kaushal Modi2021-06-241-11/+18
| | | | | Fixes https://github.com/nim-lang/Nim/issues/14407 . This issue was fixed by https://github.com/nim-lang/Nim/pull/18139.
* enable VM tracing in user code via `{.define(nimVmTrace).}` (#18244)Timothee Cour2021-06-241-0/+31
| | | | | | | * enable VM tracing in user code via `{.define(nimVmTrace).}` * add vmutils.vmTrace * add vmTrace
* rst: allow comment to continue on second line (#18338)Andrey Makarov2021-06-241-0/+66
|
* fix #18332: XDeclaredButNotUsed hints now in deterministic order (#18336)Timothee Cour2021-06-241-11/+13
|
* fixes #18326 (#18335)Andreas Rumpf2021-06-231-2/+7
| | | | | * fixes #18326 * make tests green again
* Add some tests (#18333)Antonis Geralis2021-06-231-2/+70
|
* Markdown: allow to end URL with balanced parenthesis (#18321)Andrey Makarov2021-06-231-0/+41
| | | | | | | | | | | | | * Markdown: allow to end URL with balanced parenthesis * Update lib/packages/docutils/rst.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * apply suggestion * remove unnecessary if Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
* followup #18318: simplify `dollarImpl` and add a test (#18330)Timothee Cour2021-06-221-0/+23
|
* fix #18327 (#18328)flywind2021-06-221-0/+5
|
* close #13196 now that we have dragonbox (#18316)Timothee Cour2021-06-212-0/+22
|
* fixes #17768 [backport:1.4] (#18317)flywind2021-06-211-1/+8
| | | | | * fixes #17768 [backport:1.4] * tiny
* fix #18310 system.== in vm for NimNode (#18313)Timothee Cour2021-06-211-0/+11
| | | | | | | * fix #18310 == in vm * fixup * fixup
* validate rst field for :number-lines:, :status: (#18304)Andrey Makarov2021-06-201-0/+12
|
* support `--hint:all:off --hint:x` (ditto with `--warnings` + friends) (#17852)Timothee Cour2021-06-201-6/+3
| | | | | * select all hints via `--hint:all:on|off`, etc * simplify code with setutils * address comment
* Raise IndexDefect when deleting element at out of bounds index (#17821)Heiko Nickerl2021-06-203-12/+33
| | | | | Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> Co-authored-by: Heiko Nickerl <mail@hnicke.de> Co-authored-by: Heiko Nickerl <heiko.nickerl@flipapp.de>
* move {.injectStmt.} to experimental; add a test (#18300)Timothee Cour2021-06-201-0/+48
| | | | | * move {.injectStmt.} to experimental; add a test * undocument and deprecat `.injectStmt` but keep its implementation until we have a replacement
* docgen: move to shared RST state (fix #16990) (#18256)Andrey Makarov2021-06-201-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * docgen: move to shared RST state (fix #16990) * Update lib/packages/docutils/rst.nim Co-authored-by: Andreas Rumpf <rumpf_a@web.de> * Update lib/packages/docutils/rst.nim Co-authored-by: Andreas Rumpf <rumpf_a@web.de> * Update lib/packages/docutils/rst.nim Co-authored-by: Andreas Rumpf <rumpf_a@web.de> * Update compiler/docgen.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * Update compiler/docgen.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * Update compiler/docgen.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * Update lib/packages/docutils/rst.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * rename `cmdDoc2` to `cmdDoc` * fix (P)RstSharedState convention * new style of initialization * misc suggestions * 1 more rename * fix a regression Co-authored-by: Andreas Rumpf <rumpf_a@web.de> Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
* make privateAccess work with generic types and generic instantiations; fix a ↵Timothee Cour2021-06-192-0/+71
| | | | | SIGSEGV (#18260) Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* add more APIs to compiler/debugutils; re-export it (#18243)Timothee Cour2021-06-181-0/+38
|
* followup #17876: remove annoying enum name clashes in tests/enum/tenum.nim ↵Timothee Cour2021-06-171-12/+11
| | | | (#18291)
* tests/exception/tsetexceptions.nim not joinable (#18264)Timothee Cour2021-06-171-0/+3
|
* Revert "system/excpt: check if the exception is not nil before pop (#18247)" ↵Andreas Rumpf2021-06-171-7/+0
| | | | | (#18265) This reverts commit 0adb47aa15e242983c8251d85367c0fe45fc5f12.
* Fix doubly typed forward declarations (#18279)Clyybber2021-06-161-1/+21
| | | | | | | | | * Add testcase * Fix testcase * Fix doubly typed forward decls * Better fix
* fixes #17696 (#18276)flywind2021-06-161-11/+42
|
* Don't report unused hints for consumed AST (#18270)Clyybber2021-06-161-0/+15
| | | | | | | | | * Fix #18203 * Add testcase * Fix testcase * Fix test
* add test case for pure enum redefinition error within enum (fixed in recent ↵Timothee Cour2021-06-151-7/+14
| | | | | | | | | | | | | PR) (#18266) * add test case for pure enum redefinition error within enum (fixed in recent PR) * remove code duplication * Revert "remove code duplication" (would require bootstrap >= 1.4) This reverts commit 3f793874c231f847ef015e37a5fd6851f85d9675. * fixup
* httpclient.nim Fixes #14794 and an issue where content-header is not set on ↵Mark Pointing2021-06-141-1/+32
| | | | | | | | | | | | | | | | postContent (#18208) * Fixed missing newline after bound marker in mulipart post (#14794) and a problem where calling postContent with multipart data does not set content-length header. * Update lib/pure/httpclient.nim * Added comment outlining the reason for changes to httpclient.nim and added tests to ensure that multipart post has a newline at the end of the body, and that the content-length header is present. * Fixed typo in comments. * Removed redundant blank lines in thttpclient_standalone.nim. Co-authored-by: Mark Pointing <mark@futurepoint.com.au> Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* Small scope refactoring (#18263)Clyybber2021-06-141-0/+12
| | | | | | | * Small scope refactoring * Add test for #10251 * Add inline where appropriate
* system/excpt: check if the exception is not nil before pop (#18247)alaviss2021-06-141-0/+7
| | | | | | | | | | In CPS we would consume an exception in the except branch by stashing it into a local then remove the exception from Nim environment so as not to leak it to other code that would be running before the continuation continues However since popCurrentException() assumes that the exception always exist, removing the exception from an except branch will cause a SIGSEGV to happen. This commit fixes that.
* fixes #18235 - proc annotation type macro sym leak (#18249)Saem Ghani2021-06-142-0/+60
| | | | | | | | | | | | | | | | | | | | | * fixes #18235 - proc annotation type macro sym leak - also fixed a typo - proc annotations guard symbol exports with shadow scopes - symbol handling is shadow scope aware * test for exporting an existing unexported sym this one is for my homie alaviss. * Special handling not needed in semProcAnnotation * Testcasing * [skip ci] clean-up and add some more comments * [skip ci] rm trailing whitespace Co-authored-by: Clyybber <darkmine956@gmail.com>
* merge BuildMode into SuccessX, remove code duplication w drnim, add useful ↵Timothee Cour2021-06-141-1/+1
| | | | | | | | | | | info to successx, add gc to compilesettings (#18252) * merge BuildMode into SuccessX, add more info * refactor duplicated with drnim * fixup * address comment
* followup #17777: declaredloc field error msgs now work with generics (#18259)Timothee Cour2021-06-141-15/+25
| | | | | | | * followup #17777: declaredloc field error msgs now work with generics * fix tests * cleanup
* fix #7717 roundtrip float to string; fix `parseFloat` for js (#18248)Timothee Cour2021-06-132-28/+84
| | | | | | | * refs #7717 roundtrip float to string * make parseFloat more correct * improve float tests * improve float tests * cleanup
* getType now works with tyInferred (arising from concepts); refs #18220 (#18241)Timothee Cour2021-06-121-22/+78
| | | | | | | * getType now works with tyInferred (concepts); refs #18220 * avoid cast * add more docs
* added a test case ensuring exception inference continues to workAraq2021-06-111-0/+32
|
* fix #9437(fix `re.replace` wrong behaviour) (#17546)flywind2021-06-101-3/+6
| | | | | * fix nim js cmp fails at CT * fix
* view types: spec changes (#18226)Andreas Rumpf2021-06-101-5/+4
| | | | | | | | | | | | | * view types: spec changes * Update doc/manual_experimental.rst Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> * Update doc/manual_experimental.rst Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
* #18216 make moveDir work across partitions on windows (#18223)Fröhlich A2021-06-101-0/+45
| | | | | | | * return false if AccessDeniedError in tryMoveFSObject - fixes #18216 * add moveDir & moveFile tests * rename `isMoveDir` parameter to `isDir`
* avoid re-exporting options from std/wrapnils (#18222)Timothee Cour2021-06-101-0/+1
|
* make strict funcs analysis smarter (#18219)Andreas Rumpf2021-06-092-0/+44
| | | | | | | * make strict funcs analysis smarter: varParam[i] = v is different from varParam[i][] = v * added a test case * Update compiler/varpartitions.nim Co-authored-by: Clyybber <darkmine956@gmail.com>
* change mimedb stroe stringtable to orderedtable (#18065)Bung2021-06-071-0/+1
| | | | | | | * change mimedb stroe stringtable to orderedtable * Update lib/pure/mimetypes.nim Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* macros.treeRepr + friends: collapse SymChoice (#18072)Timothee Cour2021-06-052-28/+114
| | | | | | | * macros.treeRepr + friends: collapse SymChoice * make repr+friends work with invalid symchoice nodes * address comment