And added uiControlVtable NULL method tests. Woo!

This commit is contained in:
Pietro Gagliardi 2019-06-15 23:38:17 -04:00
parent 29309ab040
commit ed5bbc4dbd
1 changed files with 13 additions and 1 deletions

View File

@ -27,7 +27,19 @@ static const struct checkErrorCase cases[] = {
}, },
"uiRegisterControlType(): wrong size 1 for uiControlVtable", "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", "uiRegisterControlType() with NULL OS vtable",
[](void) { [](void) {