From dbb25132d737ca7d483f1195057c851836e9afdd Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Tue, 20 Feb 2018 15:12:23 +0100 Subject: gsm0408_test: check for new mnc_3_digits flag Note that on the input side, the 3-digits flag may be left false when the MNC is >99 anyway. On the decoded side, the flag is set accurately. Change-Id: I89765613d8c5bd939a6957f7443ac88475f1b93c --- tests/gsm0408/gsm0408_test.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tests/gsm0408/gsm0408_test.c') diff --git a/tests/gsm0408/gsm0408_test.c b/tests/gsm0408/gsm0408_test.c index a0e740aa..9e552ab9 100644 --- a/tests/gsm0408/gsm0408_test.c +++ b/tests/gsm0408/gsm0408_test.c @@ -132,7 +132,7 @@ static int test_bearer_cap() static inline void dump_ra(const struct gprs_ra_id *raid) { - printf("%03u-%02u-%u-%u\n", raid->mcc, raid->mnc, raid->lac, raid->rac); + printf("%s%s\n", osmo_rai_name(raid), raid->mnc_3_digits ? " (3-digit MNC)" : ""); } static inline void check_ra(const struct gprs_ra_id *raid) @@ -153,7 +153,8 @@ static inline void check_ra(const struct gprs_ra_id *raid) printf("MCC+MNC in BCD: %s\n", osmo_hexdump(ra.digits, sizeof(ra.digits))); dump_ra(&raid0); printf("RA test..."); - if (raid->mnc != raid0.mnc || raid->mcc != raid0.mcc || raid->lac != raid0.lac || raid->rac != raid0.rac) + if (raid->mnc != raid0.mnc || raid->mcc != raid0.mcc || raid->lac != raid0.lac || raid->rac != raid0.rac + || (raid->mnc_3_digits || raid->mnc > 99) != raid0.mnc_3_digits) printf("FAIL\n"); else printf("passed\n"); -- cgit v1.2.3