diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2019-02-19 23:32:41 +0100 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2019-02-19 23:32:41 +0100 |
commit | 7e404c670d5ff55f4316b2ae0a6749161c4bb47d (patch) | |
tree | e383753f428f2dee8a0d81a974e26832ecf796ec /tests | |
parent | 68ce92d4eb6143b8c49001f4782b74eb98027c77 (diff) | |
download | Nim-7e404c670d5ff55f4316b2ae0a6749161c4bb47d.tar.gz |
gc:destructors: add first test program
Diffstat (limited to 'tests')
-rw-r--r-- | tests/destructor/tgcdestructors.nim | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/destructor/tgcdestructors.nim b/tests/destructor/tgcdestructors.nim new file mode 100644 index 000000000..60d7fc14f --- /dev/null +++ b/tests/destructor/tgcdestructors.nim @@ -0,0 +1,17 @@ +discard """ + cmd: '''nim c --gc:destructors $file''' + output: '''1 1''' +""" + +import allocators +include system / ansi_c + +proc main = + var s: seq[string] = @[] + for i in 0..<80: s.add "foo" + +main() + +#echo s +let (a, d) = allocCounters() +cprintf("%ld %ld\n", a, d) |