diff options
author | Araq <rumpf_a@web.de> | 2019-04-02 10:42:58 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2019-04-02 10:43:11 +0200 |
commit | 0b96b135f8cecb761fb30a4d46e54ad5a00d1f69 (patch) | |
tree | 78e1b34f2747c5b63e9a8c134b749d2a35f25dbf /tests/destructor | |
parent | b7077905190ac27578ff0674674a71a569582c09 (diff) | |
download | Nim-0b96b135f8cecb761fb30a4d46e54ad5a00d1f69.tar.gz |
simple program works with --newruntime
Diffstat (limited to 'tests/destructor')
-rw-r--r-- | tests/destructor/tgcdestructors.nim | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/tests/destructor/tgcdestructors.nim b/tests/destructor/tgcdestructors.nim index daf1925ec..31631ac80 100644 --- a/tests/destructor/tgcdestructors.nim +++ b/tests/destructor/tgcdestructors.nim @@ -1,10 +1,9 @@ discard """ - disabled: true - cmd: '''nim c --gc:destructors $file''' + cmd: '''nim c --newruntime $file''' output: '''hi ho ha -7 7''' +1 1''' """ import allocators @@ -76,15 +75,16 @@ iterator interpolatedFragments*(s: string): tuple[kind: InterpolatedKind, break i = j -let input = "$test{} $this is ${an{ example}} " -let expected = @[(ikVar, "test"), (ikStr, "{} "), (ikVar, "this"), - (ikStr, " is "), (ikExpr, "an{ example}"), (ikStr, " ")] -var i = 0 -for s in interpolatedFragments(input): - doAssert s == expected[i] - inc i +when false: + let input = "$test{} $this is ${an{ example}} " + let expected = @[(ikVar, "test"), (ikStr, "{} "), (ikVar, "this"), + (ikStr, " is "), (ikExpr, "an{ example}"), (ikStr, " ")] + var i = 0 + for s in interpolatedFragments(input): + doAssert s == expected[i] + inc i #echo s let (a, d) = allocCounters() -cprintf("%ld %ld\n", a, d) +discard cprintf("%ld %ld\n", a, d) |