summary refs log tree commit diff stats
path: root/tests/stdlib/tsharedtable.nim
blob: 99d20e08a38cdb51856cc57e3f71a3402a94c399 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
discard """
cmd: "nim $target --threads:on $options $file"
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