From 326e3ad09de975de93c2653eae555ae1456720a8 Mon Sep 17 00:00:00 2001 From: narimiran Date: Wed, 26 Jun 2019 11:10:40 +0200 Subject: [bugfix] fix #11588, don't check if SharedTable is initialized --- tests/stdlib/tsharedtable.nim | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 tests/stdlib/tsharedtable.nim (limited to 'tests/stdlib/tsharedtable.nim') 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 -- cgit 1.4.1-2-gfad0