ApplyToTests method |
Applies to
TDUnitDialog
Declaration
Procedure ApplyToTests(root :TTreeNode; const func :TTestFunc);Implementation
procedure TDUnitDialog.ApplyToTests(root :TTreeNode; const func :TTestFunc); procedure DoApply(root :TTreeNode); var test: ITest; node: TTreeNode; begin if root <> nil then begin test := NodeToTest(root); if func(test) then begin node := root.getFirstChild; while node <> nil do begin DoApply(node); node := node.getNextSibling; end; end; end; end; begin TestTree.Items.BeginUpdate; try DoApply(root) finally TestTree.Items.EndUpdate end; UpdateTestTreeState; End; |
|