[MERGED] libosmocore[master]: gsm0408_test: RA test: include min/max value cases

2018-02-21 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: gsm0408_test: RA test: include min/max value cases
..


gsm0408_test: RA test: include min/max value cases

(Preparation for adding 3-digit MNC)

Change-Id: Ifbc167de0cc039858112677b8d0cd14a2c8af086
---
M tests/gsm0408/gsm0408_test.c
M tests/gsm0408/gsm0408_test.ok
2 files changed, 22 insertions(+), 0 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/tests/gsm0408/gsm0408_test.c b/tests/gsm0408/gsm0408_test.c
index aa6a8be..ad45507 100644
--- a/tests/gsm0408/gsm0408_test.c
+++ b/tests/gsm0408/gsm0408_test.c
@@ -172,6 +172,18 @@
.lac = 11,
.rac = 89,
},
+   {
+   .mcc = 0,
+   .mnc = 0,
+   .lac = 0,
+   .rac = 0,
+   },
+   {
+   .mcc = 999,
+   .mnc = 999,
+   .lac = 65535,
+   .rac = 255,
+   },
 };
 
 static void test_ra_cap(void)
diff --git a/tests/gsm0408/gsm0408_test.ok b/tests/gsm0408/gsm0408_test.ok
index a3d801d..dc19eea 100644
--- a/tests/gsm0408/gsm0408_test.ok
+++ b/tests/gsm0408/gsm0408_test.ok
@@ -12,3 +12,13 @@
 MCC+MNC in BCD: 80 f4 89 
 084-98-11-89
 RA test...passed
+Constructed RA:
+000-00-0-0
+MCC+MNC in BCD: 00 f0 00 
+000-00-0-0
+RA test...passed
+Constructed RA:
+999-999-65535-255
+MCC+MNC in BCD: 99 99 99 
+999-999-65535-255
+RA test...passed

-- 
To view, visit https://gerrit.osmocom.org/6657
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifbc167de0cc039858112677b8d0cd14a2c8af086
Gerrit-PatchSet: 1
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


libosmocore[master]: gsm0408_test: RA test: include min/max value cases

2018-02-21 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/6657
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ifbc167de0cc039858112677b8d0cd14a2c8af086
Gerrit-PatchSet: 1
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


[PATCH] libosmocore[master]: gsm0408_test: RA test: include min/max value cases

2018-02-21 Thread Neels Hofmeyr

Review at  https://gerrit.osmocom.org/6657

gsm0408_test: RA test: include min/max value cases

(Preparation for adding 3-digit MNC)

Change-Id: Ifbc167de0cc039858112677b8d0cd14a2c8af086
---
M tests/gsm0408/gsm0408_test.c
M tests/gsm0408/gsm0408_test.ok
2 files changed, 22 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/57/6657/1

diff --git a/tests/gsm0408/gsm0408_test.c b/tests/gsm0408/gsm0408_test.c
index aa6a8be..ad45507 100644
--- a/tests/gsm0408/gsm0408_test.c
+++ b/tests/gsm0408/gsm0408_test.c
@@ -172,6 +172,18 @@
.lac = 11,
.rac = 89,
},
+   {
+   .mcc = 0,
+   .mnc = 0,
+   .lac = 0,
+   .rac = 0,
+   },
+   {
+   .mcc = 999,
+   .mnc = 999,
+   .lac = 65535,
+   .rac = 255,
+   },
 };
 
 static void test_ra_cap(void)
diff --git a/tests/gsm0408/gsm0408_test.ok b/tests/gsm0408/gsm0408_test.ok
index a3d801d..dc19eea 100644
--- a/tests/gsm0408/gsm0408_test.ok
+++ b/tests/gsm0408/gsm0408_test.ok
@@ -12,3 +12,13 @@
 MCC+MNC in BCD: 80 f4 89 
 084-98-11-89
 RA test...passed
+Constructed RA:
+000-00-0-0
+MCC+MNC in BCD: 00 f0 00 
+000-00-0-0
+RA test...passed
+Constructed RA:
+999-999-65535-255
+MCC+MNC in BCD: 99 99 99 
+999-999-65535-255
+RA test...passed

-- 
To view, visit https://gerrit.osmocom.org/6657
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifbc167de0cc039858112677b8d0cd14a2c8af086
Gerrit-PatchSet: 1
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr