linkrope / dunit

xUnit Testing Framework for D
Boost Software License 1.0
37 stars 9 forks source link

Add default test suite argument #18

Closed andre2007 closed 6 years ago

andre2007 commented 6 years ago

This pull request allows to set the test suite name (currently fixed to dunit) via argument --defaultTestSuite.

In a later step, maybe it make sense to add a struct TestSuite which could be used as UDA on a class

struct TestSuite
{
string name;
}

Example usage:

@TestSuite("TestSuiteA")
class Test
{
    mixin UnitTest;

    @Test
    public void assertEqualsFailure() @safe pure
    {
        string expected = "bar";
        string actual = "baz";

        assertEquals(expected, actual);
    }