aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2015-06-29 13:03:46 +0200
committerJacob Erlbeck <jerlbeck@sysmocom.de>2015-07-03 12:05:51 +0200
commitc6d4ceeda6e6b96cc5bbc07fb9489587ed181f60 (patch)
tree5f86ef2abec7c3f18847215e34a11278a563115e /tests
parent9ec49e2411abb206c82af643d18e2ada82e865e2 (diff)
tbf/test: Add assertions
These assertions check for the TBF allocation result before the tbf object is dereferenced the first time. Sponsored-by: On-Waves ehf
Diffstat (limited to 'tests')
-rw-r--r--tests/tbf/TbfTest.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp
index 99686b9..c9b01db 100644
--- a/tests/tbf/TbfTest.cpp
+++ b/tests/tbf/TbfTest.cpp
@@ -76,12 +76,14 @@ static void test_tbf_tlli_update()
gprs_rlcmac_tbf *dl_tbf = tbf_alloc_dl_tbf(the_bts.bts_data(),
NULL, 0,
0, 0, 0);
+ OSMO_ASSERT(dl_tbf != NULL);
dl_tbf->update_ms(0x2342, GPRS_RLCMAC_DL_TBF);
dl_tbf->set_ta(4);
gprs_rlcmac_tbf *ul_tbf = tbf_alloc_ul_tbf(the_bts.bts_data(),
dl_tbf->ms(), 0,
0, 0, 0);
+ OSMO_ASSERT(ul_tbf != NULL);
ul_tbf->update_ms(0x2342, GPRS_RLCMAC_UL_TBF);
ms = the_bts.ms_by_tlli(0x2342);