Skip to content

Commit 1c489af

Browse files
add a test for front_id and pop_front
1 parent cb381bf commit 1c489af

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Tests/Time/scheduler_test.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,15 @@ TEST_F(SchedulerTests, SetAt) {
4949
}
5050
}
5151

52+
TEST_F(SchedulerTests, FrontId_PopFront) {
53+
Scheduler::sorted_task_ids_ = 0xFEDCBA9876543210ULL;
54+
for (uint8_t i = 0; i < 16; i++) {
55+
uint8_t id = Scheduler::front_id();
56+
Scheduler::pop_front();
57+
EXPECT_EQ(id, i);
58+
}
59+
}
60+
5261
TEST_F(SchedulerTests, FreeBitmap) {
5362
Scheduler::register_task(10, &fake_workload);
5463
EXPECT_EQ(Scheduler::free_bitmap_, 0xFFFF'FFFE);

0 commit comments

Comments
 (0)