@@ -253,20 +253,22 @@ TEST_F(test_pucch_harq_common_multiple_allocation, test_pucch_double_alloc)
253253 t_bench.res_grid , t_bench.get_main_ue ().crnti , t_bench.k0 , t_bench.k1 , t_bench.dci_info );
254254 ASSERT_TRUE (pucch_res_indicator.has_value ());
255255
256- // If we allocate the same UE twice, the scheduler is expected to allocate a different PUCCH common resource.
256+ // If we allocate the same UE twice, the scheduler is expected to fail, as we don't support PUCCH multiplexing on
257+ // PUCCH common resources.
257258 optional<unsigned > pucch_res_indicator_1 = t_bench.pucch_alloc .alloc_common_pucch_harq_ack_ue (
258259 t_bench.res_grid , t_bench.get_main_ue ().crnti , t_bench.k0 , t_bench.k1 , t_bench.dci_info );
259- ASSERT_TRUE (pucch_res_indicator_1.has_value ());
260- ASSERT_NE (pucch_res_indicator_1.value (), pucch_res_indicator.value ());
260+ ASSERT_FALSE (pucch_res_indicator_1.has_value ());
261261}
262262
263263TEST_F (test_pucch_harq_common_multiple_allocation, test_pucch_out_of_resources)
264264{
265265 // For this specific n_cce value (1) and for d_pri = {0,...,7}, we get 8 r_pucch values. This is the maximum number of
266266 // UEs we can allocate.
267- for (unsigned n_ue = 0 ; n_ue != 8 ; ++n_ue) {
267+ for (uint16_t n_ue = 0 ; n_ue != 8 ; ++n_ue) {
268+ t_bench.add_ue ();
269+ du_ue_index_t ue_idx = to_du_ue_index (static_cast <uint16_t >(t_bench.get_main_ue ().ue_index ) + n_ue);
268270 const optional<unsigned > pucch_res_indicator = t_bench.pucch_alloc .alloc_common_pucch_harq_ack_ue (
269- t_bench.res_grid , t_bench.get_main_ue ( ).crnti , t_bench.k0 , t_bench.k1 , t_bench.dci_info );
271+ t_bench.res_grid , t_bench.get_ue (ue_idx ).crnti , t_bench.k0 , t_bench.k1 , t_bench.dci_info );
270272 ASSERT_TRUE (pucch_res_indicator.has_value ());
271273 }
272274
0 commit comments