summary refs log tree commit diff stats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* dec inLoop after exiting the while scope in computeLiveRanges [backport] ↵flywind2022-06-291-0/+45
| | | | | | | (#19918) * dec inLoop after exiting the while scope in computeLiveRanges * add testcase
* closes #11042; add testcase (#19935)flywind2022-06-281-0/+55
| | | close #11042; add testcase
* Fix distinct requiresInit test and manual (#19901)Khaled Hammouda2022-06-221-3/+3
| | | fix distinct test and manual
* [vm]fixes #15974 #12551 #19464 #16020 #16780 #16613 #14553 #19909 #18641 ↵flywind2022-06-222-1/+245
| | | | | | | | | | | | | | | (#19902) [backport] * revert #12217 since the root problem seems to have been fixed; fix #15974;fix #12551; fix #19464 * fix #16020; fix #16780 * fix tests and #16613 * fix #14553 * fix #19909; skip skipRegisterAddr * fix #18641
* [semfold] fix #19199; properly fold uint to float conversion (#19890) [backport]flywind2022-06-131-0/+6
| | | fix #19199; properly fold float conversion
* test for #19046 (#19839)Bung2022-06-101-0/+19
| | | | | * test for #19046 * add threads flag
* [js] add testcase for array indexDefect and remove todo (#19838)flywind2022-06-101-0/+9
| | | | | | | | | * remove unused opcSubstr * [js] add testcase for array indexDefect * Revert "remove unused opcSubstr" This reverts commit cb461f2545234d62c1e0b83318f3e5495c97de52.
* fix #19862; make widestrs consistent between refc and orc (#19874) [backport]flywind2022-06-091-0/+13
| | | fix #19862; make widestrs consistent in refc and orc
* Fix `find` routines' api to default to `last=-1` (#19761)Zoom2022-06-071-17/+21
| | | | | | | | | | | | This changes the default for the `last` parameter of various `find` routines from `0` to `-1`. Previous default prevents limiting the search to the first character. This is a logic error, as full text search was performed for 2 *valid* values of `last`: `0` and `last.high()`. Adds an overload for `initSkipTable` which returns a newly initialized table. This encapsulates every single usage of a `var`-acting original func in this module. Co-authored-by: flywind <xzsflywind@gmail.com>
* RST: improve simple tables (#19859)Andrey Makarov2022-06-041-0/+229
| | | | | | | * RST: improve simple tables * nim 1.0 gotchas * Still allow legacy boundaries like `----`
* Stop type aliases from inheriting sfUsed (#19861)quantimnot2022-06-041-13/+40
| | | | | Fixes #18201 Co-authored-by: quantimnot <quantimnot@users.noreply.github.com>
* Refactor and doc package handling, module name mangling (#19821)quantimnot2022-05-307-1/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Refactor and doc package handling, module name mangling * Consolidate, de-duplicate and extend package handling * Alter how duplicate module names of a package are handled * Alter how module names are mangled * Fix crash when another package is named 'stdlib' (test case added) * Doc what defines a package in the manual Modules with duplicate names within a package used to be given 'fake' packages to resolve conflicts. That prevented the ability to discern if a module belonged to the current project package or a foreign package. They now have the proper package owner and the names are mangled in a consistent manner to prevent codegen clashes. All module names are now mangled the same. Stdlib was treated special before, but now it is same as any other package. This fixes a crash when a foreign package is named 'stdlib'. Module mangling is altered for both file paths and symbols used by the backends. Removed an unused module name to package mapping that may have been intended for IC. The mapping was removed because it wasn't being used and was complicating the issue of package modules with duplicate names not having the proper package owner assigned. * Fix some tests * Refactor `packagehandling` * Remove `packagehandling.withPackageName` and its uses * Move module path mangling from `packagehandling` to `modulepaths` * Move `options.toRodFile` to `ic` to break import cycle * Changed import style to match preferred style Co-authored-by: quantimnot <quantimnot@users.noreply.github.com>
* Zectbumo fixes 19824 (#19825)Alfred Morgan2022-05-301-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * borrowed `$` to make Time string friendly * added sep character parameter * Revert "added sep character parameter" This reverts commit 45f4b019a4883b6ba577ade1f94677266beb5960. * added sep character parameter * Revert "borrowed `$` to make Time string friendly" This reverts commit 10e2e44c9a04970f38cf66556635bdbb50b69136. * added uri tests and made changelong entry * Update lib/pure/uri.nim Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> * Update lib/pure/uri.nim Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> * Update tests/stdlib/turi.nim Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> * Update tests/stdlib/turi.nim Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
* Fix global destructor injection for JS backend (#19797)quantimnot2022-05-231-1/+2
| | | | | | | | | | | | | | * Fix global destructor injection for JS backend * Moved global destructors injection before the final call to transform and generate JS code. It had previously been after and thus not no JS was generated for them. * Added some internal documentation of `jsgen`. * Enable a current destructor test to cover the JS backend as well. * Fixes the JS aspect of #17237. * Fixed global destructor injection order for JS backend Co-authored-by: quantimnot <quantimnot@users.noreply.github.com>
* Add new self-signed 4096 bit certificate to testdata (#19758)kraptor2022-05-081-28/+77
| | | | | | | The test tasyncssl may fail on modern linux versions as they require at least 2048 bit certificates. A new certificate and private key with default values has been added to meet this new requirement.
* "ip" protocol as id 0 is long gone (#19760)kraptor2022-05-071-4/+0
| | | | | | | | | | | | | | | IANA is using id 0 for "HOPOPT" instead of "ip" for some time now and those systems that still support the old mapping will stop doing so at some point in the future. Some BSDs and openSUSE are already following this change as per IANA list here: https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml As new unixes (and maybe Windows, who knows) start to adopt the updated IANA list, this will keep failing from time to time, so it's better to remove the "ip" check altogether.
* Fix fixAbstractType for user defined typeclasses, fixes #19730 & #18409 (#19732)nc-x2022-04-302-0/+57
|
* fixes #18612; apply cache and memcmp for methods in arc/orc (#19749)flywind2022-04-267-2/+13
| | | | | | | | | | | | | | | | | * try using endsWith * use memcmp * add cache * cleanup * better * minor * fix * improve test coverage for methods with ARC
* fixes #19662; Indent level errored for first line (#19718)flywind2022-04-251-0/+6
|
* fix NimNode comment repr() regression [backport: 1.2] (#19726)flywind2022-04-251-0/+19
|
* Really fix StringStream with ARC at compile-time, improve streams test (#19739)Danil Yarantsev2022-04-251-2/+7
| | | | | * Fix compile-time StringStream with ARC * make readDataStr work with ARC, improve test
* fix #19435; don't create TypeBoundOps for tyOpenArray, tyVarargs [backport: ↵flywind2022-04-251-0/+29
| | | | | | | | | 1.6] (#19723) * fix #19435; openArray wronyly registers typebounds * add testcase * don't create TypeBoundOps for tyOpenArray, tyVarargs
* Fix string stream crashing when created on nimscript due to last fix (#19717)Jason Beetham2022-04-141-0/+4
|
* Better error message and tests for bad await (#19622)huantian2022-04-131-3/+32
| | | | | | | | | | | * Better error message and tests for bad await * Use compiles to check if await is valid * temp: disable windows noasync test * Better error report, simplify test Co-authored-by: flywind <xzsflywind@gmail.com>
* enable style:usages for stdlib tests [backport: 1.6] (#19715)flywind2022-04-1325-83/+86
| | | | | | | | | | | | | | | * enable style:usages for stdlib tests * freeAddrInfo * more tests * importc * bufSize * fix more * => parseSql and renderSql
* fix #19680; check if stderr is static (#19709)flywind2022-04-121-0/+10
|
* StringStreams no longer errors when intialized with literals on arc/orc (#19708)Jason Beetham2022-04-111-0/+2
|
* fix #17286 nim check -b:js works (#19704)flywind2022-04-091-0/+16
| | | | | * fix #17286 nim check -b:js works * fix
* fix stylecheck bug with nre (#19356)flywind2022-04-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stylecheck usages part two: stdlib cleanup typeinfo.nim: importCompilerProc => importcompilerproc nre.nim: newLineFlags => newlineFlags system.nim: JSRoot => JsRoot ref #19319 * prefer importCompilerProc * fix stylecheck error with asyncdispatch it is a partial regression since #12842 * add tests * don't use echo in tests * fix stylecheck bug with nre * Update compiler/linter.nim * no need to check dotexpr again * neither did let/var/const
* typetraits: add toSigned, toUnsigned (#18445)Timothee Cour2022-04-073-2/+31
| | | | | | | | * typetraits: add toSigned, toUnsigned * improve and add tests Co-authored-by: Andreas Rumpf <rumpf_a@web.de> Co-authored-by: flywind <xzsflywind@gmail.com>
* add testcase for #16462 (#19692)flywind2022-04-073-0/+11
|
* [backport] fix broken SSL tests (#19684)Miran2022-04-061-6/+5
| | | | | * [backport] fix broken SSL tests * remove a flaky one
* fix #18986; Import/except doesn't work on devel [backport: 1.6] (#19687)flywind2022-04-062-0/+13
| | | | | * fix #18986; Import/except doesn't work on devel [backport: 1.6] * add testcase
* Fix bug in freshVarForClosureIter. Fixes #18474 (#19675) [backport]flywind2022-04-041-0/+18
| | | | | | | | | | * Fix bug in freshVarForClosureIter. Fixes #18474. freshVarForClosureIter was returning non-fresh symbols sometimes. Fixed by making addField return the generated PSym. * remove discardable Co-authored-by: Nick Smallbone <nick@smallbone.se>
* fix #8219; nim check/dump shouldn't run single nimscript project [backport: ↵flywind2022-03-262-4/+7
| | | | | | 1.6] (#19641) * fix #8219; nim check/dump shouldn't run single nimscript project [backport: 1.6]
* fix nim check nimscript [backport: 1.6] (#19444)flywind2022-03-231-0/+11
| | | | fix #19440; fix #3858
* [add testcase] arc problems with recursive types (#19456)flywind2022-03-231-0/+87
| | | | | | | | | | | * [add testcase] arc problems with recursive types close #9650 * do test * expand * Update tests/arc/t9650.nim
* output byref types into --header file [backport: 1.6] (#19505)flywind2022-03-232-0/+16
| | | | | | | | | * output byref types into --header file fix #19445 * fix comments * set targets
* fixes #19631 (#19618)Andreas Rumpf2022-03-201-0/+31
| | | Aliasing is hard and we have to watch out not to compile 'x = f(x.a)' into 'f(x.a, addr x)'
* Removed deprecated httpcore func (#19550)Juan Carlos2022-03-181-4/+4
| | | | | | | | | * Remove Deprecated httpcore func * Remove Deprecated httpcore func * Fix a test with Deprecated func * Restart CI, Apple can code shit anymore I tell you
* support useVersion:1.6 (#19601)flywind2022-03-102-3/+51
|
* enable nimPreviewDotLikeOps (#19598)flywind2022-03-092-1/+1
|
* fixes #19575 (#19596) [backport]Andreas Rumpf2022-03-091-0/+23
| | | | | * fixes #19575 * better bugfix
* register callback for marshal in VM (#19578)flywind2022-03-081-6/+36
| | | | | | | | | | | | | * register callback for marshal in VM * remove unrelated code * polish * more tests * more tests * add loadVM and toVM
* fix #19266; allow reassign discriminant field (#19567)flywind2022-02-251-0/+22
| | | | | * add inUncheckedAssignSection * add one more test
* Allow std/macros.params to work with nnkProcTy (#19563)Tanguy2022-02-251-0/+22
| | | | | * Allow std/macros.params to work with nnkProcTy * Add tests for proc params & pragma
* [testcase] genSym fails to make unique identifier for ref object types (#19506)flywind2022-02-141-0/+60
| | | close #15118
* Remove deprecated math.c_frexp (#19518)Juan Carlos2022-02-141-6/+0
| | | | | | | * Remove Deprecated math proc * Remove Deprecated math proc * Remove Deprecated math proc
* use OrderedTable instead of OrderedTableRef for mimedb (#19522)David Krause2022-02-141-0/+2
| | | | | | | | | * use OrderedTable instead of OrderedTableRef for mimedb Signed-off-by: David Krause <enthus1ast@users.noreply.github.com> * added changelog entry for mimedb change Signed-off-by: David Krause <enthus1ast@users.noreply.github.com>
* fix #16458; make useNimRtl compile for --gc:orc (#19512)flywind2022-02-111-0/+6
| | | | | * fix #16458; make useNimRtl compile for --gc:orc/arc * fix tests