phobos/test/betterc_module_tests.d
Paul Backus 51a70ee267
Add sumtype to Phobos (#7702)
Add sumtype to Phobos
merged-on-behalf-of: unknown
2021-03-05 12:41:34 +01:00

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;
}