pespin has uploaded this change for review.

View Change

tests: nanobts_omlattr_test: Use msgb_eq_data_print() helper

Change-Id: I1c96305839e6627a36655c2e64da64f0a6704896
---
M tests/nanobts_omlattr/nanobts_omlattr_test.c
1 file changed, 5 insertions(+), 5 deletions(-)

git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/64/27364/1
diff --git a/tests/nanobts_omlattr/nanobts_omlattr_test.c b/tests/nanobts_omlattr/nanobts_omlattr_test.c
index 1b3cc8e..e15d20e 100644
--- a/tests/nanobts_omlattr/nanobts_omlattr_test.c
+++ b/tests/nanobts_omlattr/nanobts_omlattr_test.c
@@ -43,7 +43,7 @@
msgb = nanobts_attr_bts_get(bts);
printf("result= %s\n", osmo_hexdump_nospc(msgb->data, msgb->len));
printf("expected=%s\n", osmo_hexdump_nospc(expected, msgb->len));
- OSMO_ASSERT(memcmp(msgb->data, expected, msgb->len) == 0);
+ OSMO_ASSERT(msgb_eq_data_print(msgb, expected, msgb->len));
msgb_free(msgb);

printf("ok.\n");
@@ -59,7 +59,7 @@
msgb = nanobts_attr_nse_get(bts->site_mgr);
printf("result= %s\n", osmo_hexdump_nospc(msgb->data, msgb->len));
printf("expected=%s\n", osmo_hexdump_nospc(expected, msgb->len));
- OSMO_ASSERT(memcmp(msgb->data, expected, msgb->len) == 0);
+ OSMO_ASSERT(msgb_eq_data_print(msgb, expected, msgb->len));
msgb_free(msgb);

printf("ok.\n");
@@ -75,7 +75,7 @@
msgb = nanobts_attr_cell_get(bts);
printf("result= %s\n", osmo_hexdump_nospc(msgb->data, msgb->len));
printf("expected=%s\n", osmo_hexdump_nospc(expected, msgb->len));
- OSMO_ASSERT(memcmp(msgb->data, expected, msgb->len) == 0);
+ OSMO_ASSERT(msgb_eq_data_print(msgb, expected, msgb->len));
msgb_free(msgb);

printf("ok.\n");
@@ -91,7 +91,7 @@
msgb = nanobts_attr_nsvc_get(bts);
printf("result= %s\n", osmo_hexdump_nospc(msgb->data, msgb->len));
printf("expected=%s\n", osmo_hexdump_nospc(expected, msgb->len));
- OSMO_ASSERT(memcmp(msgb->data, expected, msgb->len) == 0);
+ OSMO_ASSERT(msgb_eq_data_print(msgb, expected, msgb->len));
msgb_free(msgb);

printf("ok.\n");
@@ -109,7 +109,7 @@
msgb = nanobts_attr_radio_get(bts, trx);
printf("result= %s\n", osmo_hexdump_nospc(msgb->data, msgb->len));
printf("expected=%s\n", osmo_hexdump_nospc(expected, msgb->len));
- OSMO_ASSERT(memcmp(msgb->data, expected, msgb->len) == 0);
+ OSMO_ASSERT(msgb_eq_data_print(msgb, expected, msgb->len));
msgb_free(msgb);

printf("ok.\n");

To view, visit change 27364. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I1c96305839e6627a36655c2e64da64f0a6704896
Gerrit-Change-Number: 27364
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin@sysmocom.de>
Gerrit-MessageType: newchange