use doAssert in tests (#16486)

This commit is contained in:
flywind 2020-12-28 07:13:21 -06:00 • committed by GitHub
commit 6d442a40a6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
78 changed files with 1056 additions and 1056 deletions

View file

@ -135,8 +135,8 @@ let
n = @["c", "b"]
q = @[("c", "2"), ("b", "1")]
assert n.sortedByIt(it) == @["b", "c"], "fine"
assert q.sortedByIt(it[0]) == @[("b", "1"), ("c", "2")], "fails under arc"
doAssert n.sortedByIt(it) == @["b", "c"], "fine"
doAssert q.sortedByIt(it[0]) == @[("b", "1"), ("c", "2")], "fails under arc"
#------------------------------------------------------------------------------

View file

@ -62,7 +62,7 @@ proc main =
let mem = getOccupiedMem()
main()
assert msgCount == swarmSize * messagesToSend
doAssert msgCount == swarmSize * messagesToSend
echo "result: ", msgCount
GC_fullCollect()
echo "memory: ", formatSize(getOccupiedMem() - mem)

View file

@ -84,5 +84,5 @@ proc main(): Future[void] =
for i in 0..9:
waitFor main()
GC_fullCollect()
assert getOccupiedMem() < 1024
doAssert getOccupiedMem() < 1024
echo "success"