summary refs log tree commit diff stats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* fix #16033 nim js --gc:arc works and ignores --gc:arc (#16036)Timothee Cour2020-11-181-0/+10
|
* ORC: prepare for another patent-pending optimization (#15996)Andreas Rumpf2020-11-181-1/+1
| | | | | | | | | | | | | | | | | * ORC: prepare for another patent-pending optimization * bugfix * '=copy' for refs can take a cyclic parameter for more ORC optimizations * ORC: exploit the common 'it = it.next' pattern * can't hurt to check for nil * use an algorithm that is not obviously broken * restore the test case * final cleanups for --gc:orc
* Semfold for nil cast (#16030)cooldome2020-11-181-3/+4
| | | | | | | | | * bring back the semfold of nil * remove space * fix test * proc type can't be dereferenced
* fix #6497 (#16027)flywind2020-11-181-0/+13
| | | | | * fix #6497 * add testcase for #16027
* combine PR#16009 and PR#16012 (#16024)flywind2020-11-181-0/+44
| | | | | | | | * fix #15623 * add testcase for #15623 * add testcase * combine #16009 * support casting nil to NilableTypes in VM
* fix #15972 (#15994)flywind2020-11-183-0/+32
| | | | | | | * fix #15972 * add testcase * more
* Revert "follow #16009 VM supports cast nil to ptr (#16012)"Andrey R (cooldome)2020-11-171-30/+0
| | | | This reverts commit fec19c980e36e62747eb119f0740cb785e858ac3.
* Revert "fix #15623 (#16009)"Andrey R (cooldome)2020-11-172-24/+0
| | | | This reverts commit 0f7f159a35bc10a43ff15bcb6c20eefdc574138e.
* fix #15623 (#16009)flywind2020-11-172-0/+24
| | | | | | | | | * fix #15623 * add testcase for #15623 * fix * add testcase
* follow #16009 VM supports cast nil to ptr (#16012)flywind2020-11-171-0/+30
| | | | | * follow #16009 VM supports cast nil to ptr * more testcase
* fix #15910 (#15984)cooldome2020-11-161-1/+65
| | | | | | | * fix #15910 * produce op of op is nil * Trigger build
* fix #15934 and #15620 (#15938) [backport:1.4]Andreas Rumpf2020-11-152-0/+31
|\ | | | | | | * make workaround for #15934 and #15620 * add testcase for #9754
| * minorflywind2020-11-131-0/+4
| |
| * add testcase for #9754flywind2020-11-131-0/+2
| |
| * add testcaseflywind2020-11-121-0/+25
| |
* | fixes #15753 [backport:1.4] (#15971)Andreas Rumpf2020-11-151-0/+33
| |
* | asynchttpserver cleanups [backport:1.0] (#15966)Andreas Rumpf2020-11-151-1/+1
| | | | | | | | * asynchttpserver cleanups [backport:1.0]
* | fix #12303 (#15964)flywind2020-11-142-0/+19
| |
* | targets: use cpp instead of c++ everywhere (was by far the most common) (#15961)Timothee Cour2020-11-143-3/+3
| |
* | strengthen taddr.nim: add test case for #14578; reference other issues; test ↵Timothee Cour2020-11-131-15/+13
| | | | | | | | cpp (#15960)
* | attempt to make asynchttpserver better; fixes #15925; [backport:1.0] (#15957)Andreas Rumpf2020-11-131-2/+2
|\ \ | | | | | | | | | | | | | | | | | | | | | * attempt to make asynchttpserver better; fixes #15925; [backport:1.0] * better documentation * fixes 'nim doc' * makes test green again * ported to FreeRTOS * fixes the doc rendering
| * | makes test green againAraq2020-11-131-2/+2
| | |
* | | Make IntSet a generic ordinal set OrdSet[A] (#15564)landerlo2020-11-132-65/+259
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Make IntSet an ordinal set OrdSet[A: Ordinal] Backward compatibility with IntSet is maintained. IntSet is an alias for OrdSet[int] * move ordsets to new file, intsets exports it * ordset, move to lib/std folder * Fix `$` for ordsets and test cleanup * Fix ordsets compilation in doc example * Rename ordsets to packedsets
* | | Fix #8404 JS backend doesn't handle float->int type conversion (#15950) ↵Bung2020-11-131-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [backport] * Fix #8404 JS backend doesn't handle float->int type conversion * handle conv to uint as cast, discard other cases * limit to int32, times use int64 * toInt including tyInt64 break times timezones lib, ignore for now * also affect to vm * move to tests/misc/t8404.nim
* | | close #13062(add testcase for #13062) (#15956)flywind2020-11-131-0/+27
| | |
* | | close #2771(add testcase for #2771) (#15932)flywind2020-11-131-0/+21
|/ /
* | fix #15941 (#15948)flywind2020-11-131-0/+17
| | | | | | | | | | | | | | * fix #15941 * add testcase * update
* | js -d:nodejs now supports osenv: `getEnv`, `putEnv`, `envPairs`, `delEnv`, ↵Timothee Cour2020-11-121-0/+26
| | | | | | | | | | | | | | | | | | | | | | `existsEnv` (v2) (#15826) * js -d:nodejs now supports osenv: `getEnv`, `putEnv`, `envPairs`, `delEnv`, `existsEnv` * refactor to osenv * fix for js (without -d:nodejs) + VM Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* | make var string return var char w/ BackwardsIndex (#15461)hlaaftana2020-11-121-0/+7
| | | | | | | | | | | | | | | | * make var string return var char w/ BackwardsIndex fixes #14497 * work around VM bug * properly workaround again
* | fix #15916 (#15917) [backport]flywind2020-11-121-0/+16
| | | | | | | | | | | | | | * fix #15916 * add testcase for #15916 * add comments
* | Fix #15909 (#15914)Fanael Linithien2020-11-121-0/+16
| |
* | doAssertRaises improvements; nimscript supports `except Exception as e` (#15765)Timothee Cour2020-11-121-0/+6
| | | | | | | | | | | | | | * doAssertRaises now correctly handles foreign exceptions; now shows which exception is raised on mismatch * nimscript now handles `Exception as e` * remove catch-all doAssertRaises overload from this PR Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* | fix #14157 (#15877)flywind2020-11-121-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | * fix #14157 * Update compiler/jsgen.nim * add changelog * Update compiler/jsgen.nim * Update tests/js/tmodify_cstring.nim Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* | fix #12726 Cannot take the compile-time sizeof Atomic types (#15928)Bung2020-11-121-0/+18
| | | | | | | | | | * fix #12726 Cannot take the compile-time sizeof Atomic types * fix for arch 32
* | Fix 14127 js from int to int casting (#15918)Bung2020-11-111-0/+30
| | | | | | | | | | | | | | | | | | * fix #14127 from int to int casting * add test for #14127 * use template for test, also test uint2int * move to tests/types/t14127_cast_number.nim targets:c cpp js
* | close #4318(add testcase for #4318) (#15904)flywind2020-11-111-0/+12
| | | | | | | | | | | | | | | | | | * close #4318(add testcase for #4318) * Update tests/objects/t4318.nim Co-authored-by: Juan Carlos <juancarlospaco@gmail.com> Co-authored-by: Juan Carlos <juancarlospaco@gmail.com>
* | Correct all eggs (#15906)Miran2020-11-105-5/+5
| | | | | | | | * "eg" is a misspelled "egg", "e.g." is "exempli gratia" * Also, "ie" is "i.e.".
* | rst: add support for markdown tables (#15854)Miran2020-11-101-0/+24
| | | | | | | | | | | | | | * rst: add support for markdown tables * change template into proc * don't create unnecessary `seq[string]`
* | follow #15874(add testcase for #15874) (#15893)flywind2020-11-101-0/+8
| |
* | fix #15825 (#15894)cooldome2020-11-091-0/+11
| | | | | | | | | | * fix #15825 * better fix
* | Fix 15629 (#15888)cooldome2020-11-091-2/+27
| | | | | | | | | | | | | | | | | | | | | | * fix #15858 * fix space * fix #15629 * Revert "fix space" * Revert "fix #15858"
* | Fix #15858 (#15887)cooldome2020-11-091-0/+8
| | | | | | | | | | | | * fix #15858 * fix space * fix #15629 * Revert "fix #15629"
* | fix #15707 (#15870)cooldome2020-11-091-0/+14
| |
* | fix #12558 (#15864)flywind2020-11-091-0/+15
| | | | | | | | * fix #12558 * Update compiler/pragmas.nim
* | Add a macro returning enum items count (#15824)Ivan Bobev2020-11-091-0/+40
| | | | | | | | | | | | | | Add a macro `enumLen` which is used to determine the number of items in an enumeration type to the `typetraits.nim` module. Also, add unit tests for it in the `ttypetraits.nim` module. Related to nimlang/Nim#15824
* | close #11637(add testcase for #11637) (#15879)flywind2020-11-081-0/+52
| | | | | | | | | | * close #11637(add testcase for #11637) * Update tests/vm/t11637.nim
* | Fix #15706 (#15846)Bung2020-11-071-0/+6
| | | | | | | | | | * fix #15706 Underflow not detected when using dec on distinct ranges * fix #15846 first, jsgen even doesn't care of range in this op
* | close #8558(add testcase for #8558) (#15872)flywind2020-11-071-0/+26
| |
* | Make `{.requiresInit.}` to work for distinct types (#15869)Ivan Bobev2020-11-061-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make `requiresInit` pragma to work for distinct types in addition to objects. Tagging of distinct types with `requiresInit` pragma was already supported, but its impact wasn't applied. Now its behavior when applied on distinct types is as follows. Given the following distinct type definitions: ```nim type DistinctObject {.requiresInit, borrow: `.`.} = distinct MyObject DistinctString {.requiresInit.} = distinct string ``` The following code blocks will fail to compile: ```nim var foo: DistinctFoo foo.x = "test" doAssert foo.x == "test" ``` ```nim var s: DistinctString s = "test" doAssert s == "test" ``` But these ones will compile successfully: ```nim let foo = DistinctFoo(Foo(x: "test")) doAssert foo.x == "test" ``` ```nim let s = "test" doAssert s == "test" ```
* | Closes #12897 (#15867)Clyybber2020-11-061-0/+9
| |