aboutsummaryrefslogtreecommitdiffstats
path: root/src/common/measurement.c
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2018-08-28 18:57:42 +0200
committerHarald Welte <laforge@gnumonks.org>2018-08-29 07:35:57 +0000
commit510158256b7ca8d3c3764c0481a6fee652ed2eb2 (patch)
tree6197d2841003312cc9061423e5202154d1c90a3c /src/common/measurement.c
parent1dcd63d36a0352949f0db9290cada5004aab96de (diff)
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
Diffstat (limited to 'src/common/measurement.c')
-rw-r--r--src/common/measurement.c6
1 files changed, 4 insertions, 2 deletions
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;