And also FINALLY added the internal uiEvents to the uiEventFree() test.

This commit is contained in:
Pietro Gagliardi 2019-06-15 21:45:35 -04:00
parent 29ce809772
commit 29309ab040
1 changed files with 7 additions and 2 deletions

View File

@ -91,6 +91,13 @@ static const struct checkErrorCase cases[] = {
},
"uiEventFree(): invalid null pointer for uiEvent",
},
#define checkEventFreeInternal(which) \
{ \
"uiEventFree() called on " #which, \
[](void) { uiEventFree(which); }, \
"uiEventFree(): can't free a libui-provided event", \
}
checkEventFreeInternal(uiControlOnFree()),
{
"uiEventFree() while said event is firing",
[](void) {
@ -303,5 +310,3 @@ testingTest(EventErrors)
{
checkProgrammerErrors(t, cases);
}
// TODO check deleting each internal event