Kaydet (Commit) 42019e2f authored tarafından Michael Meeks's avatar Michael Meeks

idle: unit test.

Change-Id: Ie48fb4260bf580010715777bc63974e4d635aed8
üst 4907c32b
...@@ -79,13 +79,31 @@ void TimerTest::testWatchdog() ...@@ -79,13 +79,31 @@ void TimerTest::testWatchdog()
} }
#endif #endif
// --------------------------------------------------------------------
void TimerTest::testIdle() class IdleBool : public Idle
{ {
// Add an idle handler bool &mrBool;
// forcible execute that lot first ... and ... public:
IdleBool( bool &rBool ) :
Idle( VCL_IDLE_PRIORITY_LOWEST ), mrBool( rBool )
{
Start();
mrBool = false;
}
virtual void Timeout() SAL_OVERRIDE
{
mrBool = true;
Application::EndYield();
}
};
// Error ... void TimerTest::testIdle()
{
bool bTriggered = false;
IdleBool aTest( bTriggered );
Timer::ProcessAllIdleHandlers();
CPPUNIT_ASSERT_MESSAGE("watchdog triggered", bTriggered);
} }
// -------------------------------------------------------------------- // --------------------------------------------------------------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment