diff options
author | Araq <rumpf_a@web.de> | 2013-06-30 21:15:28 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2013-06-30 21:15:28 +0200 |
commit | 52851b722d072f1306d699cc245af033cf76519a (patch) | |
tree | 57e0c5e84b6af19ca1c7853be566f3831eedb756 /tests | |
parent | 651103ff320ef6f2a132be0a102749cefce725c9 (diff) | |
download | Nim-52851b722d072f1306d699cc245af033cf76519a.tar.gz |
--os:standalone works again
Diffstat (limited to 'tests')
-rw-r--r-- | tests/manyloc/standalone/barebone.nim | 4 | ||||
-rw-r--r-- | tests/manyloc/standalone/barebone.nimrod.cfg | 2 | ||||
-rw-r--r-- | tests/manyloc/standalone/panicoverride.nim | 19 |
3 files changed, 25 insertions, 0 deletions
diff --git a/tests/manyloc/standalone/barebone.nim b/tests/manyloc/standalone/barebone.nim new file mode 100644 index 000000000..118328d82 --- /dev/null +++ b/tests/manyloc/standalone/barebone.nim @@ -0,0 +1,4 @@ + +proc printf(frmt: cstring) {.varargs, header: "<stdio.h>", cdecl.} + +printf("hi %ld\n", 4777) diff --git a/tests/manyloc/standalone/barebone.nimrod.cfg b/tests/manyloc/standalone/barebone.nimrod.cfg new file mode 100644 index 000000000..52ec64e3f --- /dev/null +++ b/tests/manyloc/standalone/barebone.nimrod.cfg @@ -0,0 +1,2 @@ +--os:standalone +--deadCodeElim:on diff --git a/tests/manyloc/standalone/panicoverride.nim b/tests/manyloc/standalone/panicoverride.nim new file mode 100644 index 000000000..efd2b21f9 --- /dev/null +++ b/tests/manyloc/standalone/panicoverride.nim @@ -0,0 +1,19 @@ + +proc printf(frmt: cstring) {.varargs, importc, header: "<stdio.h>", cdecl.} +proc exit(code: int) {.importc, header: "<stdlib.h>", cdecl.} + +{.push stack_trace: off, profiler:off.} + +proc rawoutput(s: string) = + printf("%s\n", s) + +proc panic(s: string) = + rawoutput(s) + exit(1) + +# Alternatively we also could implement these 2 here: +# +# template sysFatal(exceptn: typeDesc, message: string) +# template sysFatal(exceptn: typeDesc, message, arg: string) + +{.pop.} |