// 28 april 2019 #include "../ui.h" #include "lib/testing.h" #include "lib/timer.h" // main.c extern void timeoutMain(void *data); #define timeout_uiMain(t, d) { \ timerSysError err; \ int timedOut; \ err = timerRunWithTimeout(d, timeoutMain, NULL, &timedOut); \ if (err != 0) \ testingTErrorf(t, "error running uiMain() in timeout: " timerSysErrorFmt, timerSysErrorFmtArg(err)); \ if (timedOut) { \ char timeoutstr[timerDurationStringLen]; \ timerDurationString(d, timeoutstr); \ testingTErrorf(t, "uiMain() timed out (%s)", timeoutstr); \ } \ }