summary refs log tree commit diff stats
path: root/tests/stdlib/tsharedtable.nim
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2019-06-26 23:11:34 +0200
committerGitHub <noreply@github.com>2019-06-26 23:11:34 +0200
commit48cbf1c4960848dac9b2f63e17c57a837a234163 (patch)
tree19631fb0faf70b0f2ad42e6cd7a572d43cfe277e /tests/stdlib/tsharedtable.nim
parentce2777af5a22f01196f409de0182d9ee4b40b6e1 (diff)
parent326e3ad09de975de93c2653eae555ae1456720a8 (diff)
downloadNim-48cbf1c4960848dac9b2f63e17c57a837a234163.tar.gz
Merge pull request #11598 from narimiran/fix-sharedtables
[bugfix] fix #11588, don't check if SharedTable is initialized
Diffstat (limited to 'tests/stdlib/tsharedtable.nim')
-rw-r--r--tests/stdlib/tsharedtable.nim14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/stdlib/tsharedtable.nim b/tests/stdlib/tsharedtable.nim
new file mode 100644
index 000000000..3269e7ee3
--- /dev/null
+++ b/tests/stdlib/tsharedtable.nim
@@ -0,0 +1,14 @@
+discard """
+output: '''
+'''
+"""
+
+import sharedtables
+
+var table: SharedTable[int, int]
+
+init(table)
+table[1] = 10
+assert table.mget(1) == 10
+assert table.mgetOrPut(3, 7) == 7
+assert table.mgetOrPut(3, 99) == 7