unit: Improve message when a memp pool has entries

Show "memp pool 'PBUF_REF/ROM' still has 2 entries allocated"
instead of "Assertion 'lwip_stats.memp[i]->used == 0' failed"
This commit is contained in:
Erik Ekman 2020-06-22 00:51:09 +02:00
parent 0b370fbade
commit ff67ce6e07

View File

@ -54,7 +54,9 @@ void lwip_check_ensure_no_alloc(unsigned int skip)
}
for (i = 0, mask = 1; i < MEMP_MAX; i++, mask <<= 1) {
if (!(skip & mask)) {
fail_unless(lwip_stats.memp[i]->used == 0);
fail_unless(lwip_stats.memp[i]->used == 0,
"memp pool '%s' still has %d entries allocated",
lwip_stats.memp[i]->name, lwip_stats.memp[i]->used);
}
}
}