From 4077050a423973c9d713f67ebf73c94e83392e17 Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Mon, 5 Sep 2016 08:51:38 +0200 Subject: fixes a critical tables bug that caused 'enlarge' to crash after 'add' --- tests/collections/tableadds.nim | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 tests/collections/tableadds.nim (limited to 'tests/collections/tableadds.nim') diff --git a/tests/collections/tableadds.nim b/tests/collections/tableadds.nim new file mode 100644 index 000000000..71f1fad7d --- /dev/null +++ b/tests/collections/tableadds.nim @@ -0,0 +1,13 @@ +discard """ + output: '''done''' +""" + +import tables + +proc main = + var tab = newTable[string, string]() + for i in 0..1000: + tab.add "key", "value " & $i + +main() +echo "done" -- cgit 1.4.1-2-gfad0