unit: Improve message when the mem heap has usage

Show "mem heap still has 216 bytes allocated"
instead of "Assertion 'lwip_stats.mem.used == 0' failed"
This commit is contained in:
Erik Ekman 2020-06-23 20:47:05 +02:00
parent ff67ce6e07
commit b58e0061e0

View File

@ -50,7 +50,8 @@ void lwip_check_ensure_no_alloc(unsigned int skip)
unsigned int mask;
if (!(skip & SKIP_HEAP)) {
fail_unless(lwip_stats.mem.used == 0);
fail_unless(lwip_stats.mem.used == 0,
"mem heap still has %d bytes allocated", lwip_stats.mem.used);
}
for (i = 0, mask = 1; i < MEMP_MAX; i++, mask <<= 1) {
if (!(skip & mask)) {