diff --git a/redo/test/main.c b/redo/test/main.c index 0cccaa7b..4ebae7ce 100644 --- a/redo/test/main.c +++ b/redo/test/main.c @@ -33,6 +33,9 @@ int onShouldQuit(void *data) uiBox *mainBox; uiTab *mainTab; +uiBox *(*newhbox)(void); +uiBox *(*newvbox)(void); + int main(int argc, char *argv[]) { uiInitOptions o; @@ -42,11 +45,17 @@ int main(int argc, char *argv[]) uiBox *page2, *page3, *page4, *page5; int nomenus = 0; + newhbox = uiNewHorizontalBox; + newvbox = uiNewVerticalBox; + memset(&o, 0, sizeof (uiInitOptions)); for (i = 1; i < argc; i++) if (strcmp(argv[i], "nomenus") == 0) nomenus = 1; - else { + else if (strcmp(argv[i], "swaphv") == 0) { + newhbox = uiNewVerticalBox; + newvbox = uiNewHorizontalBox; + } else { fprintf(stderr, "%s: unrecognized option %s\n", argv[0], argv[i]); return 1; } diff --git a/redo/test/page3.c b/redo/test/page3.c index b9b20605..1f229e93 100644 --- a/redo/test/page3.c +++ b/redo/test/page3.c @@ -8,7 +8,7 @@ static uiBox *makeSet(int omit, int hidden, int stretch) // don't use newHorizontalBox() // the point of this test is to test hidden controls and padded - hbox = uiNewHorizontalBox(); + hbox = (*newhbox)(); uiBoxSetPadded(hbox, 1); if (omit != 0) { buttons[0] = uiNewButton("First"); @@ -44,8 +44,8 @@ uiBox *makePage3(void) // first the non-stretchy type for (hidden = 0; hidden < 4; hidden++) { // these two must stay unpadded as well, otherwise the test isn't meaningful - hbox2 = uiNewHorizontalBox(); - vbox = uiNewVerticalBox(); + hbox2 = (*newhbox)(); + vbox = (*newvbox)(); // reference set hbox = makeSet(hidden, -1, 0); uiBoxAppend(vbox, uiControl(hbox), 0); diff --git a/redo/test/spaced.c b/redo/test/spaced.c index 24a11d17..193c2764 100644 --- a/redo/test/spaced.c +++ b/redo/test/spaced.c @@ -108,7 +108,7 @@ uiBox *newHorizontalBox(void) { uiBox *b; - b = uiNewHorizontalBox(); + b = (*newhbox)(); append(b, box); return b; } @@ -117,7 +117,7 @@ uiBox *newVerticalBox(void) { uiBox *b; - b = uiNewVerticalBox(); + b = (*newvbox)(); append(b, box); return b; } diff --git a/redo/test/test.h b/redo/test/test.h index 70164105..2368d30c 100644 --- a/redo/test/test.h +++ b/redo/test/test.h @@ -10,6 +10,8 @@ extern void die(const char *, ...); extern uiBox *mainBox; extern uiTab *mainTab; +extern uiBox *(*newhbox)(void); +extern uiBox *(*newvbox)(void); // spaced.c extern void setSpaced(int);