mirror of
https://github.com/status-im/nim-codex.git
synced 2025-01-09 10:32:11 +00:00
fd3c566b25
* update asynctest to 0.5.0 Co-Authored-By: gmega <giuliano.mega@gmail.com> * update remaining package imports * add asynctest package wrapper --------- Co-authored-by: gmega <giuliano.mega@gmail.com>
29 lines
472 B
Nim
29 lines
472 B
Nim
import ./helpers
|
|
|
|
## Unit testing suite that calls checkTrackers in teardown to check for memory leaks using chronos trackers.
|
|
template checksuite*(name, body) =
|
|
suite name:
|
|
proc suiteProc =
|
|
multisetup()
|
|
|
|
teardown:
|
|
checkTrackers()
|
|
|
|
body
|
|
|
|
suiteProc()
|
|
|
|
template asyncchecksuite*(name, body) =
|
|
suite name:
|
|
proc suiteProc =
|
|
asyncmultisetup()
|
|
|
|
teardown:
|
|
checkTrackers()
|
|
|
|
body
|
|
|
|
suiteProc()
|
|
|
|
export helpers
|