summary refs log tree commit diff stats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* close #5540 generic object with generic field evaluated too early (#18062)Timothee Cour2021-05-231-0/+45
|
* docs: make inline markup more compatible with Markdown (#18053)Andrey Makarov2021-05-212-10/+67
| | | fixes https://github.com/timotheecour/Nim/issues/739
* config system: special case -d:release and -d:danger [backport:1.4] (#18051)Andreas Rumpf2021-05-202-2/+4
|
* asyncdispatch+stackTraceOverride: fix premature collection (#18039) ↵Ștefan Talpalaru2021-05-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | [backport:1.2] Copying StackTraceEntry instances when nimStackTraceOverride is defined breaks the link between a cstring field that's supposed to point at another string field in the same object. Sometimes, the original object is garbage collected, that memory region reused for storing other strings, so when the StackTraceEntry copy tries to use its cstring pointer to construct a traceback message, it accesses unrelated strings. This only happens for async tracebacks and this patch prevents that by making sure we only use the string fields when nimStackTraceOverride is defined. Async tracebacks also beautified slightly by getting rid of an extra line that was supposed to be commented out, along with the corresponding debugging output. There's also a micro-optimisation to avoid concatenating two strings just to get their combined length.
* ARC: fixes memory leaks with newSeq used in a loop [backport:1.4] (#18040)Andreas Rumpf2021-05-181-0/+13
| | | | * ARC: fixes memory leaks with newSeq used in a loop [backport:1.4] * Update tests/arc/tnewseq_legacy.nim
* jsonutils: add customization for toJson via `ToJsonOptions`; generalize ↵Timothee Cour2021-05-181-0/+13
| | | | | | | | | | | | | | | | | | | symbolName; add symbolRank (#18029) * jsonutils: add customization for toJson via `ToJsonOptions` * add enumutils.symbolRank * lookup table implementation for HoleyEnum * cleanup * changelog * fixup * Update lib/std/jsonutils.nim Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* follow-up #17930 - inline syntax highlighting (#18013)Andrey Makarov2021-05-161-0/+21
| | | | | * follow-up #17930 - inline syntax highlighting * make closure->nimcall
* fix #18007: std/json now serializes nan,inf,-inf as strings instead of ↵Timothee Cour2021-05-162-1/+43
| | | | | | | | | | | | | | | | | invalid json (#18026) * fix #18007: std/json now serializes nan,inf,-inf as raw strings instead of invalid json * fix roundtrip * fix tests * fix changelog * simplify * add runnableExamples * fix typo [skip ci]
* more informative error msg for undeclared field (`A(badfield: 1)` and ↵Timothee Cour2021-05-161-0/+40
| | | | `a.badfield = expr`) (#17777)
* Rework DFA traversal (#18016)Clyybber2021-05-161-0/+34
| | | | | | | | | * enable using dbg: without a context * Optimally joining first write/last read analysis * Add test for #18002 * potLastReads -> potentialLastReads
* RST opt.list to have priority over def.list (#17845)Andrey Makarov2021-05-151-0/+26
|
* Revert "fix #14873 properly by skipping `abi` field in importc type ↵Andreas Rumpf2021-05-151-17/+1
| | | | | (#17944)" (#17992) This reverts commit 98c29c01eb91a0c6ce7da09380a272eebe6bca6f.
* refs #18011 disable some newly failing tests on cpp windows; refs #17946 ↵Timothee Cour2021-05-144-4/+10
| | | | increase timeout for tchannels (#18012)
* jsonutils: handle holey enum as regular enum, via ord (#17995)Timothee Cour2021-05-111-3/+3
|
* jsonutils: support set (#17994)Timothee Cour2021-05-111-0/+6
|
* improve std/tempfiles (#17920)Timothee Cour2021-05-111-10/+42
| | | | | | | | * improve std/tempfiles * fixup * fix windows * improve test * improve runnableExamples and tests * address comment
* fix #17467 1st call to rand is now non-skewed; allow seed == 0 (#17468)Timothee Cour2021-05-111-4/+27
| | | | | | | | | | | | | | | * fix #17467 1st call to rand is now non-skewed; allow passing 0 as seed * changelog + fallback * document behavior for seed == 0 * address comments * _ * fix tests, disable kdtree * re-enable kdtree with -d:nimLegacyRandomInitRand
* make testament `isSuccess` more robust and allow tests with `--hints:off` to ↵Timothee Cour2021-05-112-4/+5
| | | | | | | | | succeed (#17968) * fix testament isSuccess * show givenSpec in addResult * simplify tstatictypes.nim
* Revert "Fix parseUri to sanitize urls containing ASCII newline or tab ↵Andreas Rumpf2021-05-091-12/+0
| | | | | (#17967)" (#17984) This reverts commit f4dd95f3bee14b69caec63c3be984c4a75f43c8a.
* close #9039: compiler does not hang anymore in 1 case involving static ↵Timothee Cour2021-05-091-0/+24
| | | | params and arrays (#17983)
* Fix parseUri to sanitize urls containing ASCII newline or tab (#17967)Beshr Kayali2021-05-091-0/+12
| | | | | | | | | | | | | | | | | | | * Fix parseUri to sanitize urls containing ASCII newline or tab * Fix ups based on review Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * Additional fix ups based on review - Avoid unnecessary `removeUnsafeBytesFromUri` call if parseUri is strict - Move some parseUri tests to uri module test file Co-authored-by: Dominik Picheta <dominikpicheta@googlemail.com> * Update changelog Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> Co-authored-by: Dominik Picheta <dominikpicheta@googlemail.com>
* fix #17960: honor `matrix` also for `action: compile, action: reject` (#17980)Timothee Cour2021-05-091-2/+2
| | | | * fix #17960: honor `matrix` for all action
* testament :show duration also for failed tests; improve `tshould_not_work`; ↵Timothee Cour2021-05-084-20/+52
| | | | | | | | | | | mitigate #17946 tchannels timeouts (#17947) * refs #17946; refactor testament test summary, show test duration for failures; increase timeout tchannels * revert workarounds from https://github.com/nim-lang/Nim/pull/16698 and add allowPrefixMatch optional param to greedyOrderedSubsetLines * add test * workaround for yet another testament bug
* ORC: cursor inference bugfix (#17973)Andreas Rumpf2021-05-081-1/+46
| | | | | * fixed a .cursor inference bug * added a test case
* add astmsgs; add `declared in` msg for usage lint errors (#17961)Timothee Cour2021-05-082-8/+9
| | | | | | | | | * add astmsgs; add `declared in` msg for usage lint errors * fix test * fix tests/tools/tlinter.nim * std prefix
* improve tbase64.nim (#17964)Timothee Cour2021-05-071-12/+6
|
* fix tests/vm/tcastint.nim which used non-sensical `when defined nimVM` (and ↵Timothee Cour2021-05-081-11/+21
| | | | contained wrong tests) (#17954)
* fix #17952: fix both false positives and false negatives for reInvalidSpec ↵Timothee Cour2021-05-084-31/+40
| | | | | | | | | (#17956) * fix #17952: fix both false positives and false negatives for reInvalidSpec * handle megatest properly * fix for tests/stdlib/tbase64.nim
* fix #14873 properly by skipping `abi` field in importc type (#17944)Timothee Cour2021-05-071-1/+17
| | | | | | | * fix #14873 properly by skipping `abi` field in importc type * add test * fix test for windows
* fixes #15848 [backport:1.2] (#17959)Andreas Rumpf2021-05-071-0/+23
|
* follow-up #17837: add `Console` for interactive sessions (#17930)Andrey Makarov2021-05-061-2/+15
| | | | | * follow-up #17837: add `Console` for interactive sessions * fix Latex
* fix https://github.com/timotheecour/Nim/issues/718: CompileTime is not ↵Timothee Cour2021-05-051-2/+5
| | | | cached apparently (#17940)
* add logging to help investigate why tests/vm/tconst.nim is flaky (#17934)Timothee Cour2021-05-041-1/+1
|
* highlite: fix #17890 - tokenize Nim escape seq-s (#17919)Andrey Makarov2021-05-031-0/+13
| | | | | | | | | * highlite: fix #17890 - tokenize Nim escape seq-s * Update tests/stdlib/thighlite.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
* close #16123 std/sets with closures in cpp (#17921)Timothee Cour2021-05-031-5/+13
| | | | | * close #16123 std/sets with closures in cpp * fixup
* typo: nonexistant => nonexistent (#17918)Timothee Cour2021-05-0210-25/+25
| | | | | * typo: nonexistant => nonexistent * fix test (ordering differs because of https://github.com/nim-lang/Nim/issues/17910)
* fix #17911 rawProc for cpp (#17912)Timothee Cour2021-05-012-4/+72
|
* system.nim cleanup some exported constants which should never have be… ↵Andreas Rumpf2021-05-011-1/+1
| | | | | | (#17909) * system.nim cleanup some exported constants which should never have been exported
* misc fixes: remove `forceConst` (obsolete by static), add more ↵Timothee Cour2021-05-013-43/+37
| | | | | | | | | | | | | runnableExamples to system (#17896) * misc fixes * add runnableExamples for compileOption * add runnableExamples for runnableExamples * move tconsteval => tconst * cleanup
* Fix nim-lang/nimforum#285 - punctuation after URL (#17908)Andrey Makarov2021-05-011-0/+50
| | | | | * Fix nim-lang/nimforum#285 - punctuation after URL * keep only one leaf in a rnStandaloneHyperlink * add more complex URL
* close #16646; `since` now works with bootstrap nim post csources_v1 (#17895)Timothee Cour2021-04-301-1/+1
| | | | | | | * revive #16627 now that csources_v1 was merged * use dedent in rst.nim, refs https://github.com/nim-lang/Nim/pull/17257#discussion_r589025683 * fix test and improve rendering of a rst warning
* Small parser loop fix (#17904)Clyybber2021-04-301-1/+4
| | | | * Fix loop on error with nim check in semiStmtList * Add test
* more strict RST inline markup parsing (#17827)Andrey Makarov2021-04-291-0/+161
| | | | | * more strict RST inline markup parsing * add test for unexpected bonus * introduce `roPreferMarkdown`
* improve tsets.nim, twrong_setconstr.nim and avoid name clashes with compiler ↵Timothee Cour2021-04-292-338/+63
| | | | | | | sets (#17876) * improve tests/sets/tsets.nim and avoid name clashes with compiler sets * avoid name clashes in twrong_setconstr.nim and merge into tsets
* fix #17853 (ascii message separator broke json nim dump) (#17887)Timothee Cour2021-04-292-2/+16
|
* [std/encodings]move to tests (#17866)flywind2021-04-291-0/+73
|
* Implement https://forum.nim-lang.org/t/7848#50018 (#17874)c-blake2021-04-291-1/+1
| | | | | | | | | | | | | | | | | | | | * Implement https://forum.nim-lang.org/t/7848#50018 with just the same `SuccessX` hint category, build mode on a separate, final line, and no change to how the mode is spelled for -d:release/-d:danger. * Change to add a new BuildMode hint category and keep testament in sync as per comment. * Add "--hint:buildmode:off" to `defaultHintsOff`. * Remove as requested. * As requested for tests clean up. * Address code review. * Address code review. * Mirror db456423116a9b19666f551f4d38aded3964c2e2
* Fix #17712 (#17873)Clyybber2021-04-271-0/+11
|
* testament: add `nimoutFull: bool` spec (#17867)Timothee Cour2021-04-272-2/+8
| | | | | | | | | | * testament: add `nimoutFull: bool` spec * PRTEMP * works * cleanup * add test for #12741 * PRTEMP failing test * remove unrelated changes * changelog
* [std/pegs] increase test coverage (#17871)flywind2021-04-271-4/+154
|