Hi,
I attached a patch which makes 'FormatParam' a property of TTestRunner
instead of a variable defined in the implementation section.
This changes allows users to create descendant TTestRunner classes and
override the values of FormatParam, StyleSheet, ShowProcess etc... Or
give them preferred default values, if nothing was specified from the
command line.
PS:
Shouldn't we move ConsoleTestRunner to FPC instead of having it
defined in Lazarus?
Regards,
- Graeme -
_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/
Index: components/fpcunit/console/consoletestrunner.pas
===================================================================
--- components/fpcunit/console/consoletestrunner.pas (revision 13293)
+++ components/fpcunit/console/consoletestrunner.pas (working copy)
@@ -43,15 +43,17 @@
TTestRunner = class(TCustomApplication)
private
- FShowProgress: boolean;
- FFileName: string;
- FStyleSheet: string;
- FLongOpts: TStrings;
+ FShowProgress: boolean;
+ FFileName: string;
+ FStyleSheet: string;
+ FLongOpts: TStrings;
+ FFormatParam: TFormat;
protected
property FileName: string read FFileName write FFileName;
property LongOpts: TStrings read FLongOpts write FLongOpts;
property ShowProgress: boolean read FShowProgress write FShowProgress;
property StyleSheet: string read FStyleSheet write FStyleSheet;
+ property FormatParam: TFormat read FFormatParam write FFormatParam;
procedure DoRun; override;
procedure doTestRun(aTest: TTest); virtual;
function GetShortOpts: string; virtual;
@@ -129,8 +131,6 @@
// do nothing
end;
-var
- FormatParam: TFormat;
{$IFDEF VER2_0}
procedure TTestRunner.doTestRun(aTest: TTest);
var