Unit tests within nested classes are ignored
Hi,
thanks for the great library. I just realized it seems to ignore unittest blocks within nested classes. For example, one would expect this to fail:
class Foo
{
static class Bar
{
@("silly-issue")
pure @safe unittest
{
assert(false);
}
}
class Baz
{
@("silly-issue")
pure @safe unittest
{
assert(false);
}
}
}
But neither of those tests is run by silly. When removing silly from the project dependency list to use the default dmd test compilation, those tests do fail indeed.
This is not a deal breaker I suppose, since I can just move the unittest blocks up one level so that they are directly nested within Foo
and they will run, but:
- They will require extra string annotation to know exactly which is which
- The user must be aware of this issue and not simply think everything is ok because "the tests do not fail". Which I believe is relatively likely and thus dangerous.
Can something be done about it?
Thanks in advance, Héctor