Created the test uiControl type. Now we can start writing the rest of the uiControl tests.

This commit is contained in:
Pietro Gagliardi 2019-06-16 05:45:16 -04:00
parent ed5bbc4dbd
commit 3e96dafe44
3 changed files with 11 additions and 0 deletions

View File

@ -27,3 +27,11 @@ const uiControlVtable *testVtable(void)
{
return &vtable;
}
size_t testImplDataSize(void)
{
return sizeof (struct testImplData);
}
// TODO explicitly make/document 0 as always invalid
uint32_t testControlType = 0;

View File

@ -49,6 +49,7 @@ int main(int argc, char *argv[])
printf("FAIL\n");
return 1;
}
testControlType = uiRegisterControlType("TestControl", testVtable(), testOSVtable(), testImplDataSize());
runSetORingResults(NULL, &opts, &anyRun, &anyFailed);
if (!anyRun)

View File

@ -52,6 +52,8 @@ extern void checkProgrammerErrorsFull(testingT *t, const char *file, long line,
// controls.c
extern const uiControlVtable *testVtable(void);
extern const uiControlOSVtable *testOSVtable(void);
extern size_t testImplDataSize(void);
extern uint32_t testControlType;
#ifdef __cplusplus
}