summary refs log tree commit diff stats
path: root/tests/js
Commit message (Collapse)AuthorAgeFilesLines
* avoid #8231, bitwise move to mul,div (#15070)Bung2020-08-251-0/+3
| | | | | | | | | * avoid #8231, bitwise move to mul,div * add test for #8231 * fix bitwise move when div result is float * bitwise move depends on typ.size
* fix #11354 jsgen not carefully handle genAddr with nkHiddenAddr,nkStm… ↵Bung2020-07-271-0/+20
| | | | | | | | | | | | | | | | | | | (#15078) * fix #11354 jsgen not carefully handle genAddr with nkHiddenAddr,nkStmtListExpr; genAsgn with lvalue tyVar and rvalue tyPtr * correct logic * add test for #11354 * handle nkHiddenAddr when n.len == 1 * Update compiler/jsgen.nim * Update compiler/jsgen.nim * Apply suggestions from code review Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* fix #14475; unittest.require now works with `nim c`; require and check now ↵Timothee Cour2020-07-141-0/+2
| | | | | | | | | | | | | works with -d:nodejs (#14676) * fix #14475; make unittest work with -d:nodejs * fixup * fixup * disable inim, delaunay which failed after unittest.require got fixed * re-enable tests that have been fixed
* fix #14576 addr of param (including for lent) now works with nim js (#14577)Timothee Cour2020-06-061-1/+61
| | | | | * fix #14576 addr(param) now works in nim js * workaround https://github.com/nim-lang/Nim/issues/14578
* Fix #14570 (#14571)Danil Yarantsev2020-06-061-0/+11
| | | | * Fix #14570
* fix #14350, cstrings in JS init as null (#14355)hlaaftana2020-05-152-3/+3
| | | | * fix #14350, cstrings in JS init as null
* fix js stacktraces, unify all file,line,col formatting into a single ↵Timothee Cour2020-05-051-4/+5
| | | | | function (#14230) * fix https://github.com/timotheecour/Nim/issues/135 ; unify all file,line,col formatting into a single function
* JS unittest stacktrace fix, cleanup js repr and inclrtl includes (#14168)hlaaftana2020-04-301-0/+22
|
* many bugfixes for js (#14158)hlaaftana2020-04-297-12/+134
| | | | | | | | | | | | | * many bugfixes for js fixes #12672, fixes #14153, closes #14123, closes #11331, fixes #11783, fixes #13966, fixes #14087, fixes #14117, closes #12256. mostly fixes the fact that it was allowed to assign to newly created temp variables. additionally attempts to get rid of null initialized seqs/strings (though they might pop up here and there); this simplifies a lot of things and makes code size smaller. even if null seqs/strings pop up here and there it's still better than all those bugs existing. * formatting fixes * CI fixes * more CI fixes
* Fix negative indexed arrays for JS, refs #13966 (#14152)hlaaftana2020-04-291-0/+6
| | | | | * Fix negative arrays for JS, refs #13966 * small extra fix: no need to .slice() cstring in JS
* Error -> Defect for defects (#13908)Jacek Sieka2020-04-282-3/+3
| | | | | | | | | | | | | | * Error -> Defect for defects The distinction between Error and Defect is subjective, context-dependent and somewhat arbitrary, so when looking at an exception, it's hard to guess what it is - this happens often when looking at a `raises` list _without_ opening the corresponding definition and digging through layers of inheritance. With the help of a little consistency in naming, it's at least possible to start disentangling the two error types and the standard lib can set a good example here.
* StringStream & more stdlib modules support for JS/NimScript (#14095)hlaaftana2020-04-283-0/+287
| | | | | * StringStream & more stdlib modules support for JS/NimScript * change back pegs test in line with #14134
* `$(a: float)` now works consistently in nim js, avoiding printing floats as ↵Timothee Cour2020-04-272-5/+68
| | | | | | | | | ints (#14134) * fix https://github.com/timotheecour/Nim/issues/133; $(a: float) works in nim js like in other backends * fix tests * fix test for windows that prints 1.1e17 differently than other OS
* fixes #14112, tests for #12892, #12671, #11697 (#14125)hlaaftana2020-04-262-0/+13
|
* Ref #14075 - enable two tests which seem to now be passing locally on ↵Euan2020-04-221-1/+0
| | | | FreeBSD. (#14076)
* fix #13222: make relativePath more robust and flexible (#13451)Timothee Cour2020-04-211-0/+14
| | | | | | | | | * * relativePath(foo) now works * relativePath(rel, abs) and relativePath(abs, rel) now work (fixes #13222) * relativePath, absolutePath, getCurrentDir now available in more targets (eg: vm, nodejs etc) * fix bug: isAbsolutePath now works with -d:js; add tests * workaround https://github.com/nim-lang/Nim/issues/13469 * remove `relativePath(path)` overload for now * add back changelog after rebase
* relativePath("foo", "foo") is now ".", not "" (#13452)Timothee Cour2020-02-221-0/+7
|
* style fix: change 'JS' to 'js' to make it consistent (#13168)Miran2020-01-161-1/+1
|
* fixes #9674 [backport] (#13143)Andreas Rumpf2020-01-141-1/+9
|
* fixes #13119 (#13128)Andreas Rumpf2020-01-141-2/+2
| | | | | * fixes #13119 * fixes a regression
* clean up deprecated stuff and unused imports in tests (#13059)Miran2020-01-073-9/+6
|
* #12103 - CI for FreeBSD (#12179)Euan2019-11-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | * Ref #12103 - adds FreeBSD CI * Fix getApplFreebsd - length of the string includes the null terminator byte, so minus 1 for result length * Show last commit in setup task. * Remove .git from repository URL * Don't include noisy details showing last commit. * Add FreeBSD build status badge * Fix #12182 - disable tconsole on FreeBSD * Disable tgetaddrinfo on FreebSD as getaddrinfo doesn't support the ICMP protocol. * Install boehm-gc-threaded * Use libgc-threaded.so on FreeBSD rather than libgc.so. * Simplify build failure handling. Update alt text for CI badge. * Disable test on FreeBSD * Simplify build config - use GNU make to build csources - set PATH variable using the environment key - remove modification of config to set CC as this is already set * Install git which seems to be missing from current freebsd images * Revert change to how path is set * Add a comment explaining why the length is truncated * Fix tconsole.
* fix in tests/js/tconsole (#12709)Arne Döring2019-11-251-3/+3
|
* Fix jsgen bug with uninitialized seq (#12500) [backport]Oscar Nihlgård2019-10-241-0/+20
|
* Sets need copying in JS (#11392)hlaaftana2019-10-021-0/+14
| | | | | | * Sets need copying in JS * Fixes #11353 * Add test for #11353
* importjs symbol (#12218)Arne Döring2019-09-202-11/+347
| | | | | * importjs symbol * importjs warning message, minor warning fixes
* close #11166 by adding a testnarimiran2019-07-251-0/+4
|
* JS codegen: supports toOpenArray [bugfix]Araq2019-07-121-1/+9
|
* implement system.default for the JS targetAndreas Rumpf2019-03-051-0/+14
|
* fixes 10697 [backport]Araq2019-02-191-2/+13
|
* fixes #10651Araq2019-02-142-10/+37
|
* Fixes 10202 (#10283)rec2019-01-121-10/+27
| | | | | | * Add a test case for #10202 * Fix asgn for object tyVars; fixes #10202 * Check the variant kind before accessing the sym field
* Guard against null exception (#10162)rec2019-01-041-0/+3
|
* Support undefined in isNil (#9960)Alexander Ivanov2018-12-301-0/+16
|
* Fixed insert for nil seq in js (#10068)Yuriy Glukhov2018-12-211-0/+32
|
* Make copies for params which are captured in closures. Fixes #7048 (#10050)rec2018-12-201-0/+44
| | | | | * Copy params which are captured in closures. Fixes #7048 * Forgot to emit a newline; minor adjustments to the test
* Fixes #10005recloser2018-12-151-0/+17
|
* lots of small changesArne Döring2018-12-111-1/+1
|
* fix js categoryArne Döring2018-12-111-1/+2
|
* Fix fat pointers, object copying, magic double evals on JS (#9411) [backport]rec2018-12-042-0/+489
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add a test for issue #9389 * Fixes #9389. * Make object contructors copy objects properly by checking whether the expressions passed to them don't need to be copied. * Make mArrToSeq implementation actually check if a copy needs to be made. * Avoid unnecessary copy in mChr impl * Assume set constructor elements need no copy * Add a test for issue #9410 * Add a test * fix passing fat pointers (#9410) * Enhance tests * More tests and fixes * Add more (failing) tests [ci skip] * Added equality operator for fat pointers, more tests and fixes * Fix printing uninitialized strings * Fix mInc, mDec double eval, add more tests * Tests * Refactored, fixed multiple evals, revamped the tests, added missing ops * Fix ups * Fix #9643 and #9644 * add pointer normalization
* Support only some types as JsAssoc types (#8627)Alexander Ivanov2018-11-231-12/+12
|
* Fix printing and comparing uninitialized stringsrecloser2018-10-213-9/+17
|
* Field checks for everybody (#8957)LemonBoy2018-10-092-0/+72
| | | | | | | | | | | | | | | | | | | | | * Field checks for JS backend * Clean nkCall nodes with no arguments Generating a nkEmpty in place of no arguments makes no sense form the AST point of view and also trips up the VM codegen. * Field checks for VM backend * Test case for #6612 This patchset fixes #6612 * Add test case for LHS double evaluation * Prevent LHS double-eval for JS backend * Prevent double evaluation in VM backend
* Try/Catch support for native JS exceptions (#8955)LemonBoy2018-10-091-0/+31
| | | | | | * Try/Catch support for native JS exceptions * Better tests
* Fix add(string, cstring) when the lhs is null (#8951)LemonBoy2018-09-121-0/+4
|
* Fix concat behaviour for uninitialized strings (#8950)LemonBoy2018-09-111-0/+5
|
* Fix insert/delete for JS (#8915)LemonBoy2018-09-081-0/+12
| | | Fixes #8914
* Fix AST generation for case statements (#8908)LemonBoy2018-09-071-0/+7
| | | Fixes #7534
* Sync line generation between C and JS backends (#8888)LemonBoy2018-09-071-0/+26
| | | Fixes #7224
* Automatic deref for everything but pointers in asm/emit (#8891)LemonBoy2018-09-073-5/+26
| | | Fixes #7249