From 5d17ee6e7021a9d8cff229cedaab088929379e41 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Sun, 10 May 2020 14:57:03 -0400 Subject: [PATCH] Finished reintegrating test/noinitwrongthread.c. That was easy! --- test/meson.build | 2 +- test/noinitwrongthread.c | 11 ++++------- test/testlist.py | 4 ++-- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/test/meson.build b/test/meson.build index 2669fc17..36bdf2e0 100644 --- a/test/meson.build +++ b/test/meson.build @@ -54,7 +54,7 @@ libui_testlist_h = custom_target( command: [python, libui_testlist_py, 'header', '@OUTPUT@', '@INPUT@']) libui_testlist_c = custom_target( 'testlist.c', - input: libui_test_sources, + input: libui_test_sources + libui_allcalls_headers, output: ['testlist.c'], command: [python, libui_testlist_py, 'source', '@OUTPUT@', '@INPUT@']) diff --git a/test/noinitwrongthread.c b/test/noinitwrongthread.c index d26d833c..2d2e3569 100644 --- a/test/noinitwrongthread.c +++ b/test/noinitwrongthread.c @@ -1,16 +1,13 @@ // 28 may 2019 #include "test.h" - - if match is not None: - f = match.group(1) - casenames.append('TestCallOnWrongThreadIsProgrammerError_' + f) +#include "thread.h" // TODO rename to FunctionsFailBeforeInit? #define allcallsCase(f, ...) \ TestNoInit(CallBeforeInitIsProgrammerError_ ## f) \ { \ void *ctx; \ - ctx = beginCheckProgrammerError("atteTODOmpt to call " #f "() before uiInit()"); \ + ctx = beginCheckProgrammerError("attempt to call " #f "() before uiInit()"); \ f(__VA_ARGS__); \ endCheckProgrammerError(ctx); \ } @@ -21,7 +18,7 @@ TestNoInit(CallBeforeInitIsProgrammerError_uiQueueMain) { void *ctx; - ctx = beginCheckProgrammerError("atteTODOmpt to call uiQueueMain() before uiInit()"); + ctx = beginCheckProgrammerError("attempt to call uiQueueMain() before uiInit()"); uiQueueMain(NULL, NULL); endCheckProgrammerError(ctx); } @@ -37,7 +34,7 @@ TestNoInit(CallBeforeInitIsProgrammerError_uiQueueMain) threadThread *thread; \ threadSysError err; \ void *ctx; \ - ctx = beginCheckProgrammerError("atteTODOmpt to call " #f "() on a thread other than the GUI thread"); \ + ctx = beginCheckProgrammerError("attempt to call " #f "() on a thread other than the GUI thread"); \ err = threadNewThread(threadTest ## f, NULL, &thread); \ if (err != 0) \ TestFatalf("error creating thread: " threadSysErrorFmt, threadSysErrorFmtArg(err)); \ diff --git a/test/testlist.py b/test/testlist.py index 6895ced4..e1216428 100644 --- a/test/testlist.py +++ b/test/testlist.py @@ -159,8 +159,8 @@ def main(): if match is not None: f = match.group(1) # noinitwrongthread.c - casenames.append('TestCallBeforeInitIsProgrammerError_' + f) - casenames.append('TestCallOnWrongThreadIsProgrammerError_' + f) + casenames.append('CallBeforeInitIsProgrammerError_' + f) + casenames.append('CallOnWrongThreadIsProgrammerError_' + f) cmd.run(sorted(casenames)) main()