This commit is contained in:
Pietro Gagliardi 2019-06-18 20:36:17 -04:00
parent c17f854d04
commit 0264ea9905
2 changed files with 28 additions and 0 deletions

11
test/controls_unix.c Normal file
View File

@ -0,0 +1,11 @@
// 10 june 2019
#include "test_unix.h"
static const uiControlOSVtable vtable = {
.Size = sizeof (uiControlOSVtable),
};
const uiControlOSVtable *testOSVtable(void)
{
return &vtable;
}

View File

@ -0,0 +1,17 @@
// 16 june 2019
#include "test_unix.h"
const struct checkErrorCase controlOSVtableCases[] = {
{
"uiRegisterControlType() with OS vtable with wrong size",
[](void) {
uiControlOSVtable vtable;
memset(&vtable, 0, sizeof (uiControlOSVtable));
vtable.Size = 1;
uiRegisterControlType("name", testVtable(), &vtable, 0);
},
"uiRegisterControlType(): wrong size 1 for uiControlOSVtable",
},
{ NULL, NULL, NULL },
};