Files
Nim/tests/assert/panicoverride.nim
ringabout ebd1c678be 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
2022-12-29 14:15:08 -05:00

15 lines
321 B
Nim

# 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.}