If -unittest flag is passed to the D compiler, it will run all unittest blocks. Often it is useful to let the compiler generate a stubbed main function. Using the compile & run wrapper rdmd, testing your D program gets as easy as:
rdmd -main -unittest yourcode.d
Of course you can also split ...