Bug fixes

-fix: UnittestRunner don't catch RangeError
-fix: sometimes onUpdate was called with empty array of entities
This commit is contained in:
Mergul 2020-06-15 17:21:29 +02:00
parent d733bb514c
commit 3e7575c4b2
2 changed files with 33 additions and 4 deletions

View file

@ -236,7 +236,7 @@ struct TestRunner(Args...)
}
else
{
import core.exception : AssertError;
import core.exception : AssertError, RangeError;
try
{
unittest_();
@ -249,6 +249,13 @@ struct TestRunner(Args...)
test.file_line = cast(int)error.line;
test.msg = copyString(error.msg);
}
catch(RangeError error)
{
test.passed = false;
test.file = copyString(error.file);
test.file_line = cast(int)error.line;
test.msg = copyString(error.msg);
}
}
if (test.passed)