Template allocation update and some tests

-test runner support before/after everty test callback funcion
-added some basic tests for template allocation
-added function to allocate new template from different template and list of addition and removed components
This commit is contained in:
Mergul 2020-04-09 22:14:51 +02:00
parent 8f5f2f3baf
commit 998240f7be
3 changed files with 243 additions and 3 deletions

View file

@ -130,6 +130,7 @@ struct TestRunner(Args...)
{
TestSuite* suite = &suites[i];
suite.name = module_.stringof;
static if(__traits(hasMember, module_, "beforeEveryTest"))module_.beforeEveryTest();
foreach (index, unittest_; __traits(getUnitTests, module_))
{
enum attributes = __traits(getAttributes, unittest_);
@ -161,6 +162,7 @@ struct TestRunner(Args...)
}
passed += suite.passed;
failed += suite.failed;
static if(__traits(hasMember, module_, "afterEveryTest"))module_.afterEveryTest();
}
}