1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-22 15:55:48 +03:00

Post rebase fixup.

This commit is contained in:
Martin Budden 2016-02-06 21:10:51 +00:00 committed by borisbstyle
parent 32c4348357
commit 01a19cdc04
3 changed files with 1 additions and 15 deletions

View file

@ -20,9 +20,6 @@
#ifdef SRC_MAIN_SCHEDULER_C_
#ifdef UNIT_TEST
#ifdef SRC_MAIN_SCHEDULER_C_
#ifdef UNIT_TEST
cfTask_t *unittest_scheduler_selectedTask;
uint8_t unittest_scheduler_selectedTaskDynamicPriority;
uint16_t unittest_scheduler_waitingTasks;

View file

@ -61,7 +61,7 @@ static cfTask_t* taskQueueArray[TASK_COUNT + 1]; // extra item for NULL pointer
#endif
STATIC_UNIT_TESTED void queueClear(void)
{
memset(taskQueueArray, 0, (int)(sizeof(taskQueueArray)));
memset(taskQueueArray, 0, sizeof(cfTask_t) * (TASK_COUNT + 1));
taskQueuePos = 0;
taskQueueSize = 0;
}

View file

@ -83,17 +83,6 @@ extern "C" {
extern cfTask_t *queueNext(void);
}
TEST(SchedulerUnittest, TestPriorites)
{
// check that the #defines used by scheduler.c and scheduler_unittest.cc are in sync
EXPECT_EQ(14, TASK_COUNT);
EXPECT_EQ(TASK_PRIORITY_HIGH, cfTasks[TASK_SYSTEM].staticPriority);
EXPECT_EQ(TASK_PRIORITY_REALTIME, cfTasks[TASK_GYROPID].staticPriority);
EXPECT_EQ(TASK_PRIORITY_MEDIUM, cfTasks[TASK_ACCEL].staticPriority);
EXPECT_EQ(TASK_PRIORITY_LOW, cfTasks[TASK_SERIAL].staticPriority);
EXPECT_EQ(TASK_PRIORITY_MEDIUM, cfTasks[TASK_BATTERY].staticPriority);
}
TEST(SchedulerUnittest, TestPriorites)
{
EXPECT_EQ(14, TASK_COUNT);