mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-05 05:20:31 +00:00
Merge pull request #594 from LuisAntonRebollo/unit-tests-without-crash
Increased stability Torque3D: unit-tests running without a crash.
This commit is contained in:
commit
feec36731e
18 changed files with 113 additions and 19 deletions
|
|
@ -48,6 +48,12 @@ CreateUnitTest(TestsJournalRecordAndPlayback, "Journal/Basic")
|
|||
// Initialize journal recording and fire off some events...
|
||||
Journal::Record("test.jrn");
|
||||
|
||||
if( !Journal::IsRecording() )
|
||||
{
|
||||
test(false, "Fail");
|
||||
return;
|
||||
}
|
||||
|
||||
testEvent.trigger(16);
|
||||
testEvent.trigger(17);
|
||||
testEvent.trigger(18);
|
||||
|
|
@ -132,6 +138,12 @@ CreateUnitTest(TestsJournalDynamicSignals, "Journal/DynamicSignals")
|
|||
// Initialize journal recording and fire off some events...
|
||||
Journal::Record("test.jrn");
|
||||
|
||||
if( !Journal::IsRecording() )
|
||||
{
|
||||
test(false, "Fail");
|
||||
return;
|
||||
}
|
||||
|
||||
testEvent.trigger(1);
|
||||
dynamicA->trigger(8, 100);
|
||||
testEvent.trigger(2);
|
||||
|
|
|
|||
|
|
@ -52,5 +52,7 @@ CreateUnitTest(TestingProcess, "Journal/Process")
|
|||
for(S32 i=0; i<30; i++)
|
||||
test(Process::processEvents(), "Should quit after 30 ProcessEvents() calls - not before!");
|
||||
test(!Process::processEvents(), "Should quit after the 30th ProcessEvent() call!");
|
||||
|
||||
Process::remove(this, &TestingProcess::process);
|
||||
}
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue