merge (+rename) iu_helpers.c into libosmo-ranap
diff --git a/src/tests/Makefile.am b/src/tests/Makefile.am
index 973cf3f..43b63cc 100644
--- a/src/tests/Makefile.am
+++ b/src/tests/Makefile.am
@@ -6,13 +6,13 @@
 
 HNBAP_FILES = $(top_builddir)/src/hnbap_common.c $(top_builddir)/src/hnbap_decoder.c $(top_builddir)/src/hnbap_encoder.c
 RUA_FILES = $(top_builddir)/src/rua_common.c $(top_builddir)/src/rua_decoder.c $(top_builddir)/src/rua_encoder.c
-HELPER_FILES = $(top_builddir)/src/iu_helpers.c $(top_builddir)/src/asn1helpers.c
+HELPER_FILES = $(top_builddir)/src/asn1helpers.c
 
 test_helpers_SOURCES = $(HELPER_FILES) test-helpers.c
-test_helpers_LDADD = $(COMMON_LIBS)
+test_helpers_LDADD = $(COMMON_LIBS) $(top_builddir)/src/libosmo-ranap.la
 
 test_hnbap_SOURCES = $(HELPER_FILES) $(top_builddir)/src/hnbap_common.c $(top_builddir)/src/hnbap_decoder.c test-hnbap.c test_common.c
-test_hnbap_LDADD = $(COMMON_LIBS) $(top_builddir)/src/hnbap/libosmo-asn1-hnbap.a
+test_hnbap_LDADD = $(COMMON_LIBS) $(top_builddir)/src/hnbap/libosmo-asn1-hnbap.a $(top_builddir)/src/libosmo-ranap.la
 
 hnb_test_SOURCES = $(HELPER_FILES) $(HNBAP_FILES) $(RUA_FILES) hnb-test.c rua_helper.c test_common.c
 hnb_test_LDADD = $(COMMON_LIBS) $(top_builddir)/src/hnbap/libosmo-asn1-hnbap.a $(top_builddir)/src/rua/libosmo-asn1-rua.a $(top_builddir)/src/libosmo-ranap.la
diff --git a/src/tests/hnb-test.c b/src/tests/hnb-test.c
index cd07d7c..f26e222 100644
--- a/src/tests/hnb-test.c
+++ b/src/tests/hnb-test.c
@@ -106,7 +106,7 @@
 
 	request.uE_Identity.present = UE_Identity_PR_iMSI;
 
-	imsi_len = encode_iu_imsi(imsi_buf, sizeof(imsi_buf), imsi_str);
+	imsi_len = ranap_imsi_encode(imsi_buf, sizeof(imsi_buf), imsi_str);
 	OCTET_STRING_fromBuf(&request.uE_Identity.choice.iMSI, imsi_buf, imsi_len);
 
 	request.registration_Cause = Registration_Cause_normal;
@@ -162,7 +162,7 @@
 
 	ctx_id = asn1bitstr_to_u24(&accept.context_ID);
 
-	decode_iu_bcd(imsi, sizeof(imsi), accept.uE_Identity.choice.iMSI.buf,
+	ranap_bcd_decode(imsi, sizeof(imsi), accept.uE_Identity.choice.iMSI.buf,
 			accept.uE_Identity.choice.iMSI.size);
 	printf("UE Register accept for IMSI %s, context %u\n", imsi, ctx_id);
 
diff --git a/src/tests/test-helpers.c b/src/tests/test-helpers.c
index 60f3d3b..b514d10 100644
--- a/src/tests/test-helpers.c
+++ b/src/tests/test-helpers.c
@@ -27,6 +27,7 @@
 
 #include <osmocom/core/utils.h>
 
+int asn1_xer_print = 0;
 void *talloc_asn1_ctx;
 
 /* use odd number of digits */
@@ -43,13 +44,13 @@
 
 	printf("pre-encoded: %s\n", osmo_hexdump_nospc(imsi_encoded,
 						sizeof(imsi_encoded)));
-	rc = decode_iu_bcd(outstr, sizeof(outstr), imsi_encoded,
+	rc = ranap_bcd_decode(outstr, sizeof(outstr), imsi_encoded,
 			   sizeof(imsi_encoded));
 	ASSERT(rc >= 0);
 	printf("decoded: %s\n", outstr);
 	ASSERT(!strcmp(outstr, imsi_decoded));
 
-	rc = encode_iu_imsi(outbuf, sizeof(outbuf), imsi_decoded);
+	rc = ranap_imsi_encode(outbuf, sizeof(outbuf), imsi_decoded);
 	ASSERT(rc >= 0);
 	printf("re-encoded: %s\n", osmo_hexdump_nospc(outbuf, rc));
 	ASSERT(!memcmp(outbuf, imsi_encoded, sizeof(imsi_encoded)));
diff --git a/src/tests/test-hnbap.c b/src/tests/test-hnbap.c
index 0005fe1..5101ff4 100644
--- a/src/tests/test-hnbap.c
+++ b/src/tests/test-hnbap.c
@@ -134,7 +134,7 @@
 	ASSERT(rc >= 0);
 
 	ASSERT(ue_req_ies.uE_Identity.present == UE_Identity_PR_iMSI);
-	decode_iu_bcd(imsi, sizeof(imsi), ue_req_ies.uE_Identity.choice.iMSI.buf,
+	ranap_bcd_decode(imsi, sizeof(imsi), ue_req_ies.uE_Identity.choice.iMSI.buf,
 			ue_req_ies.uE_Identity.choice.iMSI.size);
 
 	printf("HNBAP UE Register request from IMSI %s\n", imsi);
@@ -154,7 +154,7 @@
 	ASSERT(rc >= 0);
 
 	ASSERT(ue_acc_ies.uE_Identity.present == UE_Identity_PR_iMSI);
-	decode_iu_bcd(imsi, sizeof(imsi), ue_acc_ies.uE_Identity.choice.iMSI.buf,
+	ranap_bcd_decode(imsi, sizeof(imsi), ue_acc_ies.uE_Identity.choice.iMSI.buf,
 			ue_acc_ies.uE_Identity.choice.iMSI.size);
 
 	printf("HNBAP UE Register accept to IMSI %s\n", imsi);