libui/test/controls_unix.c

26 lines
586 B
C

// 10 june 2019
#include "test_unix.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);
}