Merge pull request #594 from LuisAntonRebollo/unit-tests-without-crash

Increased stability Torque3D: unit-tests running without a crash.
This commit is contained in:
Daniel Buckmaster 2014-06-16 10:57:04 +10:00
commit feec36731e
18 changed files with 113 additions and 19 deletions

View file

@ -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);

View file

@ -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);
}
};