From 29309ab040d3d1146074d696674071baad96f4eb Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Sat, 15 Jun 2019 21:45:35 -0400 Subject: [PATCH] And also FINALLY added the internal uiEvents to the uiEventFree() test. --- test/events_errors.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/test/events_errors.cpp b/test/events_errors.cpp index 1044e052..22f3b84c 100644 --- a/test/events_errors.cpp +++ b/test/events_errors.cpp @@ -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