diff options
-rw-r--r-- | tests/gsm23003/gsm23003_test.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/gsm23003/gsm23003_test.c b/tests/gsm23003/gsm23003_test.c index 4411e298..ea08d0d9 100644 --- a/tests/gsm23003/gsm23003_test.c +++ b/tests/gsm23003/gsm23003_test.c @@ -159,7 +159,9 @@ static bool test_mnc_from_str() result.rc = osmo_mnc_from_str(t->mnc_str, &result.mnc, &result.mnc_3_digits); - ok = !bcmp(&result, &t->expect, sizeof(result)); + ok = (result.rc == t->expect.rc) + && (result.mnc == t->expect.mnc) + && (result.mnc_3_digits == t->expect.mnc_3_digits); printf("%2d: \"%s\" rc=%d mnc=%u mnc_3_digits=%u %s\n", i, osmo_escape_str(t->mnc_str, -1), result.rc, result.mnc, result.mnc_3_digits, ok ? "pass" : "FAIL"); |