Bug fixes
-fix: UnittestRunner don't catch RangeError -fix: sometimes onUpdate was called with empty array of entities
This commit is contained in:
parent
d733bb514c
commit
3e7575c4b2
2 changed files with 33 additions and 4 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue