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

Implementations of TestCase child classes.
abstract class TestCase;
Class from which other test cases derive
const pure nothrow @safe string name();
The name of the test case.
string[] opCall();
Executes the test.
Returns:
An array of failures
final string collectOutput();
Collect this test's output so as to not interleave with output from other tests.
Returns:
the output of running this test.
abstract void test();
Run the test case.
const pure nothrow @property @safe ulong numTestsRun();
The number of tests to run.
class FunctionTestCase: std.experimental.testing.testcase.TestCase;
A test case that is a simple function.
class ShouldFailTestCase: std.experimental.testing.testcase.TestCase;
A test case that should fail.
class CompositeTestCase: std.experimental.testing.testcase.TestCase;
A test case that contains other test cases.