Skip to content

Commit 537ff57

Browse files
herlesupreethcodebot
authored andcommitted
unittest: add test to verify generation of UE PUSCH alloc param candidates only for a given PUSCH slot
1 parent 8651df5 commit 537ff57

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tests/unittests/scheduler/ue_scheduling/ue_pxsch_alloc_param_candidate_searcher_test.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,3 +97,17 @@ TEST_F(ue_pxsch_alloc_param_candidate_searcher_test, only_searchspaces_in_ue_ded
9797
ASSERT_TRUE(ss_present_in_ue_ded_cfg);
9898
}
9999
}
100+
101+
TEST_F(ue_pxsch_alloc_param_candidate_searcher_test, only_candidates_for_given_pusch_slot_is_returned)
102+
{
103+
const harq_id_t h_id = to_harq_id(0);
104+
const slot_point pdcch_slot{0, 0};
105+
const slot_point pusch_slot = get_next_ul_slot(pdcch_slot);
106+
107+
ue_pusch_alloc_param_candidate_searcher ul_searcher(
108+
*ue_ptr, to_du_cell_index(0), ue_cc->harqs.ul_harq(h_id), pdcch_slot, {}, pusch_slot);
109+
ASSERT_TRUE(not ul_searcher.is_empty());
110+
for (const auto& candidate : ul_searcher) {
111+
ASSERT_EQ(pdcch_slot + candidate.pusch_td_res().k2, pusch_slot) << "Candidate is not for the given PUSCH slot";
112+
}
113+
}

0 commit comments

Comments
 (0)