summary refs log tree commit diff stats
path: root/tests/arc/tnewseq_legacy.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/arc/tnewseq_legacy.nim')
-rw-r--r--tests/arc/tnewseq_legacy.nim13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/arc/tnewseq_legacy.nim b/tests/arc/tnewseq_legacy.nim
new file mode 100644
index 000000000..4730d2c2b
--- /dev/null
+++ b/tests/arc/tnewseq_legacy.nim
@@ -0,0 +1,13 @@
+discard """
+  output: "(allocCount: 201, deallocCount: 201)"
+  cmd: "nim c --gc:orc -d:nimAllocStats $file"
+"""
+
+proc main(prefix: string) =
+  var c: seq[string]
+  for i in 0..<100:
+    newSeq(c, 100)
+    c[i] = prefix & $i
+
+main("abc")
+echo getAllocStats()