From 510158256b7ca8d3c3764c0481a6fee652ed2eb2 Mon Sep 17 00:00:00 2001 From: Philipp Maier Date: Tue, 28 Aug 2018 18:57:42 +0200 Subject: measurement: add unit tests for is_meas_complete() We do not test is_meas_complete() individually yet, but it is an integral part of the measurement processings since this function decides where a measurement interval ends. - Add unit tests that test TCH/F, TCH/H, SDCCH/4 and STDCH/8 Change-Id: I8f89d9e7092cd65ba4d5c5649140692dcc20bdd6 Related: OS#2987 --- src/common/measurement.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/common/measurement.c') diff --git a/src/common/measurement.c b/src/common/measurement.c index cb45e6e3..158849d5 100644 --- a/src/common/measurement.c +++ b/src/common/measurement.c @@ -244,8 +244,10 @@ static uint8_t translate_tch_meas_rep_fn104_inv(uint8_t fn_mod) return 0; } -/* determine if a measurement period ends at the given frame number */ -static int is_meas_complete(struct gsm_lchan *lchan, uint32_t fn) +/* determine if a measurement period ends at the given frame number + * (this function is only used internally, it is public to call it from + * unit-tests) */ +int is_meas_complete(struct gsm_lchan *lchan, uint32_t fn) { unsigned int fn_mod = -1; const uint8_t *tbl; -- cgit v1.2.3