Files
Nim/tests/vm/tslow_tables.nim
alaviss 83435fe696 tslow_tables: wait for an additional 2 seconds (#14266)
This test runtime tends to hover around the 5s mark depending on how
loaded the system currently is. This causes the test to fail a lot
during CI, per analytics:
https://dev.azure.com/nim-lang/Nim/_test/analytics?definitionId=1&contextType=build

Give the test an extra 2 seconds to account for unrelated overhead.
2020-05-07 22:07:08 +02:00

31 lines
415 B
Nim

discard """
timeout: "7"
action: "compile"
nimout: '''create
search
done'''
"""
# bug #12195
import tables
type Flop = object
a: array[128, int] # <-- compile time is proportional to array size
proc hop(): bool =
var v: Table[int, Flop]
echo "create"
for i in 1..1000:
v.add i, Flop()
echo "search"
for i in 1..1000:
discard contains(v, i)
echo "done"
const r {.used.} = hop()