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.reflection

Compile-time reflection to find unittests and properties specified via UDAs.
alias TestFunction = void function();
Unit test function type.
struct TestData;
Unit test data
pure nothrow @safe TestData[] allTestData(MODULES...)();
Finds all unittest blocks in the given modules. Template parameters are module symbols or their string representation.
Examples:
import my.test.module;
auto testData = allTestData!(my.test.module, "other.test.module");
pure nothrow @safe TestData[] moduleTestData(alias module_)();
Finds all built-in unittest blocks in the given module.
Parameters:
module_ The module to reflect on. Can be a symbol or a string.
Returns:
An array of TestData structs