From 3b61df4b64d8003be190b428fa7a70052c8be317 Mon Sep 17 00:00:00 2001 From: Francisco Date: Fri, 28 May 2021 16:03:28 +0100 Subject: [PATCH] test,sched: update TPC test to reflect changes in SNR estimatioN --- srsenb/test/mac/sched_tpc_test.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/srsenb/test/mac/sched_tpc_test.cc b/srsenb/test/mac/sched_tpc_test.cc index acfe07ea4..faffe4694 100644 --- a/srsenb/test/mac/sched_tpc_test.cc +++ b/srsenb/test/mac/sched_tpc_test.cc @@ -28,7 +28,12 @@ int test_finite_target_snr() tpc tpcfsm(nof_prbs, 15, 15, true); - // TEST: While no SNR info is provided, no TPC commands are sent + // TEST: While UL SNR ~ target, no TPC commands are sent + for (uint32_t i = 0; i < 100 and tpcfsm.get_ul_snr_estim(0) < 14; ++i) { + tpcfsm.set_snr(15, 0); + tpcfsm.set_snr(15, 1); + tpcfsm.new_tti(); + } for (uint32_t i = 0; i < 100; ++i) { tpcfsm.new_tti(); TESTASSERT(decode_tpc(tpcfsm.encode_pucch_tpc()) == 0);