mgcp_test: tweak test failure output

Change-Id: Ibfc80f06b2811cc32fe38518b11efd6764b347ee
This commit is contained in:
Neels Hofmeyr
2017-09-19 14:28:14 +02:00
parent 6779354245
commit 020e89bce9
2 changed files with 4 additions and 2 deletions

View File

@@ -541,7 +541,8 @@ static void test_messages(void)
if (msg)
printf("%s failed '%s'\n", t->name, (char *) msg->data);
} else if (strcmp((char *) msg->data, t->exp_resp) != 0)
printf("%s failed '%s'\n", t->name, (char *) msg->data);
printf("%s failed.\nExpected:\n%s\nGot:\n%s\n",
t->name, t->exp_resp, (char *) msg->data);
msgb_free(msg);
if (dummy_packets)

View File

@@ -599,7 +599,8 @@ static void test_messages(void)
OSMO_ASSERT(false);
}
} else if (strcmp((char *)msg->data, t->exp_resp) != 0) {
printf("%s failed '%s'\n", t->name, (char *)msg->data);
printf("%s failed.\nExpected:\n%s\nGot:\n%s\n",
t->name, t->exp_resp, (char *) msg->data);
OSMO_ASSERT(false);
}
msgb_free(msg);