Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
nitely committed Dec 21, 2024
1 parent 5e6ff58 commit 7b53901
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions tests/async/t23212.nim
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
discard """
cmd: '''nim c --mm:arc -d:nimAllocStats $file'''
output: '''1000
(allocCount: 9010, deallocCount: 9004)'''
valgrind: true
cmd: '''nim c --mm:arc -d:nimAllocStats -d:useMalloc $file'''
output: '''1000'''
"""

import std/asyncdispatch
Expand All @@ -20,4 +20,9 @@ for _ in 0..<1000:
while hasPendingOperations(): poll()

echo count
echo getAllocStats()

setGlobalDispatcher(nil)

import std/importutils
privateAccess(AllocStats)
doAssert getAllocStats().allocCount - getAllocStats().deallocCount < 10

0 comments on commit 7b53901

Please sign in to comment.