fix #14475; unittest.require now works with nim c; require and check now 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
This commit is contained in:
parent
ffaf4797be
commit
e07d661d16
6 changed files with 55 additions and 13 deletions
|
|
@ -63,3 +63,25 @@ proc addExitProc*(cl: proc() {.noconv.}) =
|
|||
withLock gFunsLock:
|
||||
fun()
|
||||
gFuns.add Fun(kind: kNoconv, fun2: cl)
|
||||
|
||||
when not defined(nimscript):
|
||||
proc getProgramResult*(): int =
|
||||
when defined(js) and defined(nodejs):
|
||||
asm """
|
||||
`result` = process.exitCode;
|
||||
"""
|
||||
elif not defined(js):
|
||||
result = programResult
|
||||
else:
|
||||
doAssert false
|
||||
|
||||
proc setProgramResult*(a: int) =
|
||||
# pending https://github.com/nim-lang/Nim/issues/14674
|
||||
when defined(js) and defined(nodejs):
|
||||
asm """
|
||||
process.exitCode = `a`;
|
||||
"""
|
||||
elif not defined(js):
|
||||
programResult = a
|
||||
else:
|
||||
doAssert false
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue