Kaydet (Commit) d411dca1 authored tarafından Tobias Madl's avatar Tobias Madl

Timer Idle: adapted unit tests to new classes

Change-Id: I15654a7aa5a99cb3aa6f8ba222cf2aa1d2f040ab
üst f384496d
...@@ -93,7 +93,7 @@ public: ...@@ -93,7 +93,7 @@ public:
Start(); Start();
mrBool = false; mrBool = false;
} }
virtual void DoIdle() SAL_OVERRIDE virtual void Invoke() SAL_OVERRIDE
{ {
mrBool = true; mrBool = true;
Application::EndYield(); Application::EndYield();
...@@ -104,7 +104,7 @@ void TimerTest::testIdle() ...@@ -104,7 +104,7 @@ void TimerTest::testIdle()
{ {
bool bTriggered = false; bool bTriggered = false;
IdleBool aTest( bTriggered ); IdleBool aTest( bTriggered );
Idle::ProcessAllIdleHandlers(); Scheduler::ProcessTaskScheduling(false);
CPPUNIT_ASSERT_MESSAGE("watchdog triggered", bTriggered); CPPUNIT_ASSERT_MESSAGE("watchdog triggered", bTriggered);
} }
...@@ -121,7 +121,7 @@ public: ...@@ -121,7 +121,7 @@ public:
Start(); Start();
mrBool = false; mrBool = false;
} }
virtual void Timeout() SAL_OVERRIDE virtual void Invoke() SAL_OVERRIDE
{ {
mrBool = true; mrBool = true;
Application::EndYield(); Application::EndYield();
...@@ -156,7 +156,7 @@ public: ...@@ -156,7 +156,7 @@ public:
Start(); Start();
mrCount = 0; mrCount = 0;
} }
virtual void Timeout() SAL_OVERRIDE virtual void Invoke() SAL_OVERRIDE
{ {
mrCount++; mrCount++;
} }
...@@ -181,7 +181,7 @@ public: ...@@ -181,7 +181,7 @@ public:
SetTimeout( nMS ); SetTimeout( nMS );
Start(); Start();
} }
virtual void Timeout() SAL_OVERRIDE virtual void Invoke() SAL_OVERRIDE
{ {
for (int i = 0; i < 100; i++) for (int i = 0; i < 100; i++)
Application::Yield(); Application::Yield();
...@@ -211,7 +211,7 @@ public: ...@@ -211,7 +211,7 @@ public:
Start(); Start();
mbSlow = false; mbSlow = false;
} }
virtual void Timeout() SAL_OVERRIDE virtual void Invoke() SAL_OVERRIDE
{ {
TimeValue aWait; TimeValue aWait;
aWait.Seconds = 1; aWait.Seconds = 1;
......
...@@ -53,13 +53,8 @@ ImplSchedulerData *ImplSchedulerData::GetMostImportantTask( bool bTimer ) ...@@ -53,13 +53,8 @@ ImplSchedulerData *ImplSchedulerData::GetMostImportantTask( bool bTimer )
// the priority of the most urgent, the priority of most urgent is increased and // the priority of the most urgent, the priority of most urgent is increased and
// the current is the new most urgent. So starving is impossible. // the current is the new most urgent. So starving is impossible.
if ( p->mpScheduler->GetPriority() < pMostUrgent->mpScheduler->GetPriority() ) if ( p->mpScheduler->GetPriority() < pMostUrgent->mpScheduler->GetPriority() )
{
pMostUrgent->mpScheduler->SetSchedulingPriority( pMostUrgent->mpScheduler->GetPriority());
pMostUrgent = p; pMostUrgent = p;
} }
else
p->mpScheduler->SetSchedulingPriority( p->mpScheduler->GetPriority());
}
} }
return pMostUrgent; return pMostUrgent;
......
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