diff --git a/test/controls_errors.cpp b/test/controls_errors.cpp index 599068bb..9dfdd4cd 100644 --- a/test/controls_errors.cpp +++ b/test/controls_errors.cpp @@ -27,7 +27,19 @@ static const struct checkErrorCase cases[] = { }, "uiRegisterControlType(): wrong size 1 for uiControlVtable", }, - // TODO individual methods +#define checkVtableMethod(name) \ + { \ + "uiRegisterControlType() with NULL " #name " method", \ + [](void) { \ + uiControlVtable vtable; \ + vtable = *testVtable(); \ + vtable.name = NULL; \ + uiRegisterControlType("name", &vtable, NULL, 0); \ + }, \ + "uiRegisterControlType(): required uiControlVtable method " #name "() missing for uiControl type name", \ + } + checkVtableMethod(Init), + checkVtableMethod(Free), { "uiRegisterControlType() with NULL OS vtable", [](void) {