Report a bug If you spot a problem with this page, click here to create a Bugzilla issue. Improve this page Quickly fork, edit online, and submit a pull request for this page. Requires a signed-in GitHub account. This works well for small changes. If you'd like to make larger changes you may want to consider using local clone.

std.experimental.testing.runner

This module implements functions to run the unittests with command-line options.
template runTestsMixin(MODULES...)
Runs all tests in passed-in modules. Modules can be symbols or strings. Generates a main function and substitutes the default D runtime unittest runner. This mixin should be used instead of runTests if Phobos is linked as a shared library.
int runTests(MODULES...)(string[] args);
Runs all tests in passed-in modules. Modules can be symbols or strings. Arguments are taken from the command-line. -s Can be passed to run in single-threaded mode. The rest of argv is considered to be test names to be run.
Parameters:
string[] args Arguments passed to main.
Returns:
An integer suitable for the program's return code.
int runTests(string[] args, in TestData[] testData);
Runs all tests in passed-in testData. Arguments are taken from the command-line. -s Can be passed to run in single-threaded mode. The rest of argv is considered to be test names to be run.
Parameters:
string[] args Arguments passed to main.
TestData[] testData Data about the tests to run.
Returns:
An integer suitable for the program's return code.