Started tests for truly empty uiGroups and uiTabs; started banning NULL in uiBox.

This commit is contained in:
Pietro Gagliardi 2016-05-14 21:53:24 -04:00
parent 79a522efb3
commit 0e785d886b
4 changed files with 16 additions and 1 deletions

View File

@ -404,6 +404,9 @@ uiDarwinControlDefaultSetHuggingPriority(uiBox, view)
void uiBoxAppend(uiBox *b, uiControl *c, int stretchy)
{
// TODO on other platforms
if (c == NULL)
userbug("You cannot add NULL to a uiBox.");
[b->view append:c stretchy:stretchy];
}

View File

@ -17,6 +17,7 @@ CFILES += \
test/page8.c \
test/page9.c \
test/page10.c \
test/page11.c \
test/spaced.c
HFILES += \

View File

@ -45,7 +45,9 @@ int main(int argc, char *argv[])
int i;
const char *err;
uiWindow *w;
uiBox *page2, *page3, *page4, *page5, *page6, *page7, *page8, *page9, *page10;
uiBox *page2, *page3, *page4, *page5;
uiBox *page6, *page7, *page8, *page9, *page10;
uiBox *page11;
uiTab *outerTab;
uiTab *innerTab;
int nomenus = 0;
@ -130,6 +132,12 @@ int main(int argc, char *argv[])
page10 = makePage10();
uiTabAppend(innerTab, "Page 10", uiControl(page10));
innerTab = newTab();
uiTabAppend(outerTab, "Pages 11-?", uiControl(innerTab));
page11 = makePage11();
uiTabAppend(innerTab, "Page 11", uiControl(page11));
if (startspaced)
setSpaced(1);

View File

@ -74,3 +74,6 @@ extern uiBox *makePage9(void);
// page10.c
extern uiBox *makePage10(void);
// page11.c
extern uiBox *makePage11(void);