mirror of
https://github.com/waku-org/nwaku.git
synced 2025-01-15 17:35:45 +00:00
23 lines
360 B
Nim
23 lines
360 B
Nim
{.used.}
|
|
|
|
template tests*(body: untyped) =
|
|
template payload =
|
|
when not declared(unittest2):
|
|
import unittest2
|
|
|
|
body
|
|
|
|
when defined(testutils_test_build):
|
|
payload()
|
|
else:
|
|
when not compiles(payload()):
|
|
payload()
|
|
|
|
template programMain*(body: untyped) =
|
|
proc main =
|
|
body
|
|
|
|
when not defined(testutils_test_build):
|
|
main()
|
|
|