26 lines
589 B
C
26 lines
589 B
C
|
// 10 june 2019
|
||
|
#include "test_windows.h"
|
||
|
|
||
|
static const uiControlOSVtable osVtable = {
|
||
|
.Size = sizeof (uiControlOSVtable),
|
||
|
};
|
||
|
|
||
|
const uiControlOSVtable *testOSVtable(void)
|
||
|
{
|
||
|
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);
|
||
|
}
|