summary refs log tree commit diff stats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* mitigates #12815 (#18557)Andreas Rumpf2021-07-221-2/+15
| | | | | | | | | * mitigates #12815 * Update doc/nimc.rst Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
* fixes #12815 (#18554)Andreas Rumpf2021-07-221-0/+13
|
* fixes #18550 (#18553)Andreas Rumpf2021-07-211-1/+9
| | | | | * fixes #18550 * update the manual to reflect reality
* add testcase for #6499 #12229 #7172 (#18547)flywind2021-07-212-0/+40
|
* undo RFC #294, it breaks code for no good reason, the compiler can wa… ↵Andreas Rumpf2021-07-211-5/+3
| | | | | | | | | | | | | (#18546) * undo RFC #294, it breaks code for no good reason, the compiler can warn about the construct instead * Update changelog.md Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> * enable test case Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
* fixes #18469 (#18544)Andreas Rumpf2021-07-201-0/+44
| | | | | * fixes #18469 * Update compiler/injectdestructors.nim
* make -d:nimFpRoundtrips work consistently in vm vs rt, fix #18400, etc (#18531)Timothee Cour2021-07-206-42/+117
| | | | | | * compiler/vmhooks: add getVar to allow vmops with var params * addFloat vmops with var param * cgen now renders float32 literals in c backend using roundtrip float to string
* rst: add missing line/column info for some warnings (#18383)Andrey Makarov2021-07-202-56/+128
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * rst: add missing line/column info for some warnings * add workaround * use TLineInfo/FileIndex for storing file names * fix blank lines in include file (rm harmful strip) * don't use ref TLineInfo * return `hasToc` as output parameter for uniformity * 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> * address review - stylistic things * Update compiler/docgen.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * unify RST warnings/errors names * doAssert + minor name change * fix a bug caught by doAssert * apply strbasics.strip to final HTML/Latex * rm redundant filename * fix test after rebase * delete `order` from rnFootnoteRef, also display errors/warnings properly when footnote references are from different files * Update compiler/lineinfos.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * Update lib/packages/docutils/rstast.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * Update lib/packages/docutils/rstast.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * Update lib/packages/docutils/rstast.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * revert because of error: Error: cannot prove that it's safe to initialize 'info' with the runtime value for the discriminator 'kind' * Update lib/packages/docutils/rstgen.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * apply suggestion * Update lib/packages/docutils/rst.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * add Table for string->file name mapping * do not import compiler/lineinfos * fix ambiguous calls Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> Co-authored-by: narimiran <narimiran@disroot.org>
* close #18489 (#18524)flywind2021-07-191-0/+15
|
* fixed system.delete (#18507)Andreas Rumpf2021-07-181-4/+4
|
* deprecate strutils.delete and add an overload with saner semantics ↵Timothee Cour2021-07-181-1/+25
| | | | consistent with sequtils.delete; follows #18487 (#18510)
* Revert #17398 and #17402 (#18480)Miran2021-07-182-4/+4
| | | | | | | | | | | * Revert "followup #17398: `getTempDir`, `getConfigDir` now do not have trailing DirSep (#17402)" This reverts commit 2356d0603f70cad90f76fa57999054bf5c0a9157. * Revert "fix #17393 getHomeDir and expandTilde should not include trailing `/` (#17398)" This reverts commit bebf2ce24a43bef4cde5c90c4010631a1e4a7927. * fix test
* Make error message for empty new-styled concept more descriptive (#18506)konsumlamm2021-07-181-3/+2
| | | | | | | * Allow empty new-styled concept Slightly improve error messages * Make empty new-styled concepts an error
* fix nativeToUnixPath (#18501)Timothee Cour2021-07-171-0/+20
|
* make dragonbox opt-in via -d:nimFpRoundtrips (#18504)Andreas Rumpf2021-07-165-19/+27
| | | | | | | * make dragonbox opt-in via -d:nimFpRoundtrips * make tests green again * make tests green again
* deprecate cuchar, don't redefine it (#18505)Andreas Rumpf2021-07-161-4/+4
|
* Add changes required by Nimble lock file support (#12104)Ivan Bobev2021-07-152-24/+83
| | | | | | | | | | | | | | | | Implemented support for Nimble local cache with package directories with a checksum of the package at the end of their names. Now the compiler supports package paths in the form: * /path_to_nimble_cache_dir/pkgs/package_name-1.2.3- FEBADEAEA2345E777F0F6F8433F7F0A52EDD5D1B * /path_to_nimble_cache_dir/pkgs/package_name-#head- 042D4BE2B90ED0672E717D71850ABDB0A2D19CD2 * /path_to_nimble_cache_dir/pkgs/package_name-#branch-name- DBC1F902CB79946E990E38AF51F0BAD36ACFABD9 Related to nim-lang/nimble#127
* deprecate `sequtils.delete` and add an overload with saner semantics ↵Timothee Cour2021-07-151-44/+98
| | | | | | | | consistent with `system.delete` (#18487) * deprecate sequtils.delete and add an overload with saner semantics * AssertionDefect => IndexDefect * improve tsequtils * add tests; use splice in js for optimization
* Extended side effect error messages (#18418)quantimnot2021-07-151-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Extended side effect error messages * Applied feedback: - refactored `markSideEffect` - refactored string interpolations - single message - skip diagnostics in `system.compiles` context Other: - started a test of diagnostic messages [ci skip] Tests aren't updated yet because messaging isn't nailed down. * - Added hints of where for side effect call locations. - Tried to clarify the reasons. * fix tests * Applied PR review feedback: - moved collection of side effects from TSym to TContext - used pragma shorthand form `.sideEffect` and `.noSideEffect` in messages - added leading '>' to structured messages for readability - changed `sempass2.markSideEffect` to a proc - replaced `system.echo` in the test to make the test compatible with Windows * Applied NEP1 formatting suggestion Co-authored-by: quantimnot <quantimnot@users.noreply.github.com>
* added `nimAllocPagesViaMalloc` switch (#18490)Andreas Rumpf2021-07-151-1/+1
| | | | | * added switch * alloc.nim needs page aligned memory blocks
* fixes #17893 (#18485)Andreas Rumpf2021-07-131-0/+67
| | | * fixes #17893
* closes #18433 (#18484)Andreas Rumpf2021-07-131-0/+38
| | | | | * beneficial refactoring; use system.Endianness * closes #18433
* close #17986 add testcase (#18477)flywind2021-07-121-0/+12
|
* thamming_orc test created/destroyed counts match (#18471)GordonBGood2021-07-121-4/+4
| | | The thamming_orc.nim code now counts all created objects being tested, not just the ones following the "first 20" test, and the position of the `destroyed += 1` counter has been adjusted so it counts all the calls that are as a result of `=trace` tracing and not just the original destruction calls.
* ORC: support for custom =trace procs (#18459)Andreas Rumpf2021-07-091-0/+240
| | | | | | | | | | | * ORC: support custom =trace procs (WIP) * Update tests/arc/tcustomtrace.nim Co-authored-by: Clyybber <darkmine956@gmail.com> * =trace is now documented and seems to work * make test green Co-authored-by: Clyybber <darkmine956@gmail.com>
* rm redundant blank lines before literal blocks (#18465)Andrey Makarov2021-07-081-0/+16
|
* Revert "Make 'echo' raise IOErrors when appropriate (#16367)" (#18460)Miran2021-07-081-11/+0
| | | This reverts commit 23d23ecb081be6702d74024be8f96d92d9f88a59.
* improve `--declaredLocs` to help disambiguate types (generics, aliases etc) ↵Timothee Cour2021-07-083-4/+96
| | | | | | | | | (#18389) * improve --declaredlocs to help disambiguate types (generics, aliases etc) * avoid a cyclic deps * fix test after rebase
* Rename test variable due to unfortunate connotations (#18453)Aditya Siram2021-07-081-4/+4
|
* ORC: use =destroy instead of =dispose (#18440)Andreas Rumpf2021-07-071-0/+155
| | | | | | * ORC refactoring in preparation for further changes (=dispose must die) * ORC: embrace =destroy, avoid =dispose * ORC: no need for =dispose * closes #18421
* major improvements to `std/wrapnils`: optimal codegen, case objects, lvalue ↵Timothee Cour2021-07-071-74/+207
| | | | | | | semantics (#18435) * wrapnils now generates optimal code; also handles case objects * changelog * unsafeAddr => addr
* Make procedure mismatch more informative with pragma/call convention ↵Jason Beetham2021-07-061-0/+74
| | | | | | | | | | | | | | | | | | mismatches (#18384) * Added more concise calling convention/pragma mismatch messages * Now only adds callConvMsg/lock message when sensible * Fixed message formatting * Added tests, and fixed some bugs * Tests joined, and always indenting * More tests and more bug fixes * Fixed first test in tprocmismatch * Using var param for writting mismatches * Better logic for handling proc type rel and conv/pragma mismatch * Refactored getProcConvMismatch * Fixed callConv message formatting * Fixed test for proper message * Cleanup to address issues * getProcConvMismatch now returns tuple, and reformatted code
* deprecate std/mersenne (#18395)pyautogui2021-07-051-0/+1
| | | | | Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* fixes #18030 (#18415)Andreas Rumpf2021-07-011-0/+30
|
* don't use `{.rtl.}` for generics, otherwise `-d:useNimRtl` gives `ambiguous ↵Timothee Cour2021-07-011-3/+5
| | | | identifier` nimrtl error (#18406)
* fixes #18130 (#18407)Andreas Rumpf2021-07-011-16/+71
|
* Removed hard coded ports from thttpclient_standalone.nim. (#18374)Mark Pointing2021-06-301-23/+26
| | | | | | Co-authored-by: Dominik Picheta <dominikpicheta@googlemail.com> Co-authored-by: Mark Pointing <mark@futurepoint.com.au> Co-authored-by: Andreas Rumpf <rumpf_a@web.de> Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
* fixes #18400 (#18402)Andreas Rumpf2021-06-301-0/+6
|
* Fix #16426 (#18377)Clyybber2021-06-281-0/+15
|
* 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
|