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
This commit is contained in:
Jacob Erlbeck 2015-06-29 13:03:46 +02:00
parent 9ec49e2411
commit c6d4ceeda6
1 changed files with 2 additions and 0 deletions

View File

@ -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);