mirror of
https://github.com/status-im/nim-libp2p.git
synced 2025-01-10 13:06:09 +00:00
ac4e060e1a
* adding raises defect across the codebase * use unittest2 * add windows deps caching * update mingw link * die on failed peerinfo initialization * use result.expect instead of get * use expect more consistently and rework inits * use expect more consistently * throw on missing public key * remove unused closure annotation * merge master
25 lines
436 B
Nim
25 lines
436 B
Nim
import unittest2
|
|
|
|
export unittest2
|
|
|
|
template asyncTeardown*(body: untyped): untyped =
|
|
teardown:
|
|
waitFor((
|
|
proc() {.async, gcsafe.} =
|
|
body
|
|
)())
|
|
|
|
template asyncSetup*(body: untyped): untyped =
|
|
setup:
|
|
waitFor((
|
|
proc() {.async, gcsafe.} =
|
|
body
|
|
)())
|
|
|
|
template asyncTest*(name: string, body: untyped): untyped =
|
|
test name:
|
|
waitFor((
|
|
proc() {.async, gcsafe.} =
|
|
body
|
|
)())
|