From 3e96dafe445a17af0f7fc5f6c36ad70e16c40bd1 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Sun, 16 Jun 2019 05:45:16 -0400 Subject: [PATCH] Created the test uiControl type. Now we can start writing the rest of the uiControl tests. --- test/controls.c | 8 ++++++++ test/main.c | 1 + test/test.h | 2 ++ 3 files changed, 11 insertions(+) diff --git a/test/controls.c b/test/controls.c index 1c11a613..4e6d98ed 100644 --- a/test/controls.c +++ b/test/controls.c @@ -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; diff --git a/test/main.c b/test/main.c index f2b811cd..bfbf9470 100644 --- a/test/main.c +++ b/test/main.c @@ -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) diff --git a/test/test.h b/test/test.h index 69ebe1ed..87ec0bb4 100644 --- a/test/test.h +++ b/test/test.h @@ -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 }