Add test for CU F1AP ID data
This commit is contained in:
@@ -25,7 +25,7 @@
|
|||||||
#include "common/utils/assertions.h"
|
#include "common/utils/assertions.h"
|
||||||
#include "f1ap_ids.h"
|
#include "f1ap_ids.h"
|
||||||
|
|
||||||
int main()
|
void du_data_test()
|
||||||
{
|
{
|
||||||
du_init_f1_ue_data();
|
du_init_f1_ue_data();
|
||||||
int rnti = 13;
|
int rnti = 13;
|
||||||
@@ -38,5 +38,26 @@ int main()
|
|||||||
DevAssert(exists);
|
DevAssert(exists);
|
||||||
f1_ue_data_t rdata = du_get_f1_ue_data(rnti);
|
f1_ue_data_t rdata = du_get_f1_ue_data(rnti);
|
||||||
DevAssert(rdata.secondary_ue == data.secondary_ue);
|
DevAssert(rdata.secondary_ue == data.secondary_ue);
|
||||||
|
}
|
||||||
|
|
||||||
|
void cu_data_test()
|
||||||
|
{
|
||||||
|
cu_init_f1_ue_data();
|
||||||
|
int ue_id = 13;
|
||||||
|
f1_ue_data_t data = {.secondary_ue = 1};
|
||||||
|
bool ret = cu_add_f1_ue_data(ue_id, &data);
|
||||||
|
DevAssert(ret);
|
||||||
|
ret = cu_add_f1_ue_data(ue_id, &data);
|
||||||
|
DevAssert(!ret);
|
||||||
|
bool exists = cu_exists_f1_ue_data(ue_id);
|
||||||
|
DevAssert(exists);
|
||||||
|
f1_ue_data_t rdata = cu_get_f1_ue_data(ue_id);
|
||||||
|
DevAssert(rdata.secondary_ue == data.secondary_ue);
|
||||||
|
}
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
du_data_test();
|
||||||
|
cu_data_test();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user