diff options
author | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2008-07-08 15:03:09 +0000 |
---|---|---|
committer | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2008-07-08 15:03:09 +0000 |
commit | 5dfadf289e407c7d7b0d5baa3c7ac7f1da00f703 (patch) | |
tree | 7b3f7f593b720f8561a6c4c49f98bdb6870632a1 /examples | |
parent | 77f68d38a6dc24ec0679f7fd23bf42869e795313 (diff) | |
download | fpGUI-5dfadf289e407c7d7b0d5baa3c7ac7f1da00f703.tar.xz |
* GUI Test Runner
Diffstat (limited to 'examples')
-rw-r--r-- | examples/apps/fpcunit/guitestrunner.pas | 64 |
1 files changed, 58 insertions, 6 deletions
diff --git a/examples/apps/fpcunit/guitestrunner.pas b/examples/apps/fpcunit/guitestrunner.pas index 9fa1a60b..78227b5f 100644 --- a/examples/apps/fpcunit/guitestrunner.pas +++ b/examples/apps/fpcunit/guitestrunner.pas @@ -5,16 +5,33 @@ unit GuiTestRunner; interface uses - SysUtils, Classes, gfxbase, fpgfx, gui_edit, - gfx_widget, gui_form, gui_label, gui_button, + SysUtils, Classes, + // fpGUI toolkit + gfxbase, fpgfx, gui_edit, gfx_widget, gui_form, gui_label, gui_button, gui_listbox, gui_memo, gui_combobox, gui_basegrid, gui_grid, - gui_dialogs, gui_checkbox, gui_tree, gui_trackbar, - gui_progressbar, gui_radiobutton, gui_tab, gui_menu, - gui_panel, gui_popupcalendar, gui_gauge; + gui_dialogs, gui_checkbox, gui_tree, gui_trackbar, gui_progressbar, + gui_radiobutton, gui_tab, gui_menu, gui_panel, gui_popupcalendar, + gui_gauge, + // FPCUnit support + fpcunit, testregistry; type - TGUITestRunnerForm = class(TfpgForm) + TGUITestRunnerForm = class(TfpgForm, ITestListener) + private + failureCounter: Integer; + errorCounter: Integer; + testsCounter: Integer; + skipsCounter: Integer; + // ITestListener + procedure AddFailure(ATest: TTest; AFailure: TTestFailure); + procedure AddError(ATest: TTest; AError: TTestFailure); + procedure StartTest(ATest: TTest); + procedure EndTest(ATest: TTest); + procedure StartTestSuite(ATestSuite: TTestSuite); + procedure EndTestSuite(ATestSuite: TTestSuite); + // + procedure MemoLog(LogEntry: string); public {@VFD_HEAD_BEGIN: GUITestRunnerForm} pbName1: TfpgProgressBar; @@ -40,6 +57,41 @@ implementation {@VFD_NEWFORM_IMPL} +procedure TGUITestRunnerForm.AddFailure(ATest: TTest; AFailure: TTestFailure); +begin + +end; + +procedure TGUITestRunnerForm.AddError(ATest: TTest; AError: TTestFailure); +begin + +end; + +procedure TGUITestRunnerForm.StartTest(ATest: TTest); +begin + +end; + +procedure TGUITestRunnerForm.EndTest(ATest: TTest); +begin + +end; + +procedure TGUITestRunnerForm.StartTestSuite(ATestSuite: TTestSuite); +begin + +end; + +procedure TGUITestRunnerForm.EndTestSuite(ATestSuite: TTestSuite); +begin + +end; + +procedure TGUITestRunnerForm.MemoLog(LogEntry: string); +begin + memName1.Lines.Add(TimeToStr(Now) + ' - ' + LogEntry); +end; + procedure TGUITestRunnerForm.AfterCreate; begin {@VFD_BODY_BEGIN: GUITestRunnerForm} |