2019-06-10 22:09:35 -05:00
|
|
|
// 10 june 2019
|
|
|
|
#import "test_darwin.h"
|
|
|
|
|
2020-05-11 21:19:07 -05:00
|
|
|
static const uiControlOSVtable osVtable = {
|
2019-06-15 20:33:53 -05:00
|
|
|
.Size = sizeof (uiControlOSVtable),
|
|
|
|
};
|
2019-06-10 22:09:35 -05:00
|
|
|
|
2019-06-15 20:33:53 -05:00
|
|
|
const uiControlOSVtable *testOSVtable(void)
|
|
|
|
{
|
2020-05-11 21:19:07 -05:00
|
|
|
return &osVtable;
|
|
|
|
}
|
|
|
|
|
|
|
|
Test(WrongControlOSVtableSizeIsProgrammerError)
|
|
|
|
{
|
|
|
|
uiControlVtable vtable;
|
|
|
|
uiControlOSVtable osvt;
|
|
|
|
void *ctx;
|
|
|
|
|
|
|
|
testControlLoadNopVtable(&vtable);
|
|
|
|
ctx = beginCheckProgrammerError("uiRegisterControlType(): wrong size 1 for uiControlOSVtable");
|
|
|
|
memset(&osvt, 0, sizeof (uiControlOSVtable));
|
|
|
|
osvt.Size = 1;
|
|
|
|
uiRegisterControlType("name", &vtable, &osvt, 0);
|
|
|
|
endCheckProgrammerError(ctx);
|
2019-06-10 22:09:35 -05:00
|
|
|
}
|