programMain is now active only in the main module
This commit is contained in:
parent
aa6e5216f4
commit
1f66448152
|
@ -13,10 +13,9 @@ template tests*(body: untyped) =
|
||||||
when not compiles(payload()):
|
when not compiles(payload()):
|
||||||
payload()
|
payload()
|
||||||
|
|
||||||
template programMain*(body: untyped) =
|
template programMain*(body: untyped) {.dirty.} =
|
||||||
proc main =
|
proc main =
|
||||||
body
|
body
|
||||||
|
|
||||||
when not defined(testutils_test_build):
|
when isMainModule and not defined(testutils_test_build):
|
||||||
main()
|
main()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue