Browse Source

+ Patch from Graeme Geldenhuys: New testlistener

git-svn-id: trunk@3997 -
michael 19 years ago
parent
commit
358b453f7b
3 changed files with 88 additions and 58 deletions
  1. 64 41
      fcl/fpcunit/Makefile
  2. 1 1
      fcl/fpcunit/Makefile.fpc
  3. 23 16
      fcl/fpcunit/demo/consolerunner/testrunner.pp

+ 64 - 41
fcl/fpcunit/Makefile

@@ -1,8 +1,8 @@
 #
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2006/04/23]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2006/06/12]
 #
 #
 default: all
 default: all
-MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos powerpc-linux powerpc-netbsd powerpc-macos powerpc-darwin powerpc-morphos sparc-linux sparc-netbsd sparc-solaris x86_64-linux x86_64-freebsd x86_64-win64 arm-linux arm-palmos arm-wince powerpc64-linux
+MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos powerpc-linux powerpc-netbsd powerpc-macos powerpc-darwin powerpc-morphos sparc-linux sparc-netbsd sparc-solaris x86_64-linux x86_64-freebsd x86_64-win64 arm-linux arm-palmos arm-wince arm-gba powerpc64-linux
 BSDs = freebsd netbsd openbsd darwin
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
 LIMIT83fs = go32v2 os2 emx watcom
@@ -233,121 +233,124 @@ PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages/base $(FPCDIR)/packages/ext
 override PACKAGE_NAME=fcl
 override PACKAGE_NAME=fcl
 PACKAGEDIR_MAIN:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /fcl/Makefile.fpc,$(PACKAGESDIR))))))
 PACKAGEDIR_MAIN:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /fcl/Makefile.fpc,$(PACKAGESDIR))))))
 ifeq ($(FULL_TARGET),i386-linux)
 ifeq ($(FULL_TARGET),i386-linux)
-override TARGET_UNITS+=fpcunit  testregistry  testreport testutils testdecorator ubmockobject
+override TARGET_UNITS+=fpcunit testregistry testreport testutils testdecorator ubmockobject xmlreporter
 endif
 endif
 ifeq ($(FULL_TARGET),i386-go32v2)
 ifeq ($(FULL_TARGET),i386-go32v2)
-override TARGET_UNITS+=fpcunit  testregistry  testreport testutils testdecorator ubmockobject
+override TARGET_UNITS+=fpcunit testregistry testreport testutils testdecorator ubmockobject xmlreporter
 endif
 endif
 ifeq ($(FULL_TARGET),i386-win32)
 ifeq ($(FULL_TARGET),i386-win32)
-override TARGET_UNITS+=fpcunit  testregistry  testreport testutils testdecorator ubmockobject
+override TARGET_UNITS+=fpcunit testregistry testreport testutils testdecorator ubmockobject xmlreporter
 endif
 endif
 ifeq ($(FULL_TARGET),i386-os2)
 ifeq ($(FULL_TARGET),i386-os2)
-override TARGET_UNITS+=fpcunit  testregistry  testreport testutils testdecorator ubmockobject
+override TARGET_UNITS+=fpcunit testregistry testreport testutils testdecorator ubmockobject xmlreporter
 endif
 endif
 ifeq ($(FULL_TARGET),i386-freebsd)
 ifeq ($(FULL_TARGET),i386-freebsd)
-override TARGET_UNITS+=fpcunit  testregistry  testreport testutils testdecorator ubmockobject
+override TARGET_UNITS+=fpcunit testregistry testreport testutils testdecorator ubmockobject xmlreporter
 endif
 endif
 ifeq ($(FULL_TARGET),i386-beos)
 ifeq ($(FULL_TARGET),i386-beos)
-override TARGET_UNITS+=fpcunit  testregistry  testreport testutils testdecorator ubmockobject
+override TARGET_UNITS+=fpcunit testregistry testreport testutils testdecorator ubmockobject xmlreporter
 endif
 endif
 ifeq ($(FULL_TARGET),i386-netbsd)
 ifeq ($(FULL_TARGET),i386-netbsd)
-override TARGET_UNITS+=fpcunit  testregistry  testreport testutils testdecorator ubmockobject
+override TARGET_UNITS+=fpcunit testregistry testreport testutils testdecorator ubmockobject xmlreporter
 endif
 endif
 ifeq ($(FULL_TARGET),i386-solaris)
 ifeq ($(FULL_TARGET),i386-solaris)
-override TARGET_UNITS+=fpcunit  testregistry  testreport testutils testdecorator ubmockobject
+override TARGET_UNITS+=fpcunit testregistry testreport testutils testdecorator ubmockobject xmlreporter
 endif
 endif
 ifeq ($(FULL_TARGET),i386-qnx)
 ifeq ($(FULL_TARGET),i386-qnx)
-override TARGET_UNITS+=fpcunit  testregistry  testreport testutils testdecorator ubmockobject
+override TARGET_UNITS+=fpcunit testregistry testreport testutils testdecorator ubmockobject xmlreporter
 endif
 endif
 ifeq ($(FULL_TARGET),i386-netware)
 ifeq ($(FULL_TARGET),i386-netware)
-override TARGET_UNITS+=fpcunit  testregistry  testreport testutils testdecorator ubmockobject
+override TARGET_UNITS+=fpcunit testregistry testreport testutils testdecorator ubmockobject xmlreporter
 endif
 endif
 ifeq ($(FULL_TARGET),i386-openbsd)
 ifeq ($(FULL_TARGET),i386-openbsd)
-override TARGET_UNITS+=fpcunit  testregistry  testreport testutils testdecorator ubmockobject
+override TARGET_UNITS+=fpcunit testregistry testreport testutils testdecorator ubmockobject xmlreporter
 endif
 endif
 ifeq ($(FULL_TARGET),i386-wdosx)
 ifeq ($(FULL_TARGET),i386-wdosx)
-override TARGET_UNITS+=fpcunit  testregistry  testreport testutils testdecorator ubmockobject
+override TARGET_UNITS+=fpcunit testregistry testreport testutils testdecorator ubmockobject xmlreporter
 endif
 endif
 ifeq ($(FULL_TARGET),i386-darwin)
 ifeq ($(FULL_TARGET),i386-darwin)
-override TARGET_UNITS+=fpcunit  testregistry  testreport testutils testdecorator ubmockobject
+override TARGET_UNITS+=fpcunit testregistry testreport testutils testdecorator ubmockobject xmlreporter
 endif
 endif
 ifeq ($(FULL_TARGET),i386-emx)
 ifeq ($(FULL_TARGET),i386-emx)
-override TARGET_UNITS+=fpcunit  testregistry  testreport testutils testdecorator ubmockobject
+override TARGET_UNITS+=fpcunit testregistry testreport testutils testdecorator ubmockobject xmlreporter
 endif
 endif
 ifeq ($(FULL_TARGET),i386-watcom)
 ifeq ($(FULL_TARGET),i386-watcom)
-override TARGET_UNITS+=fpcunit  testregistry  testreport testutils testdecorator ubmockobject
+override TARGET_UNITS+=fpcunit testregistry testreport testutils testdecorator ubmockobject xmlreporter
 endif
 endif
 ifeq ($(FULL_TARGET),i386-netwlibc)
 ifeq ($(FULL_TARGET),i386-netwlibc)
-override TARGET_UNITS+=fpcunit  testregistry  testreport testutils testdecorator ubmockobject
+override TARGET_UNITS+=fpcunit testregistry testreport testutils testdecorator ubmockobject xmlreporter
 endif
 endif
 ifeq ($(FULL_TARGET),i386-wince)
 ifeq ($(FULL_TARGET),i386-wince)
-override TARGET_UNITS+=fpcunit  testregistry  testreport testutils testdecorator ubmockobject
+override TARGET_UNITS+=fpcunit testregistry testreport testutils testdecorator ubmockobject xmlreporter
 endif
 endif
 ifeq ($(FULL_TARGET),m68k-linux)
 ifeq ($(FULL_TARGET),m68k-linux)
-override TARGET_UNITS+=fpcunit  testregistry  testreport testutils testdecorator ubmockobject
+override TARGET_UNITS+=fpcunit testregistry testreport testutils testdecorator ubmockobject xmlreporter
 endif
 endif
 ifeq ($(FULL_TARGET),m68k-freebsd)
 ifeq ($(FULL_TARGET),m68k-freebsd)
-override TARGET_UNITS+=fpcunit  testregistry  testreport testutils testdecorator ubmockobject
+override TARGET_UNITS+=fpcunit testregistry testreport testutils testdecorator ubmockobject xmlreporter
 endif
 endif
 ifeq ($(FULL_TARGET),m68k-netbsd)
 ifeq ($(FULL_TARGET),m68k-netbsd)
-override TARGET_UNITS+=fpcunit  testregistry  testreport testutils testdecorator ubmockobject
+override TARGET_UNITS+=fpcunit testregistry testreport testutils testdecorator ubmockobject xmlreporter
 endif
 endif
 ifeq ($(FULL_TARGET),m68k-amiga)
 ifeq ($(FULL_TARGET),m68k-amiga)
-override TARGET_UNITS+=fpcunit  testregistry  testreport testutils testdecorator ubmockobject
+override TARGET_UNITS+=fpcunit testregistry testreport testutils testdecorator ubmockobject xmlreporter
 endif
 endif
 ifeq ($(FULL_TARGET),m68k-atari)
 ifeq ($(FULL_TARGET),m68k-atari)
-override TARGET_UNITS+=fpcunit  testregistry  testreport testutils testdecorator ubmockobject
+override TARGET_UNITS+=fpcunit testregistry testreport testutils testdecorator ubmockobject xmlreporter
 endif
 endif
 ifeq ($(FULL_TARGET),m68k-openbsd)
 ifeq ($(FULL_TARGET),m68k-openbsd)
-override TARGET_UNITS+=fpcunit  testregistry  testreport testutils testdecorator ubmockobject
+override TARGET_UNITS+=fpcunit testregistry testreport testutils testdecorator ubmockobject xmlreporter
 endif
 endif
 ifeq ($(FULL_TARGET),m68k-palmos)
 ifeq ($(FULL_TARGET),m68k-palmos)
-override TARGET_UNITS+=fpcunit  testregistry  testreport testutils testdecorator ubmockobject
+override TARGET_UNITS+=fpcunit testregistry testreport testutils testdecorator ubmockobject xmlreporter
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc-linux)
 ifeq ($(FULL_TARGET),powerpc-linux)
-override TARGET_UNITS+=fpcunit  testregistry  testreport testutils testdecorator ubmockobject
+override TARGET_UNITS+=fpcunit testregistry testreport testutils testdecorator ubmockobject xmlreporter
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc-netbsd)
 ifeq ($(FULL_TARGET),powerpc-netbsd)
-override TARGET_UNITS+=fpcunit  testregistry  testreport testutils testdecorator ubmockobject
+override TARGET_UNITS+=fpcunit testregistry testreport testutils testdecorator ubmockobject xmlreporter
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc-macos)
 ifeq ($(FULL_TARGET),powerpc-macos)
-override TARGET_UNITS+=fpcunit  testregistry  testreport testutils testdecorator ubmockobject
+override TARGET_UNITS+=fpcunit testregistry testreport testutils testdecorator ubmockobject xmlreporter
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc-darwin)
 ifeq ($(FULL_TARGET),powerpc-darwin)
-override TARGET_UNITS+=fpcunit  testregistry  testreport testutils testdecorator ubmockobject
+override TARGET_UNITS+=fpcunit testregistry testreport testutils testdecorator ubmockobject xmlreporter
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc-morphos)
 ifeq ($(FULL_TARGET),powerpc-morphos)
-override TARGET_UNITS+=fpcunit  testregistry  testreport testutils testdecorator ubmockobject
+override TARGET_UNITS+=fpcunit testregistry testreport testutils testdecorator ubmockobject xmlreporter
 endif
 endif
 ifeq ($(FULL_TARGET),sparc-linux)
 ifeq ($(FULL_TARGET),sparc-linux)
-override TARGET_UNITS+=fpcunit  testregistry  testreport testutils testdecorator ubmockobject
+override TARGET_UNITS+=fpcunit testregistry testreport testutils testdecorator ubmockobject xmlreporter
 endif
 endif
 ifeq ($(FULL_TARGET),sparc-netbsd)
 ifeq ($(FULL_TARGET),sparc-netbsd)
-override TARGET_UNITS+=fpcunit  testregistry  testreport testutils testdecorator ubmockobject
+override TARGET_UNITS+=fpcunit testregistry testreport testutils testdecorator ubmockobject xmlreporter
 endif
 endif
 ifeq ($(FULL_TARGET),sparc-solaris)
 ifeq ($(FULL_TARGET),sparc-solaris)
-override TARGET_UNITS+=fpcunit  testregistry  testreport testutils testdecorator ubmockobject
+override TARGET_UNITS+=fpcunit testregistry testreport testutils testdecorator ubmockobject xmlreporter
 endif
 endif
 ifeq ($(FULL_TARGET),x86_64-linux)
 ifeq ($(FULL_TARGET),x86_64-linux)
-override TARGET_UNITS+=fpcunit  testregistry  testreport testutils testdecorator ubmockobject
+override TARGET_UNITS+=fpcunit testregistry testreport testutils testdecorator ubmockobject xmlreporter
 endif
 endif
 ifeq ($(FULL_TARGET),x86_64-freebsd)
 ifeq ($(FULL_TARGET),x86_64-freebsd)
-override TARGET_UNITS+=fpcunit  testregistry  testreport testutils testdecorator ubmockobject
+override TARGET_UNITS+=fpcunit testregistry testreport testutils testdecorator ubmockobject xmlreporter
 endif
 endif
 ifeq ($(FULL_TARGET),x86_64-win64)
 ifeq ($(FULL_TARGET),x86_64-win64)
-override TARGET_UNITS+=fpcunit  testregistry  testreport testutils testdecorator ubmockobject
+override TARGET_UNITS+=fpcunit testregistry testreport testutils testdecorator ubmockobject xmlreporter
 endif
 endif
 ifeq ($(FULL_TARGET),arm-linux)
 ifeq ($(FULL_TARGET),arm-linux)
-override TARGET_UNITS+=fpcunit  testregistry  testreport testutils testdecorator ubmockobject
+override TARGET_UNITS+=fpcunit testregistry testreport testutils testdecorator ubmockobject xmlreporter
 endif
 endif
 ifeq ($(FULL_TARGET),arm-palmos)
 ifeq ($(FULL_TARGET),arm-palmos)
-override TARGET_UNITS+=fpcunit  testregistry  testreport testutils testdecorator ubmockobject
+override TARGET_UNITS+=fpcunit testregistry testreport testutils testdecorator ubmockobject xmlreporter
 endif
 endif
 ifeq ($(FULL_TARGET),arm-wince)
 ifeq ($(FULL_TARGET),arm-wince)
-override TARGET_UNITS+=fpcunit  testregistry  testreport testutils testdecorator ubmockobject
+override TARGET_UNITS+=fpcunit testregistry testreport testutils testdecorator ubmockobject xmlreporter
+endif
+ifeq ($(FULL_TARGET),arm-gba)
+override TARGET_UNITS+=fpcunit testregistry testreport testutils testdecorator ubmockobject xmlreporter
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
-override TARGET_UNITS+=fpcunit  testregistry  testreport testutils testdecorator ubmockobject
+override TARGET_UNITS+=fpcunit testregistry testreport testutils testdecorator ubmockobject xmlreporter
 endif
 endif
 ifeq ($(FULL_TARGET),i386-linux)
 ifeq ($(FULL_TARGET),i386-linux)
 override TARGET_EXAMPLEDIRS+=exampletests
 override TARGET_EXAMPLEDIRS+=exampletests
@@ -463,6 +466,9 @@ endif
 ifeq ($(FULL_TARGET),arm-wince)
 ifeq ($(FULL_TARGET),arm-wince)
 override TARGET_EXAMPLEDIRS+=exampletests
 override TARGET_EXAMPLEDIRS+=exampletests
 endif
 endif
+ifeq ($(FULL_TARGET),arm-gba)
+override TARGET_EXAMPLEDIRS+=exampletests
+endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override TARGET_EXAMPLEDIRS+=exampletests
 override TARGET_EXAMPLEDIRS+=exampletests
 endif
 endif
@@ -581,6 +587,9 @@ endif
 ifeq ($(FULL_TARGET),arm-wince)
 ifeq ($(FULL_TARGET),arm-wince)
 override COMPILER_OPTIONS+=-S2h
 override COMPILER_OPTIONS+=-S2h
 endif
 endif
+ifeq ($(FULL_TARGET),arm-gba)
+override COMPILER_OPTIONS+=-S2h
+endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override COMPILER_OPTIONS+=-S2h
 override COMPILER_OPTIONS+=-S2h
 endif
 endif
@@ -698,6 +707,9 @@ endif
 ifeq ($(FULL_TARGET),arm-wince)
 ifeq ($(FULL_TARGET),arm-wince)
 override COMPILER_TARGETDIR+=.
 override COMPILER_TARGETDIR+=.
 endif
 endif
+ifeq ($(FULL_TARGET),arm-gba)
+override COMPILER_TARGETDIR+=.
+endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 override COMPILER_TARGETDIR+=.
 override COMPILER_TARGETDIR+=.
 endif
 endif
@@ -1022,6 +1034,11 @@ EXEEXT=
 HASSHAREDLIB=1
 HASSHAREDLIB=1
 SHORTSUFFIX=dwn
 SHORTSUFFIX=dwn
 endif
 endif
+ifeq ($(OS_TARGET),gba)
+EXEEXT=.gba
+SHAREDLIBEXT=.so
+SHORTSUFFIX=gba
+endif
 else
 else
 ifeq ($(OS_TARGET),go32v1)
 ifeq ($(OS_TARGET),go32v1)
 PPUEXT=.pp1
 PPUEXT=.pp1
@@ -1554,6 +1571,9 @@ endif
 ifeq ($(FULL_TARGET),arm-wince)
 ifeq ($(FULL_TARGET),arm-wince)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 endif
 endif
+ifeq ($(FULL_TARGET),arm-gba)
+REQUIRE_PACKAGES_RTL=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 endif
 endif
@@ -2186,6 +2206,9 @@ endif
 ifeq ($(FULL_TARGET),arm-wince)
 ifeq ($(FULL_TARGET),arm-wince)
 TARGET_EXAMPLEDIRS_EXAMPLETESTS=1
 TARGET_EXAMPLEDIRS_EXAMPLETESTS=1
 endif
 endif
+ifeq ($(FULL_TARGET),arm-gba)
+TARGET_EXAMPLEDIRS_EXAMPLETESTS=1
+endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
 TARGET_EXAMPLEDIRS_EXAMPLETESTS=1
 TARGET_EXAMPLEDIRS_EXAMPLETESTS=1
 endif
 endif

+ 1 - 1
fcl/fpcunit/Makefile.fpc

@@ -6,7 +6,7 @@
 main=fcl
 main=fcl
 
 
 [target]
 [target]
-units=fpcunit  testregistry  testreport testutils testdecorator ubmockobject
+units=fpcunit testregistry testreport testutils testdecorator ubmockobject xmlreporter
 exampledirs=exampletests
 exampledirs=exampletests
 
 
 [compiler]
 [compiler]

+ 23 - 16
fcl/fpcunit/demo/consolerunner/testrunner.pp

