Advertisement
Guest User

Untitled

a guest
Sep 21st, 2014
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
D 0.24 KB | None | 0 0
  1. import std.stdio;
  2.  
  3. // This seems like silly boilerplate to have to write:
  4. version(unittest)
  5. {
  6.     // do-nothing main, so that I can run ONLY my unittests.
  7.     void main() {};
  8. }
  9. else
  10. {
  11.     void main() { myMain; }
  12. }
  13.  
  14.  
  15. void myMain()
  16. {
  17.   ...
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement