https://issues.dlang.org/show_bug.cgi?id=14789
Issue ID: 14789
Summary: Runtime test reflection is broken
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: regression
Priority: P1
Component: druntime
Assignee: [email protected]
Reporter: [email protected]
// wat.d
import core.runtime;
import std.stdio;
unittest
{
writeln("in test");
assert(false);
}
bool dummyUnitTestRunner()
{
foreach ( m; ModuleInfo )
{
if (m.unitTest !is null)
{
writefln("running tests for %s", m.name);
m.unitTest();
}
}
return true;
}
static this ( )
{
Runtime.moduleUnitTester(&dummyUnitTestRunner);
}
// output:
// running tests for wat
--