Unitests update

-unittest runner works for non betterC build
-working unittest coverage generation
-unittest runner support for named tests. Simple regex is supported (* as any substring) and two list of expressions are used, one for include regex and one for exclude regex
This commit is contained in:
Mergul 2020-04-14 13:41:39 +02:00
parent 998240f7be
commit 2aef76d75a
4 changed files with 201 additions and 33 deletions

View file

@ -48,6 +48,15 @@ struct CShort
short value = 12;
}
struct CUnregistered
{
mixin ECS.Component;
alias value this;
short value = 12;
}
void beforeEveryTest()
{
gEM.initialize(1);
@ -72,6 +81,8 @@ unittest
assert(tmpl_.info.components.length == 2);
assert(tmpl_.getComponent!CInt);
assert(tmpl_.getComponent!CFloat);
assert(!tmpl_.getComponent!CLong);
assert(!tmpl_.getComponent!CUnregistered);
assert(*tmpl_.getComponent!CInt == 1);
assert(*tmpl_.getComponent!CFloat == 2.0);