@@ -1,5 +1,3 @@
-{$mode objfpc}
-{$h+}
 {
 {
     This file is part of the Free Component Library (FCL)
     This file is part of the Free Component Library (FCL)
     Copyright (c) 2004 by Dean Zobec, Michael Van Canneyt
     Copyright (c) 2004 by Dean Zobec, Michael Van Canneyt
@@ -12,28 +10,33 @@
     This program is distributed in the hope that it will be useful,
     This program is distributed in the hope that it will be useful,
     but WITHOUT ANY WARRANTY; without even the implied warranty of
     but WITHOUT ANY WARRANTY; without even the implied warranty of
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- **********************************************************************}
+}
 program testrunner;
 program testrunner;
+
+{$mode objfpc}
+{$h+}
+
 uses
 uses
-  custapp, classes, SysUtils, fpcunit, suiteconfig, testreport, testregistry;
+  custapp, Classes, SysUtils, fpcunit, suiteconfig, xmlreporter, testregistry;
+
 
 
-Const
+const
   ShortOpts = 'alh';
   ShortOpts = 'alh';
-  Longopts : Array[1..5] of String = (
+  Longopts: Array[1..5] of String = (
     'all','list','format:','suite:','help');
     'all','list','format:','suite:','help');
-  Version = 'Version 0.1';
+  Version = 'Version 0.2';
 
 
-Type
+
+type
   TTestRunner = Class(TCustomApplication)
   TTestRunner = Class(TCustomApplication)
   private
   private
     FXMLResultsWriter: TXMLResultsWriter;
     FXMLResultsWriter: TXMLResultsWriter;
   protected
   protected
-    procedure DoRun ; Override;
-    procedure doTestRun(aTest: TTest); virtual;
+    procedure   DoRun ; Override;
+    procedure   doTestRun(aTest: TTest); virtual;
   public
   public
     constructor Create(AOwner: TComponent); override;
     constructor Create(AOwner: TComponent); override;
-    destructor Destroy; override;
+    destructor  Destroy; override;
   end;
   end;
 
 
 
 
@@ -43,11 +46,13 @@ begin
   FXMLResultsWriter := TXMLResultsWriter.Create;
   FXMLResultsWriter := TXMLResultsWriter.Create;
 end;
 end;
 
 
+
 destructor TTestRunner.Destroy;
 destructor TTestRunner.Destroy;
 begin
 begin
   FXMLResultsWriter.Free;
   FXMLResultsWriter.Free;
 end;
 end;
 
 
+
 procedure TTestRunner.doTestRun(aTest: TTest);
 procedure TTestRunner.doTestRun(aTest: TTest);
 var
 var
   testResult: TTestResult;
   testResult: TTestResult;
@@ -55,7 +60,6 @@ begin
   testResult := TTestResult.Create;
   testResult := TTestResult.Create;
   try
   try
     testResult.AddListener(FXMLResultsWriter);
     testResult.AddListener(FXMLResultsWriter);
-    FXMLResultsWriter.WriteHeader;
     aTest.Run(testResult);
     aTest.Run(testResult);
     FXMLResultsWriter.WriteResult(testResult);
     FXMLResultsWriter.WriteResult(testResult);
   finally
   finally
@@ -63,6 +67,7 @@ begin
   end;
   end;
 end;
 end;
 
 
+
 procedure TTestRunner.DoRun;
 procedure TTestRunner.DoRun;
 var
 var
   I : Integer;
   I : Integer;
@@ -119,13 +124,15 @@ begin
 end;
 end;
 
 
 
 
-Var
-  App : TTestRunner;
+var
+  App: TTestRunner;
+
 
 
 begin
 begin
-  App:=TTestRunner.Create(Nil);
+  App := TTestRunner.Create(nil);
   App.Initialize;
   App.Initialize;
   App.Title := 'FPCUnit Console Test Case runner.';
   App.Title := 'FPCUnit Console Test Case runner.';
   App.Run;
   App.Run;
   App.Free;
   App.Free;
 end.
 end.
+