More TODO resolution.

This commit is contained in:
Pietro Gagliardi 2020-05-10 23:59:09 -04:00
parent e71c717b31
commit 9b1be0c77a
1 changed files with 18 additions and 3 deletions

View File

@ -295,8 +295,7 @@ Test(SetParentWithNullControlIsProgrammerError)
endCheckProgrammerError(ctx); endCheckProgrammerError(ctx);
} }
// TODO copy this test but first setting and then removing the parent first, instead of just testing the initial state Test(RemovingParentFromInitiallyParentlessControlIsProgrammerError)
Test(RemovingParentFromParentlessControlIsProgrammerError)
{ {
uiControl *c; uiControl *c;
void *ctx; void *ctx;
@ -308,6 +307,22 @@ Test(RemovingParentFromParentlessControlIsProgrammerError)
endCheckProgrammerError(ctx); endCheckProgrammerError(ctx);
} }
Test(RemovingParentFromExplicitlyParentlessControlIsProgrammerError)
{
uiControl *c, *d;
void *ctx;
ctx = beginCheckProgrammerError("uiControlSetParent(): cannot set a control with no parent to have no parent");
c = uiNewControl(testControlType(), NULL);
d = uiNewControl(testControlType(), NULL);
uiControlSetParent(c, d);
uiControlSetParent(c, NULL);
uiControlSetParent(c, NULL);
uiControlFree(c);
uiControlFree(d);
endCheckProgrammerError(ctx);
}
Test(ReparentingAlreadyParentedControlIsProgrammerError) Test(ReparentingAlreadyParentedControlIsProgrammerError)
{ {
uiControl *c, *d, *e; uiControl *c, *d, *e;
@ -332,7 +347,7 @@ Test(ReparentingAlreadyParentedControlIsProgrammerError)
endCheckProgrammerError(ctx); endCheckProgrammerError(ctx);
} }
// TODO define and then test the above but for the same parent // TODO document and then test the above but for the same parent
Test(GettingImplDataOfNullControlIsProgrammerError) Test(GettingImplDataOfNullControlIsProgrammerError)
{ {