aboutsummaryrefslogtreecommitdiffstats
path: root/tests/gsm23003
diff options
context:
space:
mode:
Diffstat (limited to 'tests/gsm23003')
-rw-r--r--tests/gsm23003/gsm23003_test.c16
-rw-r--r--tests/gsm23003/gsm23003_test.ok14
2 files changed, 15 insertions, 15 deletions
diff --git a/tests/gsm23003/gsm23003_test.c b/tests/gsm23003/gsm23003_test.c
index ea08d0d9..947aa18d 100644
--- a/tests/gsm23003/gsm23003_test.c
+++ b/tests/gsm23003/gsm23003_test.c
@@ -136,14 +136,14 @@ static struct test_mnc_from_str test_mnc_from_strs[] = {
{ "001", { 0, 1, true } },
{ "", { -EINVAL, 0, false } },
{ " ", { -EINVAL, 0, false } },
- { "-1", { -EINVAL, 65535, false } },
- { "1000", { -EINVAL, 1000, true } },
+ { "-1", { -EINVAL, 0, false } },
+ { "1000", { -EINVAL, 0, false } },
{ "0x", { -EINVAL, 0, false } },
- { " 23", { -EINVAL, 23, true } }, /* technically not a 3-digit MNC, but it's EINVAL anyway */
- { "23 ", { -EINVAL, 23, true } },
- { " 023", { -EINVAL, 23, true } },
- { "023 ", { -EINVAL, 23, true } },
- { "023 ", { -EINVAL, 23, true } },
+ { " 23", { -EINVAL, 0, false } },
+ { "23 ", { -EINVAL, 0, false } },
+ { " 023", { -EINVAL, 0, false } },
+ { "023 ", { -EINVAL, 0, false } },
+ { "023 ", { -EINVAL, 0, false } },
};
static bool test_mnc_from_str()
@@ -154,7 +154,7 @@ static bool test_mnc_from_str()
for (i = 0; i < ARRAY_SIZE(test_mnc_from_strs); i++) {
struct test_mnc_from_str *t = &test_mnc_from_strs[i];
- struct test_mnc_from_str_result result;
+ struct test_mnc_from_str_result result = {};
bool ok;
result.rc = osmo_mnc_from_str(t->mnc_str, &result.mnc,
diff --git a/tests/gsm23003/gsm23003_test.ok b/tests/gsm23003/gsm23003_test.ok
index 565c38cf..b435f450 100644
--- a/tests/gsm23003/gsm23003_test.ok
+++ b/tests/gsm23003/gsm23003_test.ok
@@ -51,11 +51,11 @@
5: "001" rc=0 mnc=1 mnc_3_digits=1 pass
6: "" rc=-22 mnc=0 mnc_3_digits=0 pass
7: " " rc=-22 mnc=0 mnc_3_digits=0 pass
- 8: "-1" rc=-22 mnc=65535 mnc_3_digits=0 pass
- 9: "1000" rc=-22 mnc=1000 mnc_3_digits=1 pass
+ 8: "-1" rc=-22 mnc=0 mnc_3_digits=0 pass
+ 9: "1000" rc=-22 mnc=0 mnc_3_digits=0 pass
10: "0x" rc=-22 mnc=0 mnc_3_digits=0 pass
-11: " 23" rc=-22 mnc=23 mnc_3_digits=1 pass
-12: "23 " rc=-22 mnc=23 mnc_3_digits=1 pass
-13: " 023" rc=-22 mnc=23 mnc_3_digits=1 pass
-14: "023 " rc=-22 mnc=23 mnc_3_digits=1 pass
-15: "023 " rc=-22 mnc=23 mnc_3_digits=1 pass
+11: " 23" rc=-22 mnc=0 mnc_3_digits=0 pass
+12: "23 " rc=-22 mnc=0 mnc_3_digits=0 pass
+13: " 023" rc=-22 mnc=0 mnc_3_digits=0 pass
+14: "023 " rc=-22 mnc=0 mnc_3_digits=0 pass
+15: "023 " rc=-22 mnc=0 mnc_3_digits=0 pass