Browse Source

* Dotted filenames for package fcl-fpcunit

Michaël Van Canneyt 2 năm trước cách đây
mục cha
commit
dc88694c7f
42 tập tin đã thay đổi với 297 bổ sung17 xóa
  1. 3 0
      packages/fcl-fpcunit/namespaced/FpcUnit.Decorator.pp
  2. 3 0
      packages/fcl-fpcunit/namespaced/FpcUnit.Money.pp
  3. 3 0
      packages/fcl-fpcunit/namespaced/FpcUnit.Registry.pp
  4. 3 0
      packages/fcl-fpcunit/namespaced/FpcUnit.Report.pp
  5. 3 0
      packages/fcl-fpcunit/namespaced/FpcUnit.Reports.Digest.pp
  6. 3 0
      packages/fcl-fpcunit/namespaced/FpcUnit.Reports.JUnit.pp
  7. 3 0
      packages/fcl-fpcunit/namespaced/FpcUnit.Reports.LaTeX.pp
  8. 3 0
      packages/fcl-fpcunit/namespaced/FpcUnit.Reports.Plain.pp
  9. 3 0
      packages/fcl-fpcunit/namespaced/FpcUnit.Reports.XML.pas
  10. 3 0
      packages/fcl-fpcunit/namespaced/FpcUnit.Reports.XMLTest.pp
  11. 3 0
      packages/fcl-fpcunit/namespaced/FpcUnit.Reports.pp
  12. 3 0
      packages/fcl-fpcunit/namespaced/FpcUnit.Runners.Console.pas
  13. 3 0
      packages/fcl-fpcunit/namespaced/FpcUnit.Runners.Simple.pas
  14. 3 0
      packages/fcl-fpcunit/namespaced/FpcUnit.Test.pp
  15. 3 0
      packages/fcl-fpcunit/namespaced/FpcUnit.Tests.Money.pp
  16. 3 0
      packages/fcl-fpcunit/namespaced/FpcUnit.Tests.Unittests.pp
  17. 3 0
      packages/fcl-fpcunit/namespaced/FpcUnit.Ubmockobject.pp
  18. 3 0
      packages/fcl-fpcunit/namespaced/FpcUnit.Utils.pp
  19. 23 0
      packages/fcl-fpcunit/namespaces.lst
  20. 13 0
      packages/fcl-fpcunit/src/consoletestrunner.pas
  21. 23 5
      packages/fcl-fpcunit/src/digesttestreport.pp
  22. 8 1
      packages/fcl-fpcunit/src/exampletests/fpcunittests.pp
  23. 7 0
      packages/fcl-fpcunit/src/exampletests/money.pp
  24. 7 0
      packages/fcl-fpcunit/src/exampletests/moneytest.pp
  25. 4 0
      packages/fcl-fpcunit/src/exampletests/needassert.pp
  26. 7 0
      packages/fcl-fpcunit/src/exampletests/testmockobject.pp
  27. 14 0
      packages/fcl-fpcunit/src/fpcunit.pp
  28. 8 1
      packages/fcl-fpcunit/src/fpcunitreport.pp
  29. 10 1
      packages/fcl-fpcunit/src/junittestreport.pp
  30. 14 3
      packages/fcl-fpcunit/src/latextestreport.pp
  31. 12 1
      packages/fcl-fpcunit/src/plaintestreport.pp
  32. 8 0
      packages/fcl-fpcunit/src/simpletestrunner.pas
  33. 7 0
      packages/fcl-fpcunit/src/testdecorator.pp
  34. 13 0
      packages/fcl-fpcunit/src/testregistry.pp
  35. 8 1
      packages/fcl-fpcunit/src/testreport.pp
  36. 5 0
      packages/fcl-fpcunit/src/tests/asserttest.pp
  37. 9 0
      packages/fcl-fpcunit/src/tests/frameworktest.pp
  38. 5 0
      packages/fcl-fpcunit/src/tests/suitetest.pp
  39. 7 0
      packages/fcl-fpcunit/src/testutils.pp
  40. 7 0
      packages/fcl-fpcunit/src/ubmockobject.pp
  41. 14 1
      packages/fcl-fpcunit/src/xmlreporter.pas
  42. 10 3
      packages/fcl-fpcunit/src/xmltestreport.pp

+ 3 - 0
packages/fcl-fpcunit/namespaced/FpcUnit.Decorator.pp

@@ -0,0 +1,3 @@
+unit FpcUnit.Decorator;
+{$DEFINE FPC_DOTTEDUNITS}
+{$i testdecorator.pp}

+ 3 - 0
packages/fcl-fpcunit/namespaced/FpcUnit.Money.pp

@@ -0,0 +1,3 @@
+unit FpcUnit.Money;
+{$DEFINE FPC_DOTTEDUNITS}
+{$i money.pp}

+ 3 - 0
packages/fcl-fpcunit/namespaced/FpcUnit.Registry.pp

@@ -0,0 +1,3 @@
+unit FpcUnit.Registry;
+{$DEFINE FPC_DOTTEDUNITS}
+{$i testregistry.pp}

+ 3 - 0
packages/fcl-fpcunit/namespaced/FpcUnit.Report.pp

@@ -0,0 +1,3 @@
+unit FpcUnit.Report;
+{$DEFINE FPC_DOTTEDUNITS}
+{$i testreport.pp}

+ 3 - 0
packages/fcl-fpcunit/namespaced/FpcUnit.Reports.Digest.pp

@@ -0,0 +1,3 @@
+unit FpcUnit.Reports.Digest;
+{$DEFINE FPC_DOTTEDUNITS}
+{$i digesttestreport.pp}

+ 3 - 0
packages/fcl-fpcunit/namespaced/FpcUnit.Reports.JUnit.pp

@@ -0,0 +1,3 @@
+unit FpcUnit.Reports.JUnit;
+{$DEFINE FPC_DOTTEDUNITS}
+{$i junittestreport.pp}

+ 3 - 0
packages/fcl-fpcunit/namespaced/FpcUnit.Reports.LaTeX.pp

@@ -0,0 +1,3 @@
+unit FpcUnit.Reports.LaTeX;
+{$DEFINE FPC_DOTTEDUNITS}
+{$i latextestreport.pp}

+ 3 - 0
packages/fcl-fpcunit/namespaced/FpcUnit.Reports.Plain.pp

@@ -0,0 +1,3 @@
+unit FpcUnit.Reports.Plain;
+{$DEFINE FPC_DOTTEDUNITS}
+{$i plaintestreport.pp}

+ 3 - 0
packages/fcl-fpcunit/namespaced/FpcUnit.Reports.XML.pas

@@ -0,0 +1,3 @@
+unit FpcUnit.Reports.XML;
+{$DEFINE FPC_DOTTEDUNITS}
+{$i xmlreporter.pas}

+ 3 - 0
packages/fcl-fpcunit/namespaced/FpcUnit.Reports.XMLTest.pp

@@ -0,0 +1,3 @@
+unit FpcUnit.Reports.XMLTest;
+{$DEFINE FPC_DOTTEDUNITS}
+{$i xmltestreport.pp}

+ 3 - 0
packages/fcl-fpcunit/namespaced/FpcUnit.Reports.pp

@@ -0,0 +1,3 @@
+unit FpcUnit.Reports;
+{$DEFINE FPC_DOTTEDUNITS}
+{$i fpcunitreport.pp}

+ 3 - 0
packages/fcl-fpcunit/namespaced/FpcUnit.Runners.Console.pas

@@ -0,0 +1,3 @@
+unit FpcUnit.Runners.Console;
+{$DEFINE FPC_DOTTEDUNITS}
+{$i consoletestrunner.pas}

+ 3 - 0
packages/fcl-fpcunit/namespaced/FpcUnit.Runners.Simple.pas

@@ -0,0 +1,3 @@
+unit FpcUnit.Runners.Simple;
+{$DEFINE FPC_DOTTEDUNITS}
+{$i simpletestrunner.pas}

+ 3 - 0
packages/fcl-fpcunit/namespaced/FpcUnit.Test.pp

@@ -0,0 +1,3 @@
+unit FpcUnit.Test;
+{$DEFINE FPC_DOTTEDUNITS}
+{$i fpcunit.pp}

+ 3 - 0
packages/fcl-fpcunit/namespaced/FpcUnit.Tests.Money.pp

@@ -0,0 +1,3 @@
+unit FpcUnit.Tests.Money;
+{$DEFINE FPC_DOTTEDUNITS}
+{$i moneytest.pp}

+ 3 - 0
packages/fcl-fpcunit/namespaced/FpcUnit.Tests.Unittests.pp

@@ -0,0 +1,3 @@
+unit FpcUnit.Tests.Unittests;
+{$DEFINE FPC_DOTTEDUNITS}
+{$i fpcunittests.pp}

+ 3 - 0
packages/fcl-fpcunit/namespaced/FpcUnit.Ubmockobject.pp

@@ -0,0 +1,3 @@
+unit FpcUnit.Ubmockobject;
+{$DEFINE FPC_DOTTEDUNITS}
+{$i ubmockobject.pp}

+ 3 - 0
packages/fcl-fpcunit/namespaced/FpcUnit.Utils.pp

@@ -0,0 +1,3 @@
+unit FpcUnit.Utils;
+{$DEFINE FPC_DOTTEDUNITS}
+{$i testutils.pp}

+ 23 - 0
packages/fcl-fpcunit/namespaces.lst

@@ -0,0 +1,23 @@
+src/xmltestreport.pp=namespaced/FpcUnit.Reports.XMLTest.pp
+{s*:src/}=namespaced/
+{i+:src/}
+src/exampletests/money.pp=namespaced/FpcUnit.Money.pp
+{s*:src/exampletests/}=namespaced/
+{i+:src/exampletests/}
+src/exampletests/fpcunittests.pp=namespaced/FpcUnit.Tests.Unittests.pp
+src/exampletests/moneytest.pp=namespaced/FpcUnit.Tests.Money.pp
+src/exampletests/testmockobject.pp=namespaced/FpcUnit.Tests.Money.pp
+src/testdecorator.pp=namespaced/FpcUnit.Decorator.pp
+src/latextestreport.pp=namespaced/FpcUnit.Reports.LaTeX.pp
+src/fpcunit.pp=namespaced/FpcUnit.Test.pp
+src/testutils.pp=namespaced/FpcUnit.Utils.pp
+src/fpcunitreport.pp=namespaced/FpcUnit.Reports.pp
+src/junittestreport.pp=namespaced/FpcUnit.Reports.JUnit.pp
+src/consoletestrunner.pas=namespaced/FpcUnit.Runners.Console.pas
+src/testregistry.pp=namespaced/FpcUnit.Registry.pp
+src/testreport.pp=namespaced/FpcUnit.Report.pp
+src/simpletestrunner.pas=namespaced/FpcUnit.Runners.Simple.pas
+src/plaintestreport.pp=namespaced/FpcUnit.Reports.Plain.pp
+src/xmlreporter.pas=namespaced/FpcUnit.Reports.XML.pas
+src/ubmockobject.pp=namespaced/FpcUnit.Ubmockobject.pp
+src/digesttestreport.pp=namespaced/FpcUnit.Reports.Digest.pp

+ 13 - 0
packages/fcl-fpcunit/src/consoletestrunner.pas

@@ -17,16 +17,25 @@
   along with this library; if not, write to the Free Software Foundation,
   along with this library; if not, write to the Free Software Foundation,
   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 }
 }
+{$IFNDEF FPC_DOTTEDUNITS}
 unit consoletestrunner;
 unit consoletestrunner;
+{$ENDIF FPC_DOTTEDUNITS}
 
 
 {$mode objfpc}{$H+}
 {$mode objfpc}{$H+}
 
 
 interface
 interface
 
 
+{$IFDEF FPC_DOTTEDUNITS}
+uses
+  Fcl.CustApp, System.Classes, System.SysUtils, FpcUnit.Test, FpcUnit.Registry, FpcUnit.Utils,
+  FpcUnit.Reports, FpcUnit.Reports.LaTeX, FpcUnit.Reports.XMLTest, FpcUnit.Reports.Plain,
+  FpcUnit.Reports.JUnit, Xml.Dom;
+{$ELSE FPC_DOTTEDUNITS}
 uses
 uses
   custapp, Classes, SysUtils, fpcunit, testregistry, testutils,
   custapp, Classes, SysUtils, fpcunit, testregistry, testutils,
   fpcunitreport, latextestreport, xmltestreport, plaintestreport,
   fpcunitreport, latextestreport, xmltestreport, plaintestreport,
   junittestreport, dom;
   junittestreport, dom;
+{$ENDIF FPC_DOTTEDUNITS}
 
 
 const
 const
   Version = '0.3';
   Version = '0.3';
@@ -81,7 +90,11 @@ type
 
 
 implementation
 implementation
 
 
+{$IFDEF FPC_DOTTEDUNITS}
+uses System.IniFiles, FpcUnit.Decorator;
+{$ELSE FPC_DOTTEDUNITS}
 uses inifiles, testdecorator;
 uses inifiles, testdecorator;
+{$ENDIF FPC_DOTTEDUNITS}
 
 
 const
 const
   ShortOpts = 'alhpsyrn';
   ShortOpts = 'alhpsyrn';

+ 23 - 5
packages/fcl-fpcunit/src/digesttestreport.pp

@@ -1,4 +1,6 @@
+{$IFNDEF FPC_DOTTEDUNITS}
 unit DigestTestReport;
 unit DigestTestReport;
+{$ENDIF FPC_DOTTEDUNITS}
 {
 {
     This file is part of the Free Pascal run time library.
     This file is part of the Free Pascal run time library.
     Copyright (c) 1999-2022 by Michael van Canney and other members of the
     Copyright (c) 1999-2022 by Michael van Canney and other members of the
@@ -19,8 +21,13 @@ unit DigestTestReport;
 
 
 interface
 interface
 
 
+{$IFDEF FPC_DOTTEDUNITS}
+uses
+  System.Classes, System.SysUtils, FpcUnit.Test, FpcUnit.Reports, FpcUnit.Utils{, tresults};
+{$ELSE FPC_DOTTEDUNITS}
 uses
 uses
   classes, SysUtils, fpcunit, fpcunitreport, testutils{, tresults};
   classes, SysUtils, fpcunit, fpcunitreport, testutils{, tresults};
+{$ENDIF FPC_DOTTEDUNITS}
 
 
 { ---------------------------------------------------------------------------- }
 { ---------------------------------------------------------------------------- }
 { This section is copy-pasted from the tresults unit of the testsuite          }
 { This section is copy-pasted from the tresults unit of the testsuite          }
@@ -121,6 +128,16 @@ type
   
   
 implementation
 implementation
 
 
+{$IFDEF FPC_DOTTEDUNITS}
+uses Libx.Libtar,
+{$IFDEF UNIX}
+     UnixApi.Types,UnixApi.Unix,UnixApi.Base,
+{$ENDIF}
+{$IFDEF MSWINDOWS}
+     WinApi.Windows,
+{$ENDIF}
+     System.ZLib.Zstream;
+{$ELSE FPC_DOTTEDUNITS}
 uses LibTar,
 uses LibTar,
 {$IFDEF UNIX}
 {$IFDEF UNIX}
      UnixType,Unix,BaseUnix,
      UnixType,Unix,BaseUnix,
@@ -129,6 +146,7 @@ uses LibTar,
      windows,
      windows,
 {$ENDIF}
 {$ENDIF}
      zstream;
      zstream;
+{$ENDIF FPC_DOTTEDUNITS}
      
      
 Function PathExists (Const F : String) : Boolean;
 Function PathExists (Const F : String) : Boolean;
 {
 {
@@ -138,7 +156,7 @@ Var
   info : Tsearchrec;
   info : Tsearchrec;
 begin
 begin
   PathExists:=(FindFirst (F,faAnyFile,Info)=0) and  ((Info.Attr and faDirectory)=faDirectory);
   PathExists:=(FindFirst (F,faAnyFile,Info)=0) and  ((Info.Attr and faDirectory)=faDirectory);
-  sysutils.FindClose (Info);
+  {$IFDEF FPC_DOTTEDUNITS}System.{$ENDIF}SysUtils.FindClose (Info);
 end;
 end;
 
 
 function CompilerFullTarget:string;
 function CompilerFullTarget:string;
@@ -195,7 +213,7 @@ begin
       mkdirtree(SplitPath(hs));
       mkdirtree(SplitPath(hs));
       { make this dir }
       { make this dir }
       {$push}{$I-}
       {$push}{$I-}
-       mkdir(s);
+      mkdir(s);
       {$pop}
       {$pop}
       ioresult;
       ioresult;
     end;
     end;
@@ -238,7 +256,7 @@ var TarWriter : TTarWriter;
           else if d.Name <> TarFileName then
           else if d.Name <> TarFileName then
             TarWriter.AddFile (ADir+'/'+ d.Name);
             TarWriter.AddFile (ADir+'/'+ d.Name);
         until findnext(d)<>0;
         until findnext(d)<>0;
-        sysutils.Findclose(d);
+        {$IFDEF FPC_DOTTEDUNITS}System.{$ENDIF}sysutils.Findclose(d);
       end;
       end;
   end;
   end;
 
 
@@ -336,8 +354,8 @@ begin
     AddLog(DigestFileName,'CPU='+{$I %FPCTARGETCPU%});
     AddLog(DigestFileName,'CPU='+{$I %FPCTARGETCPU%});
     AddLog(DigestFileName,'Version='+{$I %FPCVERSION%});
     AddLog(DigestFileName,'Version='+{$I %FPCVERSION%});
     AddLog(DigestFileName,'LogFile=log');
     AddLog(DigestFileName,'LogFile=log');
-    AddLog(DigestFileName,'Submitter='+sysutils.GetEnvironmentVariable('USER'));
-    FHostName:=sysutils.GetEnvironmentVariable('HOSTNAME');
+    AddLog(DigestFileName,'Submitter='+{$IFDEF FPC_DOTTEDUNITS}System.{$ENDIF}SysUtils.GetEnvironmentVariable('USER'));
+    FHostName:={$IFDEF FPC_DOTTEDUNITS}System.{$ENDIF}SysUtils.GetEnvironmentVariable('HOSTNAME');
     if pos('.',FHostName)>0 then
     if pos('.',FHostName)>0 then
       FHostName:=system.Copy(FHostName,1,pos('.',FHostName)-1);
       FHostName:=system.Copy(FHostName,1,pos('.',FHostName)-1);
     AddLog(DigestFileName,'Machine='+FHostName);
     AddLog(DigestFileName,'Machine='+FHostName);

+ 8 - 1
packages/fcl-fpcunit/src/exampletests/fpcunittests.pp

@@ -4,7 +4,7 @@
     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
 
 
-    unit tests of the FPCUnit framework.
+    unit tests of the FpcUnit framework.
 
 
     See the file COPYING.FPC, included in this distribution,
     See the file COPYING.FPC, included in this distribution,
     for details about the copyright.
     for details about the copyright.
@@ -14,12 +14,19 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
 
  **********************************************************************}
  **********************************************************************}
+{$IFNDEF FPC_DOTTEDUNITS}
 unit fpcunittests;
 unit fpcunittests;
+{$ENDIF FPC_DOTTEDUNITS}
 
 
 interface
 interface
 
 
+{$IFDEF FPC_DOTTEDUNITS}
+uses
+  System.SysUtils, System.Classes, FpcUnit.Test, FpcUnit.Utils, FpcUnit.Registry, FpcUnit.Decorator;
+{$ELSE FPC_DOTTEDUNITS}
 uses
 uses
   SysUtils, Classes, fpcunit, testutils, testregistry, testdecorator;
   SysUtils, Classes, fpcunit, testutils, testregistry, testdecorator;
+{$ENDIF FPC_DOTTEDUNITS}
 
 
 type
 type
 
 

+ 7 - 0
packages/fcl-fpcunit/src/exampletests/money.pp

@@ -1,11 +1,18 @@
+{$IFNDEF FPC_DOTTEDUNITS}
 unit money;
 unit money;
+{$ENDIF FPC_DOTTEDUNITS}
 
 
 {$mode objfpc}{$H+}
 {$mode objfpc}{$H+}
 
 
 interface
 interface
 
 
+{$IFDEF FPC_DOTTEDUNITS}
+uses
+  System.Classes, System.SysUtils;
+{$ELSE FPC_DOTTEDUNITS}
 uses
 uses
   Classes, SysUtils;
   Classes, SysUtils;
+{$ENDIF FPC_DOTTEDUNITS}
 
 
 type
 type
 
 

+ 7 - 0
packages/fcl-fpcunit/src/exampletests/moneytest.pp

@@ -1,11 +1,18 @@
+{$IFNDEF FPC_DOTTEDUNITS}
 unit moneytest;
 unit moneytest;
+{$ENDIF FPC_DOTTEDUNITS}
 
 
 {$mode objfpc}{$H+}
 {$mode objfpc}{$H+}
 
 
 interface
 interface
 
 
+{$IFDEF FPC_DOTTEDUNITS}
+uses
+  System.Classes, System.SysUtils, FpcUnit.Test, FpcUnit.Money, FpcUnit.Registry;
+{$ELSE FPC_DOTTEDUNITS}
 uses
 uses
   Classes, SysUtils, fpcunit, money, testregistry;
   Classes, SysUtils, fpcunit, money, testregistry;
+{$ENDIF FPC_DOTTEDUNITS}
 
 
 type
 type
 
 

+ 4 - 0
packages/fcl-fpcunit/src/exampletests/needassert.pp

@@ -1,6 +1,10 @@
 program needassert;
 program needassert;
 
 
+{$IFDEF FPC_DOTTEDUNITS}
+uses FpcUnit.Test, FpcUnit.Registry, FpcUnit.Runners.Console;
+{$ELSE FPC_DOTTEDUNITS}
 uses fpcunit, testregistry, consoletestrunner;
 uses fpcunit, testregistry, consoletestrunner;
+{$ENDIF FPC_DOTTEDUNITS}
 
 
 Type
 Type
   TTestNeedAssert = Class(TTestCase) 
   TTestNeedAssert = Class(TTestCase) 

+ 7 - 0
packages/fcl-fpcunit/src/exampletests/testmockobject.pp

@@ -14,12 +14,19 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
 
  **********************************************************************}
  **********************************************************************}
+{$IFNDEF FPC_DOTTEDUNITS}
 unit testmockobject;
 unit testmockobject;
+{$ENDIF FPC_DOTTEDUNITS}
 
 
 interface
 interface
 
 
+{$IFDEF FPC_DOTTEDUNITS}
+uses
+  System.Classes, System.SysUtils, FpcUnit.Test, FpcUnit.Utils, FpcUnit.Registry, FpcUnit.Ubmockobject;
+{$ELSE FPC_DOTTEDUNITS}
 uses
 uses
   Classes, SysUtils, fpcunit, testutils, testregistry, ubmockobject;
   Classes, SysUtils, fpcunit, testutils, testregistry, ubmockobject;
+{$ENDIF FPC_DOTTEDUNITS}
 
 
 type
 type
 
 

+ 14 - 0
packages/fcl-fpcunit/src/fpcunit.pp

@@ -12,7 +12,9 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
 
  **********************************************************************}
  **********************************************************************}
+{$IFNDEF FPC_DOTTEDUNITS}
 unit fpcunit;
 unit fpcunit;
+{$ENDIF FPC_DOTTEDUNITS}
 
 
 {$mode objfpc}
 {$mode objfpc}
 {$h+}
 {$h+}
@@ -22,10 +24,17 @@ interface
 { Uncomment this define to remove the DUnit compatibility interface. }
 { Uncomment this define to remove the DUnit compatibility interface. }
 {$DEFINE DUnit}
 {$DEFINE DUnit}
 
 
+{$IFDEF FPC_DOTTEDUNITS}
+uses
+  System.SysUtils
+  ,System.Classes
+  ;
+{$ELSE FPC_DOTTEDUNITS}
 uses
 uses
   SysUtils
   SysUtils
   ,Classes
   ,Classes
   ;
   ;
+{$ENDIF FPC_DOTTEDUNITS}
 
 
 
 
 { This lets us use a single include file for both the Interface and
 { This lets us use a single include file for both the Interface and
@@ -358,8 +367,13 @@ Resourcestring
   
   
 implementation
 implementation
 
 
+{$IFDEF FPC_DOTTEDUNITS}
+uses
+  FpcUnit.Utils;
+{$ELSE FPC_DOTTEDUNITS}
 uses
 uses
   testutils;
   testutils;
+{$ENDIF FPC_DOTTEDUNITS}
 
 
 Const
 Const
   sExpectedButWasFmt = 'Expected:' + LineEnding + '"%s"' + LineEnding + 'But was:' + LineEnding + '"%s"';
   sExpectedButWasFmt = 'Expected:' + LineEnding + '"%s"' + LineEnding + 'But was:' + LineEnding + '"%s"';

+ 8 - 1
packages/fcl-fpcunit/src/fpcunitreport.pp

@@ -4,7 +4,7 @@
     This file is part of the Free Component Library (FCL)
     This file is part of the Free Component Library (FCL)
     Copyright (c) 2006 by Dean Zobec
     Copyright (c) 2006 by Dean Zobec
 
 
-    common base classes for FPCUnit test reports
+    common base classes for FpcUnit test reports
 
 
     See the file COPYING.FPC, included in this distribution,
     See the file COPYING.FPC, included in this distribution,
     for details about the copyright.
     for details about the copyright.
@@ -14,12 +14,19 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
 
  **********************************************************************}
  **********************************************************************}
+{$IFNDEF FPC_DOTTEDUNITS}
 unit fpcunitreport;
 unit fpcunitreport;
+{$ENDIF FPC_DOTTEDUNITS}
 
 
 interface
 interface
 
 
+{$IFDEF FPC_DOTTEDUNITS}
+uses
+  System.Classes, System.SysUtils, FpcUnit.Test;
+{$ELSE FPC_DOTTEDUNITS}
 uses
 uses
   classes, sysutils, fpcunit;
   classes, sysutils, fpcunit;
+{$ENDIF FPC_DOTTEDUNITS}
 
 
 type
 type
   
   

+ 10 - 1
packages/fcl-fpcunit/src/junittestreport.pp

@@ -2,7 +2,7 @@
     This file is part of the Free Component Library (FCL)
     This file is part of the Free Component Library (FCL)
     Copyright (c) 2021 by Joost van der Sluis (CNOC)
     Copyright (c) 2021 by Joost van der Sluis (CNOC)
 
 
-    An example of an XML report writer for FPCUnit tests.
+    An example of an XML report writer for FpcUnit tests.
 
 
     See the file COPYING.FPC, included in this distribution,
     See the file COPYING.FPC, included in this distribution,
     for details about the copyright.
     for details about the copyright.
@@ -30,16 +30,25 @@
 
 
 }
 }
 
 
+{$IFNDEF FPC_DOTTEDUNITS}
 unit junittestreport;
 unit junittestreport;
+{$ENDIF FPC_DOTTEDUNITS}
 
 
 {$mode objfpc}{$H+}
 {$mode objfpc}{$H+}
 
 
 interface
 interface
 
 
+{$IFDEF FPC_DOTTEDUNITS}
+uses
+  System.Classes, System.SysUtils,FpcUnit.Test, FpcUnit.Reports, Xml.Dom, Xml.Writer,
+  {$ifdef Unix}UnixApi.Unix,{$endif}
+  System.DateUtils;
+{$ELSE FPC_DOTTEDUNITS}
 uses
 uses
   Classes, SysUtils,fpcunit, fpcunitreport, dom, XMLWrite,
   Classes, SysUtils,fpcunit, fpcunitreport, dom, XMLWrite,
   {$ifdef unix}unix,{$endif}
   {$ifdef unix}unix,{$endif}
   DateUtils;
   DateUtils;
+{$ENDIF FPC_DOTTEDUNITS}
   
   
 
 
 type
 type

+ 14 - 3
packages/fcl-fpcunit/src/latextestreport.pp

@@ -4,7 +4,7 @@
     This file is part of the Free Component Library (FCL)
     This file is part of the Free Component Library (FCL)
     Copyright (c) 2006 by Dean Zobec
     Copyright (c) 2006 by Dean Zobec
 
 
-    an example of latex report for FPCUnit tests.
+    an example of latex report for FpcUnit tests.
 
 
     See the file COPYING.FPC, included in this distribution,
     See the file COPYING.FPC, included in this distribution,
     for details about the copyright.
     for details about the copyright.
@@ -14,12 +14,19 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
 
  **********************************************************************}
  **********************************************************************}
+{$IFNDEF FPC_DOTTEDUNITS}
 unit latextestreport;
 unit latextestreport;
+{$ENDIF FPC_DOTTEDUNITS}
 
 
 interface
 interface
 
 
+{$IFDEF FPC_DOTTEDUNITS}
+uses
+  System.Classes, System.SysUtils, FpcUnit.Test, FpcUnit.Reports, System.StrUtils;
+{$ELSE FPC_DOTTEDUNITS}
 uses
 uses
   classes, SysUtils, fpcunit, fpcunitreport, strutils;
   classes, SysUtils, fpcunit, fpcunitreport, strutils;
+{$ENDIF FPC_DOTTEDUNITS}
 
 
 type
 type
    
    
@@ -56,7 +63,11 @@ function GetSuiteAsLatex(aSuite: TTestSuite): string;
 
 
 implementation
 implementation
 
 
+{$IFDEF FPC_DOTTEDUNITS}
+uses System.DateUtils;
+{$ELSE FPC_DOTTEDUNITS}
 uses dateutils;
 uses dateutils;
+{$ENDIF FPC_DOTTEDUNITS}
 
 
 function TLatexResultsWriter.TimeFormat(ATiming: TDateTime): String;
 function TLatexResultsWriter.TimeFormat(ATiming: TDateTime): String;
 Var
 Var
@@ -118,8 +129,8 @@ begin
   FDoc.Add('\definecolor{Red}{rgb}{1,0,0}');
   FDoc.Add('\definecolor{Red}{rgb}{1,0,0}');
   FDoc.Add('\definecolor{Pink}{rgb}{1,0,1}');
   FDoc.Add('\definecolor{Pink}{rgb}{1,0,1}');
   FDoc.Add('\definecolor{Yellow}{rgb}{1,1,0}');
   FDoc.Add('\definecolor{Yellow}{rgb}{1,1,0}');
-  FDoc.Add('\author{FPCUnit}');
-  FDoc.Add('\title{Unit tests run by FPCUnit}');
+  FDoc.Add('\author{FpcUnit}');
+  FDoc.Add('\title{Unit tests run by FpcUnit}');
   FDoc.Add('\begin{document}');
   FDoc.Add('\begin{document}');
   FDoc.Add('\maketitle');
   FDoc.Add('\maketitle');
   FDoc.Add('\flushleft');
   FDoc.Add('\flushleft');

+ 12 - 1
packages/fcl-fpcunit/src/plaintestreport.pp

@@ -4,7 +4,7 @@
     This file is part of the Free Component Library (FCL)
     This file is part of the Free Component Library (FCL)
     Copyright (c) 2006 by Dean Zobec
     Copyright (c) 2006 by Dean Zobec
 
 
-    an example of plain text report for FPCUnit tests.
+    an example of plain text report for FpcUnit tests.
 
 
     See the file COPYING.FPC, included in this distribution,
     See the file COPYING.FPC, included in this distribution,
     for details about the copyright.
     for details about the copyright.
@@ -14,12 +14,19 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
 
  **********************************************************************}
  **********************************************************************}
+{$IFNDEF FPC_DOTTEDUNITS}
 unit plaintestreport;
 unit plaintestreport;
+{$ENDIF FPC_DOTTEDUNITS}
 
 
 interface
 interface
 
 
+{$IFDEF FPC_DOTTEDUNITS}
+uses
+  System.Classes, System.SysUtils, FpcUnit.Test, FpcUnit.Reports, FpcUnit.Decorator;
+{$ELSE FPC_DOTTEDUNITS}
 uses
 uses
   classes, SysUtils, fpcunit, fpcunitreport, testdecorator;
   classes, SysUtils, fpcunit, fpcunitreport, testdecorator;
+{$ENDIF FPC_DOTTEDUNITS}
 
 
 type
 type
   TTestResultOption = (ttoSkipAddress,ttoSkipExceptionMessage,ttoErrorsOnly);
   TTestResultOption = (ttoSkipAddress,ttoSkipExceptionMessage,ttoErrorsOnly);
@@ -59,7 +66,11 @@ function TestResultAsPlain(aTestResult: TTestResult; Options : TTestResultOption
 
 
 implementation
 implementation
 
 
+{$IFDEF FPC_DOTTEDUNITS}
+uses System.DateUtils;
+{$ELSE FPC_DOTTEDUNITS}
 uses dateutils;
 uses dateutils;
+{$ENDIF FPC_DOTTEDUNITS}
 
 
 {TPlainResultsWriter}
 {TPlainResultsWriter}
 
 

+ 8 - 0
packages/fcl-fpcunit/src/simpletestrunner.pas

@@ -19,15 +19,23 @@
   along with this library; if not, write to the Free Software Foundation,
   along with this library; if not, write to the Free Software Foundation,
   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 }
 }
+{$IFNDEF FPC_DOTTEDUNITS}
 unit simpletestrunner;
 unit simpletestrunner;
+{$ENDIF FPC_DOTTEDUNITS}
 
 
 {$mode objfpc}{$H+}
 {$mode objfpc}{$H+}
 
 
 interface
 interface
 
 
+{$IFDEF FPC_DOTTEDUNITS}
+uses
+  Fcl.CustApp, System.Classes, System.SysUtils, FpcUnit.Test, FpcUnit.Registry,
+  FpcUnit.Reports, FpcUnit.Reports.Plain;
+{$ELSE FPC_DOTTEDUNITS}
 uses
 uses
   custapp, Classes, SysUtils, fpcunit, testregistry,
   custapp, Classes, SysUtils, fpcunit, testregistry,
   fpcunitreport, plaintestreport;
   fpcunitreport, plaintestreport;
+{$ENDIF FPC_DOTTEDUNITS}
 
 
 const
 const
   Version = '0.1';
   Version = '0.1';

+ 7 - 0
packages/fcl-fpcunit/src/testdecorator.pp

@@ -13,15 +13,22 @@
 
 
  **********************************************************************}
  **********************************************************************}
 
 
+{$IFNDEF FPC_DOTTEDUNITS}
 unit testdecorator; 
 unit testdecorator; 
+{$ENDIF FPC_DOTTEDUNITS}
 
 
 {$mode objfpc}
 {$mode objfpc}
 {$h+}
 {$h+}
 
 
 interface
 interface
 
 
+{$IFDEF FPC_DOTTEDUNITS}
+uses
+  System.Classes, System.SysUtils, FpcUnit.Test;
+{$ELSE FPC_DOTTEDUNITS}
 uses
 uses
   Classes, SysUtils, fpcunit;
   Classes, SysUtils, fpcunit;
+{$ENDIF FPC_DOTTEDUNITS}
   
   
 type
 type
 
 

+ 13 - 0
packages/fcl-fpcunit/src/testregistry.pp

@@ -12,15 +12,22 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
 
  **********************************************************************}
  **********************************************************************}
+{$IFNDEF FPC_DOTTEDUNITS}
 unit testregistry;
 unit testregistry;
+{$ENDIF FPC_DOTTEDUNITS}
 
 
 {$mode objfpc}
 {$mode objfpc}
 {$h+}
 {$h+}
 
 
 interface
 interface
 
 
+{$IFDEF FPC_DOTTEDUNITS}
+uses
+  FpcUnit.Test, FpcUnit.Decorator;
+{$ELSE FPC_DOTTEDUNITS}
 uses
 uses
   fpcunit, testdecorator;
   fpcunit, testdecorator;
+{$ENDIF FPC_DOTTEDUNITS}
   
   
 type
 type
 
 
@@ -45,9 +52,15 @@ function NumberOfRegisteredTests: longint;
 function GetTestRegistry: TTestSuite;
 function GetTestRegistry: TTestSuite;
 
 
 implementation
 implementation
+{$IFDEF FPC_DOTTEDUNITS}
+uses
+  System.Classes
+  ;
+{$ELSE FPC_DOTTEDUNITS}
 uses
 uses
   Classes
   Classes
   ;
   ;
+{$ENDIF FPC_DOTTEDUNITS}
 
 
 var
 var
   FTestRegistry: TTestSuite;
   FTestRegistry: TTestSuite;

+ 8 - 1
packages/fcl-fpcunit/src/testreport.pp

@@ -4,7 +4,7 @@
     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
 
 
-    an example of a console test runner of FPCUnit tests.
+    an example of a console test runner of FpcUnit tests.
 
 
     See the file COPYING.FPC, included in this distribution,
     See the file COPYING.FPC, included in this distribution,
     for details about the copyright.
     for details about the copyright.
@@ -14,12 +14,19 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
 
  **********************************************************************}
  **********************************************************************}
+{$IFNDEF FPC_DOTTEDUNITS}
 unit testreport;
 unit testreport;
+{$ENDIF FPC_DOTTEDUNITS}
 
 
 interface
 interface
 
 
+{$IFDEF FPC_DOTTEDUNITS}
+uses
+  System.Classes, System.SysUtils, FpcUnit.Test, FpcUnit.Utils;
+{$ELSE FPC_DOTTEDUNITS}
 uses
 uses
   classes, SysUtils, fpcunit, testutils;
   classes, SysUtils, fpcunit, testutils;
+{$ENDIF FPC_DOTTEDUNITS}
 
 
 type
 type
 
 

+ 5 - 0
packages/fcl-fpcunit/src/tests/asserttest.pp

@@ -18,8 +18,13 @@ unit asserttest;
 
 
 interface
 interface
 
 
+{$IFDEF FPC_DOTTEDUNITS}
+uses
+  FpcUnit.Test, FpcUnit.Registry, System.SysUtils;
+{$ELSE FPC_DOTTEDUNITS}
 uses
 uses
   fpcunit, testregistry, sysutils;
   fpcunit, testregistry, sysutils;
+{$ENDIF FPC_DOTTEDUNITS}
 
 
 type
 type
 
 

+ 9 - 0
packages/fcl-fpcunit/src/tests/frameworktest.pp

@@ -16,12 +16,21 @@
  **********************************************************************}
  **********************************************************************}
 program frameworktest;
 program frameworktest;
 
 
+{$IFDEF FPC_DOTTEDUNITS}
+uses
+{$IFDEF Unix}
+  UnixApi.CWString,
+{$endif}
+  FpcUnit.Runners.Console, System.Classes, System.SysUtils, FpcUnit.Test, FpcUnit.Report, asserttest,
+  suitetest;
+{$ELSE FPC_DOTTEDUNITS}
 uses
 uses
 {$IFDEF UNIX}
 {$IFDEF UNIX}
   cwstring,
   cwstring,
 {$endif}
 {$endif}
   consoletestrunner, classes, SysUtils, fpcunit, testreport, asserttest,
   consoletestrunner, classes, SysUtils, fpcunit, testreport, asserttest,
   suitetest;
   suitetest;
+{$ENDIF FPC_DOTTEDUNITS}
 
 
 
 
 Type
 Type

+ 5 - 0
packages/fcl-fpcunit/src/tests/suitetest.pp

@@ -18,8 +18,13 @@ unit suitetest;
 
 
 interface
 interface
 
 
+{$IFDEF FPC_DOTTEDUNITS}
+uses
+  FpcUnit.Test, FpcUnit.Report, FpcUnit.Registry;
+{$ELSE FPC_DOTTEDUNITS}
 uses
 uses
   fpcunit, testreport, testregistry;
   fpcunit, testreport, testregistry;
+{$ENDIF FPC_DOTTEDUNITS}
 
 
 type
 type
 
 

+ 7 - 0
packages/fcl-fpcunit/src/testutils.pp

@@ -14,12 +14,19 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
 
  **********************************************************************}
  **********************************************************************}
+{$IFNDEF FPC_DOTTEDUNITS}
 unit testutils;
 unit testutils;
+{$ENDIF FPC_DOTTEDUNITS}
 
 
 interface
 interface
 
 
+{$IFDEF FPC_DOTTEDUNITS}
+uses
+  System.Classes, System.SysUtils;
+{$ELSE FPC_DOTTEDUNITS}
 uses
 uses
   Classes, SysUtils;
   Classes, SysUtils;
+{$ENDIF FPC_DOTTEDUNITS}
 
 
 type
 type
   {$M+}
   {$M+}

+ 7 - 0
packages/fcl-fpcunit/src/ubmockobject.pp

@@ -15,12 +15,19 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
 
  **********************************************************************}
  **********************************************************************}
+{$IFNDEF FPC_DOTTEDUNITS}
 unit ubmockobject;
 unit ubmockobject;
+{$ENDIF FPC_DOTTEDUNITS}
 
 
 interface
 interface
 
 
+{$IFDEF FPC_DOTTEDUNITS}
+uses
+  System.Classes, System.SysUtils, FpcUnit.Test;
+{$ELSE FPC_DOTTEDUNITS}
 uses
 uses
   Classes, SysUtils, fpcunit;
   Classes, SysUtils, fpcunit;
+{$ENDIF FPC_DOTTEDUNITS}
 
 
 type
 type
 
 

+ 14 - 1
packages/fcl-fpcunit/src/xmlreporter.pas

@@ -27,11 +27,23 @@
 
 
 }
 }
 
 
+{$IFNDEF FPC_DOTTEDUNITS}
 unit xmlreporter;
 unit xmlreporter;
+{$ENDIF FPC_DOTTEDUNITS}
 
 
 {$mode objfpc}{$H+}
 {$mode objfpc}{$H+}
 
 
 interface
 interface
+{$IFDEF FPC_DOTTEDUNITS}
+uses
+  System.Classes
+  ,System.SysUtils
+  ,FpcUnit.Test
+  ,FpcUnit.Utils
+  ,Xml.Dom
+  ,Xml.Writer
+  ;
+{$ELSE FPC_DOTTEDUNITS}
 uses
 uses
   Classes
   Classes
   ,SysUtils
   ,SysUtils
@@ -40,6 +52,7 @@ uses
   ,dom
   ,dom
   ,XMLWrite
   ,XMLWrite
   ;
   ;
+{$ENDIF FPC_DOTTEDUNITS}
   
   
 
 
 type
 type
@@ -127,7 +140,7 @@ end;
 procedure TXMLResultsWriter.WriteHeader;
 procedure TXMLResultsWriter.WriteHeader;
 begin
 begin
   FResults := FDoc.CreateElement('TestResults');
   FResults := FDoc.CreateElement('TestResults');
-  FResults.AppendChild(FDoc.CreateComment(' Generated using FPCUnit on '
+  FResults.AppendChild(FDoc.CreateComment(' Generated using FpcUnit on '
       + FormatDateTime('yyyy-mm-dd hh:mm:ss', Now) ));
       + FormatDateTime('yyyy-mm-dd hh:mm:ss', Now) ));
   FDoc.AppendChild(FResults);
   FDoc.AppendChild(FResults);
   FListing := FDoc.CreateElement('TestListing');
   FListing := FDoc.CreateElement('TestListing');

+ 10 - 3
packages/fcl-fpcunit/src/xmltestreport.pp

@@ -2,7 +2,7 @@
     This file is part of the Free Component Library (FCL)
     This file is part of the Free Component Library (FCL)
     Copyright (c) 2006 by Dean Zobec, Graeme Geldenhuys
     Copyright (c) 2006 by Dean Zobec, Graeme Geldenhuys
 
 
-    An example of an XML report writer for FPCUnit tests.
+    An example of an XML report writer for FpcUnit tests.
 
 
     See the file COPYING.FPC, included in this distribution,
     See the file COPYING.FPC, included in this distribution,
     for details about the copyright.
     for details about the copyright.
@@ -28,14 +28,21 @@
 
 
 }
 }
 
 
+{$IFNDEF FPC_DOTTEDUNITS}
 unit xmltestreport;
 unit xmltestreport;
+{$ENDIF FPC_DOTTEDUNITS}
 
 
 {$mode objfpc}{$H+}
 {$mode objfpc}{$H+}
 
 
 interface
 interface
 
 
+{$IFDEF FPC_DOTTEDUNITS}
 uses
 uses
-  Classes, SysUtils,fpcunit, fpcunitreport, testutils, dom, XMLWrite;
+  System.Classes, System.SysUtils, FpcUnit.Test, FpcUnit.Reports, FpcUnit.Utils, Xml.Dom, Xml.Writer;
+{$ELSE FPC_DOTTEDUNITS}
+uses
+  Classes, SysUtils, fpcunit, fpcunitreport, testutils, dom, XMLWrite;
+{$ENDIF FPC_DOTTEDUNITS}
   
   
 
 
 type
 type
@@ -222,7 +229,7 @@ procedure TXMLResultsWriter.WriteHeader;
 begin
 begin
   inherited;
   inherited;
   FResults := FDoc.CreateElement('TestResults');
   FResults := FDoc.CreateElement('TestResults');
-  FResults.AppendChild(FDoc.CreateComment(' Generated using FPCUnit on '
+  FResults.AppendChild(FDoc.CreateComment(' Generated using FpcUnit on '
     + FormatDateTime('yyyy-mm-dd hh:nn:ss', Now) ));
     + FormatDateTime('yyyy-mm-dd hh:nn:ss', Now) ));
   FDoc.AppendChild(FResults);
   FDoc.AppendChild(FResults);
   FListing := FDoc.CreateElement('TestListing');
   FListing := FDoc.CreateElement('TestListing');