fixes #21195; std/assertions continue to use sysFatal when nimPreviewSlimSystem is not defined (#21196)
* fixes #21195; `std/assertions` continue to use `sysFatal` * try includes * make `std/assertions` self-contained * fixes tests * fixes tests
This commit is contained in:
parent
705da9d452
commit
ebd1c678be
7 changed files with 63 additions and 30 deletions
15
tests/assert/panicoverride.nim
Normal file
15
tests/assert/panicoverride.nim
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
# panicoverride.nim
|
||||
|
||||
proc printf(fmt: cstring) {.varargs, importc, header:"stdio.h".}
|
||||
proc exit(code: cint) {.importc, header:"stdlib.h".}
|
||||
|
||||
{.push stack_trace: off, profiler:off.}
|
||||
|
||||
proc rawoutput(s: cstring) =
|
||||
printf("RAW: %s\n", s)
|
||||
|
||||
proc panic(s: cstring) {.noreturn.} =
|
||||
printf("PANIC: %s\n", s)
|
||||
exit(0)
|
||||
|
||||
{.pop.}
|
||||
Loading…
Add table
Add a link
Reference in a new issue