Learn how to test your D exercises on Exercism
Each exercise supplies the unit tests. You provide the implementation. Each file will produce a console executable that runs the tests. Running the test executable prints messages for each failing test and reports a non-zero exit status when tests fail.
Note Your code is being tested against the test suite every time you build your project. If your code does not pass the one or more tests but is valid D code, it will still be compiled.
Working through each exercise is a process of:
dub test
dmd source/*.d -de -w -main -unittest
, then run the resulting binary.Note: D has support for unit testing direct in the language so usually the unit tests reside in the same file as the implementation. The unittests are run before the body of main and are enabled in the final executable by using the -unittest compiler switch.
@TODO add IDE related instructions.