Don't run non-test code when defined(testing)
This commit is contained in:
parent
d203d6fad4
commit
32109a7867
46 changed files with 104 additions and 82 deletions
|
|
@ -499,7 +499,7 @@ template withEvents*(surf: PSurface, event: expr, actions: stmt): stmt {.
|
|||
if sdl.init(sdl.INIT_VIDEO) < 0: raiseEGraphics()
|
||||
if sdl_ttf.init() < 0: raiseEGraphics()
|
||||
|
||||
when isMainModule:
|
||||
when not defined(testing) and isMainModule:
|
||||
var surf = newScreenSurface(800, 600)
|
||||
|
||||
surf.fillSurface(colWhite)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue