mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-27 18:50:34 +08:00
Few manual style fixes for tests
This commit is contained in:
@@ -18,6 +18,9 @@ struct TimerCallCounter
|
||||
void callB(const uavcan::TimerEvent& ev) { events_b.push_back(ev); }
|
||||
|
||||
typedef uavcan::MethodBinder<TimerCallCounter*, void(TimerCallCounter::*)(const uavcan::TimerEvent&)> Binder;
|
||||
|
||||
Binder bindA() { return Binder(this, &TimerCallCounter::callA); }
|
||||
Binder bindB() { return Binder(this, &TimerCallCounter::callB); }
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -34,10 +37,8 @@ TEST(Scheduler, Timers)
|
||||
*/
|
||||
{
|
||||
TimerCallCounter tcc;
|
||||
uavcan::TimerEventForwarder<TimerCallCounter::Binder>
|
||||
a(node, TimerCallCounter::Binder(&tcc, &TimerCallCounter::callA));
|
||||
uavcan::TimerEventForwarder<TimerCallCounter::Binder>
|
||||
b(node, TimerCallCounter::Binder(&tcc, &TimerCallCounter::callB));
|
||||
uavcan::TimerEventForwarder<TimerCallCounter::Binder> a(node, tcc.bindA());
|
||||
uavcan::TimerEventForwarder<TimerCallCounter::Binder> b(node, tcc.bindB());
|
||||
|
||||
ASSERT_EQ(0, node.getScheduler().getDeadlineScheduler().getNumHandlers());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user