And filled in haiku tests. It builds, but doesn't run.

This commit is contained in:
Pietro Gagliardi 2020-01-18 20:25:33 -05:00
parent 4c33e0fb83
commit de76afd43a
4 changed files with 35 additions and 1 deletions

11
test/controls_haiku.c Normal file
View File

@ -0,0 +1,11 @@
// 18 january 2020
#include "test_haiku.h"
static const uiControlOSVtable vtable = {
.Size = sizeof (uiControlOSVtable),
};
const uiControlOSVtable *testOSVtable(void)
{
return &vtable;
}

View File

@ -0,0 +1,17 @@
// 18 january 2020
#include "test_haiku.h"
const struct checkErrorCase controlOSVtableCases[] = {
{
"uiRegisterControlType() with OS vtable with wrong size",
[](void) {
uiControlOSVtable vtable;
memset(&vtable, 0, sizeof (uiControlOSVtable));
vtable.Size = 1;
uiRegisterControlType("name", testVtable(), &vtable, 0);
},
"uiRegisterControlType(): wrong size 1 for uiControlOSVtable",
},
{ NULL, NULL, NULL },
};

View File

@ -22,7 +22,10 @@ elif libui_OS == 'darwin'
'controls_darwin_errors.m',
]
elif libui_OS == 'haiku'
# TODO
libui_test_sources += [
'controls_haiku.c',
'controls_haiku_errors.cpp',
]
else
libui_test_sources += [
'controls_unix.c',

3
test/test_haiku.h Normal file
View File

@ -0,0 +1,3 @@
// 18 january 2020
#define libuiOSHeader "../ui_haiku.h"
#include "test.h"