mirror of
https://github.com/dlang/phobos.git
synced 2025-04-26 21:22:20 +03:00
Add sumtype to Phobos (#7702)
Add sumtype to Phobos merged-on-behalf-of: unknown
This commit is contained in:
parent
cb3f5e29ab
commit
51a70ee267
9 changed files with 2558 additions and 7 deletions
30
test/betterc_module_tests.d
Normal file
30
test/betterc_module_tests.d
Normal file
|
@ -0,0 +1,30 @@
|
|||
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;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue