Skip to content

Commit 93c94f8

Browse files
carlo-galcodebot
authored andcommitted
sched: adapt uci unittests to pucch alloc refactor
Signed-off-by: Carlo Galiotto <[email protected]>
1 parent 471fda8 commit 93c94f8

File tree

6 files changed

+387
-300
lines changed

6 files changed

+387
-300
lines changed

tests/unittests/scheduler/uci_and_pucch/pucch_alloc_common_harq_test.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,9 @@ TEST_P(test_pucch_harq_common_output, test_pucch_output_info)
112112

113113
ASSERT_TRUE(pucch_res_indicator.has_value());
114114
ASSERT_FALSE(t_bench.res_grid[t_bench.k0 + t_bench.k1].result.ul.pucchs.empty());
115-
ASSERT_TRUE(assess_ul_pucch_info(pucch_expected, t_bench.res_grid[t_bench.k0 + t_bench.k1].result.ul.pucchs.back()));
115+
ASSERT_TRUE(
116+
find_pucch_pdu(t_bench.res_grid[t_bench.k0 + t_bench.k1].result.ul.pucchs,
117+
[&expected = pucch_expected](const auto& pdu) { return pucch_info_match(expected, pdu); }));
116118
}
117119

118120
// Tests whether PUCCH allocator returns the correct values for the DCI.
@@ -298,8 +300,9 @@ TEST_F(test_pucch_harq_common_multiple_allocation, test_on_full_grid)
298300
ASSERT_TRUE(pucch_res_indicator_1.has_value());
299301

300302
ASSERT_FALSE(t_bench.res_grid[t_bench.k0 + t_bench.k1].result.ul.pucchs.empty());
301-
const pucch_info& pucch_pdu_test = t_bench.res_grid[t_bench.k0 + t_bench.k1].result.ul.pucchs.back();
302303

303304
ASSERT_EQ(0, pucch_res_indicator_1.value());
304-
ASSERT_TRUE(assess_ul_pucch_info(pucch_pdu_benchmark, pucch_pdu_test));
305+
ASSERT_TRUE(
306+
find_pucch_pdu(t_bench.res_grid[t_bench.k0 + t_bench.k1].result.ul.pucchs,
307+
[&expected = pucch_pdu_benchmark](const auto& pdu) { return pucch_info_match(expected, pdu); }));
305308
}

0 commit comments

Comments
 (0)