summaryrefslogtreecommitdiffstats
path: root/tests/gsm0408
diff options
context:
space:
mode:
Diffstat (limited to 'tests/gsm0408')
-rw-r--r--tests/gsm0408/gsm0408_test.c9
-rw-r--r--tests/gsm0408/gsm0408_test.ok4
2 files changed, 6 insertions, 7 deletions
diff --git a/tests/gsm0408/gsm0408_test.c b/tests/gsm0408/gsm0408_test.c
index 935ec21d..77a88224 100644
--- a/tests/gsm0408/gsm0408_test.c
+++ b/tests/gsm0408/gsm0408_test.c
@@ -137,8 +137,7 @@ static inline void dump_ra(const struct gprs_ra_id *raid)
static inline void check_ra(const struct gprs_ra_id *raid)
{
- uint8_t buf[6];
- int res;
+ struct gsm48_ra_id ra;
struct gprs_ra_id raid0 = {
.mnc = 0,
.mcc = 0,
@@ -146,10 +145,10 @@ static inline void check_ra(const struct gprs_ra_id *raid)
.rac = 0,
};
- res = gsm48_construct_ra(buf, raid);
- printf("Constructed RA: %d - %s\n", res, res != sizeof(buf) ? "FAIL" : "OK");
+ gsm48_encode_ra(&ra, raid);
+ printf("Constructed RA:\n");
- gsm48_parse_ra(&raid0, buf);
+ gsm48_parse_ra(&raid0, (const uint8_t *)&ra);
dump_ra(raid);
dump_ra(&raid0);
printf("RA test...");
diff --git a/tests/gsm0408/gsm0408_test.ok b/tests/gsm0408/gsm0408_test.ok
index f0abfd5c..83165fac 100644
--- a/tests/gsm0408/gsm0408_test.ok
+++ b/tests/gsm0408/gsm0408_test.ok
@@ -1,11 +1,11 @@
Test `CSD 9600/V.110/transparent' passed
Test `Speech, all codecs' passed
Simple TMSI encoding test....passed
-Constructed RA: 6 - OK
+Constructed RA:
RA: MNC=121, MCC=77, LAC=666, RAC=5
RA: MNC=121, MCC=77, LAC=666, RAC=5
RA test...passed
-Constructed RA: 6 - OK
+Constructed RA:
RA: MNC=98, MCC=84, LAC=11, RAC=89
RA: MNC=98, MCC=84, LAC=11, RAC=89
RA test...passed