Mostly bugfix update + empty components support and remove EntityID from Event structure

-empty components now take no memory, so flag components is now far better
-added test for critical bug
-fixed critical bug with adding/removing entities form inside events
-fixed small bug with TestRunner
-improve basic tests
-fixed betterC compilation on DMD
-remove EntityID form Event structure
-added "return" attribute to some functions
-moved some code from Tempalte side to actual implementation
-fixed bug with EntityTemplate copying
-commented out some possibliy unused code
-use code formatter
This commit is contained in:
Mergul 2020-05-27 17:03:44 +02:00
parent 15cd57dbcb
commit 6929f5a748
16 changed files with 988 additions and 544 deletions

View file

@ -210,7 +210,7 @@ struct TestRunner(Args...)
else
test.name = attributes[0];
static if (__traits(hasMember, module_, "beforeEveryTest"))
static if (__traits(hasMember, module_, "beforeEveryTest") && __traits(compiles, module_.beforeEveryTest()))
module_.beforeEveryTest();
if(before)before();
@ -256,7 +256,7 @@ struct TestRunner(Args...)
else
suite.failed++;
suite.tests ~= test;
static if (__traits(hasMember, module_, "afterEveryTest"))
static if (__traits(hasMember, module_, "afterEveryTest") && __traits(compiles, module_.beforeEveryTest()))
module_.afterEveryTest();
}
passed += suite.passed;
@ -420,7 +420,7 @@ extern (C) int main(int argc, char** args)
}
}
TestRunner!(tests.id_manager, tests.vector, tests.basic, tests.perf, tests.access_perf) runner;
TestRunner!(tests.id_manager, tests.vector, tests.basic, tests.perf, tests.access_perf, tests.bugs) runner;
runner.runTests(include[], exclude[]);