summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2012-08-22 22:54:53 +0200
committerAraq <rumpf_a@web.de>2012-08-22 22:54:53 +0200
commit5f0bbb911fc70f9e2787247c8abf99792edafdd0 (patch)
tree699f764b02231ee2d81d3f03c985cc9413664c6e
parentf8931798899647b65ebb7d7dcf28d6976da599ce (diff)
downloadNim-5f0bbb911fc70f9e2787247c8abf99792edafdd0.tar.gz
added ttables2 to gather data about issue #183
-rwxr-xr-xtests/run/ttables.nim2
-rw-r--r--tests/run/ttables2.nim21
2 files changed, 22 insertions, 1 deletions
diff --git a/tests/run/ttables.nim b/tests/run/ttables.nim
index b82badccb..3eb17a803 100755
--- a/tests/run/ttables.nim
+++ b/tests/run/ttables.nim
@@ -1,6 +1,6 @@
 discard """
   output: '''true'''
-  cmd: "nimrod cc --gc:none --hints:on $# $#"
+  cmd: "nimrod cc --hints:on $# $#"
 """
 
 import hashes, tables
diff --git a/tests/run/ttables2.nim b/tests/run/ttables2.nim
new file mode 100644
index 000000000..b88c8dfbf
--- /dev/null
+++ b/tests/run/ttables2.nim
@@ -0,0 +1,21 @@
+discard """
+  output: '''true'''
+  cmd: "nimrod cc --hints:on $# $#"
+"""
+
+import tables
+
+proc TestHashIntInt() =
+  var tab = initTable[int,int]()
+  for i in 1..1_000_000:
+    tab[i] = i
+  for i in 1..1_000_000:
+    var x = tab[i]
+    if x != i : echo "not found ", i
+
+proc run1() =         # occupied Memory stays constant, but
+  for i in 1 .. 50:   # aborts at run: 44 on win32 with 3.2GB with out of memory
+    TestHashIntInt()
+
+run1()
+echo "true"