mirror of
https://github.com/dlang/phobos.git
synced 2025-04-26 05:00:35 +03:00
30 lines
518 B
D
30 lines
518 B
D
static immutable bettercModules = [
|
|
"std.sumtype"
|
|
];
|
|
|
|
template from(string modname)
|
|
{
|
|
mixin("import from = ", modname, ";");
|
|
}
|
|
|
|
void testModule(string modname)()
|
|
{
|
|
import core.stdc.stdio : printf;
|
|
|
|
printf("Running BetterC tests for %.*s\n", cast(int) modname.length, modname.ptr);
|
|
|
|
static foreach (test; __traits(getUnitTests, from!modname))
|
|
{
|
|
test();
|
|
}
|
|
}
|
|
|
|
extern(C) int main()
|
|
{
|
|
static foreach (modname; bettercModules)
|
|
{
|
|
testModule!modname;
|
|
}
|
|
|
|
return 0;
|
|
}
|