diff options
author | flywind <43030857+xflywind@users.noreply.github.com> | 2020-12-28 07:13:21 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-28 14:13:21 +0100 |
commit | 6d442a40a6f89572052d61aeb73ec26d1f3451ce (patch) | |
tree | 6867049dcd37c9610f91e93058580d87b5ca8bb2 /tests/async/t12221.nim | |
parent | f9a15dbae909f4521cd506bedf7ec500c4f4d9f8 (diff) | |
download | Nim-6d442a40a6f89572052d61aeb73ec26d1f3451ce.tar.gz |
use doAssert in tests (#16486)
Diffstat (limited to 'tests/async/t12221.nim')
-rw-r--r-- | tests/async/t12221.nim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/async/t12221.nim b/tests/async/t12221.nim index 70e192356..e8bd9c11a 100644 --- a/tests/async/t12221.nim +++ b/tests/async/t12221.nim @@ -5,9 +5,9 @@ proc doubleSleep(hardSleep: int) {.async.} = sleep(hardSleep) template assertTime(target, timeTook: float): untyped {.dirty.} = - assert(timeTook*1000 > target - 1000, "Took too short, should've taken " & + doAssert(timeTook*1000 > target - 1000, "Took too short, should've taken " & $target & "ms, but took " & $(timeTook*1000) & "ms") - assert(timeTook*1000 < target + 1000, "Took too long, should've taken " & + doAssert(timeTook*1000 < target + 1000, "Took too long, should've taken " & $target & "ms, but took " & $(timeTook*1000) & "ms") var |