Workaround for now. I should have specified in the bug that I overlooked it because my version of clang seems to use C99 for Objective-C by default, but not for Objective-C++. I'll do that when I'm next online. Anyway, now to write uiControl functionality tests.
This commit is contained in:
parent
517791f04e
commit
a907353c9c
|
@ -0,0 +1,22 @@
|
||||||
|
// 16 june 2019
|
||||||
|
#import "test_darwin.h"
|
||||||
|
|
||||||
|
// TODO move this back to C++ once https://github.com/mesonbuild/meson/issues/5495 is resolved
|
||||||
|
|
||||||
|
static void doRCTWrongSizeTest(void)
|
||||||
|
{
|
||||||
|
uiControlOSVtable vtable;
|
||||||
|
|
||||||
|
memset(&vtable, 0, sizeof (uiControlOSVtable));
|
||||||
|
vtable.Size = 1;
|
||||||
|
uiRegisterControlType("name", testVtable(), &vtable, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
const struct checkErrorCase controlOSVtableCases[] = {
|
||||||
|
{
|
||||||
|
"uiRegisterControlType() with OS vtable with wrong size",
|
||||||
|
doRCTWrongSizeTest,
|
||||||
|
"uiRegisterControlType(): wrong size 1 for uiControlOSVtable",
|
||||||
|
},
|
||||||
|
{ NULL, NULL, NULL },
|
||||||
|
};
|
|
@ -1,17 +0,0 @@
|
||||||
// 16 june 2019
|
|
||||||
#import "test_darwin.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 },
|
|
||||||
};
|
|
|
@ -16,11 +16,9 @@ if libui_OS == 'windows'
|
||||||
'controls_windows.c',
|
'controls_windows.c',
|
||||||
]
|
]
|
||||||
elif libui_OS == 'darwin'
|
elif libui_OS == 'darwin'
|
||||||
add_languages('objcpp',
|
|
||||||
required: true)
|
|
||||||
libui_test_sources += [
|
libui_test_sources += [
|
||||||
'controls_darwin.m',
|
'controls_darwin.m',
|
||||||
'controls_darwin_errors.mm',
|
'controls_darwin_errors.m',
|
||||||
]
|
]
|
||||||
else
|
else
|
||||||
libui_test_sources += [
|
libui_test_sources += [
|
||||||
|
|
Loading…
Reference in New Issue