瀏覽代碼

* Dotted filenames for package fcl-fpcunit

Michaël Van Canneyt 2 年之前
父節點
當前提交
dc88694c7f
共有 42 個文件被更改,包括 297 次插入17 次删除
  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,
   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 }
+{$IFNDEF FPC_DOTTEDUNITS}
 unit consoletestrunner;
+{$ENDIF FPC_DOTTEDUNITS}
 
 {$mode objfpc}{$H+}
 
 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
   custapp, Classes, SysUtils, fpcunit, testregistry, testutils,
   fpcunitreport, latextestreport, xmltestreport, plaintestreport,
   junittestreport, dom;
+{$ENDIF FPC_DOTTEDUNITS}
 
 const
   Version = '0.3';
@@ -81,7 +90,11 @@ type
 
 implementation
 
+{$IFDEF FPC_DOTTEDUNITS}
+uses System.IniFiles, FpcUnit.Decorator;
+{$ELSE FPC_DOTTEDUNITS}
 uses inifiles, testdecorator;
+{$ENDIF FPC_DOTTEDUNITS}
 
 const
   ShortOpts = 'alhpsyrn';

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

@@ -1,4 +1,6 @@
+{$IFNDEF FPC_DOTTEDUNITS}
 unit DigestTestReport;
+{$ENDIF FPC_DOTTEDUNITS}
 {
     This file is part of the Free Pascal run time library.
     Copyright (c) 1999-2022 by Michael van Canney and other members of the
@@ -19,8 +21,13 @@ unit DigestTestReport;
 
 interface
 
+{$IFDEF FPC_DOTTEDUNITS}
+uses
+  System.Classes, System.SysUtils, FpcUnit.Test, FpcUnit.Reports, FpcUnit.Utils{, tresults};
+{$ELSE FPC_DOTTEDUNITS}
 uses
   classes, SysUtils, fpcunit, fpcunitreport, testutils{, tresults};
+{$ENDIF FPC_DOTTEDUNITS}
 
 { ---------------------------------------------------------------------------- }
 { This section is copy-pasted from the tresults unit of the testsuite          }
@@ -121,6 +128,16 @@ type
   
 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,
 {$IFDEF UNIX}
      UnixType,Unix,BaseUnix,
@@ -129,6 +146,7 @@ uses LibTar,
      windows,
 {$ENDIF}
      zstream;
+{$ENDIF FPC_DOTTEDUNITS}
      
 Function PathExists (Const F : String) : Boolean;
 {
@@ -138,7 +156,7 @@ Var
   info : Tsearchrec;
 begin
   PathExists:=(FindFirst (F,faAnyFile,Info)=0) and  ((Info.Attr and faDirectory)=faDirectory);
-  sysutils.FindClose (Info);
+  {$IFDEF FPC_DOTTEDUNITS}System.{$ENDIF}SysUtils.FindClose (Info);
 end;
 
 function CompilerFullTarget:string;
@@ -195,7 +213,7 @@ begin
       mkdirtree(SplitPath(hs));
       { make this dir }
       {$push}{$I-}
-       mkdir(s);
+      mkdir(s);
       {$pop}
       ioresult;
     end;
@@ -238,7 +256,7 @@ var TarWriter : TTarWriter;
           else if d.Name <> TarFileName then
             TarWriter.AddFile (ADir+'/'+ d.Name);
         until findnext(d)<>0;
-        sysutils.Findclose(d);
+        {$IFDEF FPC_DOTTEDUNITS}System.{$ENDIF}sysutils.Findclose(d);
       end;
   end;
 
@@ -336,8 +354,8 @@ begin
     AddLog(DigestFileName,'CPU='+{$I %FPCTARGETCPU%});
     AddLog(DigestFileName,'Version='+{$I %FPCVERSION%});
     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
       FHostName:=system.Copy(FHostName,1,pos('.',FHostName)-1);
     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)
     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,
     for details about the copyright.
@@ -14,12 +14,19 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
  **********************************************************************}
+{$IFNDEF FPC_DOTTEDUNITS}
 unit fpcunittests;
+{$ENDIF FPC_DOTTEDUNITS}
 
 interface
 
+{$IFDEF FPC_DOTTEDUNITS}
+uses
+  System.SysUtils, System.Classes, FpcUnit.Test, FpcUnit.Utils, FpcUnit.Registry, FpcUnit.Decorator;
+{$ELSE FPC_DOTTEDUNITS}
 uses
   SysUtils, Classes, fpcunit, testutils, testregistry, testdecorator;
+{$ENDIF FPC_DOTTEDUNITS}
 
 type
 

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

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

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

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

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

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

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

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

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

@@ -12,7 +12,9 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
  **********************************************************************}
+{$IFNDEF FPC_DOTTEDUNITS}
 unit fpcunit;
+{$ENDIF FPC_DOTTEDUNITS}
 
 {$mode objfpc}
 {$h+}
@@ -22,10 +24,17 @@ interface
 { Uncomment this define to remove the DUnit compatibility interface. }
 {$DEFINE DUnit}
 
+{$IFDEF FPC_DOTTEDUNITS}
+uses
+  System.SysUtils
+  ,System.Classes
+  ;
+{$ELSE FPC_DOTTEDUNITS}
 uses
   SysUtils
   ,Classes
   ;
+{$ENDIF FPC_DOTTEDUNITS}
 
 
 { This lets us use a single include file for both the Interface and
@@ -358,8 +367,13 @@ Resourcestring
   
 implementation
 
+{$IFDEF FPC_DOTTEDUNITS}
+uses
+  FpcUnit.Utils;
+{$ELSE FPC_DOTTEDUNITS}
 uses
   testutils;
+{$ENDIF FPC_DOTTEDUNITS}
 
 Const
   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)
     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,
     for details about the copyright.
@@ -14,12 +14,19 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
  **********************************************************************}
+{$IFNDEF FPC_DOTTEDUNITS}
 unit fpcunitreport;
+{$ENDIF FPC_DOTTEDUNITS}
 
 interface
 
+{$IFDEF FPC_DOTTEDUNITS}
+uses
+  System.Classes, System.SysUtils, FpcUnit.Test;
+{$ELSE FPC_DOTTEDUNITS}
 uses
   classes, sysutils, fpcunit;
+{$ENDIF FPC_DOTTEDUNITS}
 
 type
   

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

@@ -2,7 +2,7 @@
     This file is part of the Free Component Library (FCL)
     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,
     for details about the copyright.
@@ -30,16 +30,25 @@
 
 }
 
+{$IFNDEF FPC_DOTTEDUNITS}
 unit junittestreport;
+{$ENDIF FPC_DOTTEDUNITS}
 
 {$mode objfpc}{$H+}
 
 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
   Classes, SysUtils,fpcunit, fpcunitreport, dom, XMLWrite,
   {$ifdef unix}unix,{$endif}
   DateUtils;
+{$ENDIF FPC_DOTTEDUNITS}
   
 
 type

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

@@ -4,7 +4,7 @@
     This file is part of the Free Component Library (FCL)
     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,
     for details about the copyright.
@@ -14,12 +14,19 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
  **********************************************************************}
+{$IFNDEF FPC_DOTTEDUNITS}
 unit latextestreport;
+{$ENDIF FPC_DOTTEDUNITS}
 
 interface
 
+{$IFDEF FPC_DOTTEDUNITS}
+uses
+  System.Classes, System.SysUtils, FpcUnit.Test, FpcUnit.Reports, System.StrUtils;
+{$ELSE FPC_DOTTEDUNITS}
 uses
   classes, SysUtils, fpcunit, fpcunitreport, strutils;
+{$ENDIF FPC_DOTTEDUNITS}
 
 type
    
@@ -56,7 +63,11 @@ function GetSuiteAsLatex(aSuite: TTestSuite): string;
 
 implementation
 
+{$IFDEF FPC_DOTTEDUNITS}
+uses System.DateUtils;
+{$ELSE FPC_DOTTEDUNITS}
 uses dateutils;
+{$ENDIF FPC_DOTTEDUNITS}
 
 function TLatexResultsWriter.TimeFormat(ATiming: TDateTime): String;
 Var
@@ -118,8 +129,8 @@ begin
   FDoc.Add('\definecolor{Red}{rgb}{1,0,0}');
   FDoc.Add('\definecolor{Pink}{rgb}{1,0,1}');
   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('\maketitle');
   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)
     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,
     for details about the copyright.
@@ -14,12 +14,19 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
  **********************************************************************}
+{$IFNDEF FPC_DOTTEDUNITS}
 unit plaintestreport;
+{$ENDIF FPC_DOTTEDUNITS}
 
 interface
 
+{$IFDEF FPC_DOTTEDUNITS}
+uses
+  System.Classes, System.SysUtils, FpcUnit.Test, FpcUnit.Reports, FpcUnit.Decorator;
+{$ELSE FPC_DOTTEDUNITS}
 uses
   classes, SysUtils, fpcunit, fpcunitreport, testdecorator;
+{$ENDIF FPC_DOTTEDUNITS}
 
 type
   TTestResultOption = (ttoSkipAddress,ttoSkipExceptionMessage,ttoErrorsOnly);
@@ -59,7 +66,11 @@ function TestResultAsPlain(aTestResult: TTestResult; Options : TTestResultOption
 
 implementation
 
+{$IFDEF FPC_DOTTEDUNITS}
+uses System.DateUtils;
+{$ELSE FPC_DOTTEDUNITS}
 uses dateutils;
+{$ENDIF FPC_DOTTEDUNITS}
 
 {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,
   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 }
+{$IFNDEF FPC_DOTTEDUNITS}
 unit simpletestrunner;
+{$ENDIF FPC_DOTTEDUNITS}
 
 {$mode objfpc}{$H+}
 
 interface
 
+{$IFDEF FPC_DOTTEDUNITS}
+uses
+  Fcl.CustApp, System.Classes, System.SysUtils, FpcUnit.Test, FpcUnit.Registry,
+  FpcUnit.Reports, FpcUnit.Reports.Plain;
+{$ELSE FPC_DOTTEDUNITS}
 uses
   custapp, Classes, SysUtils, fpcunit, testregistry,
   fpcunitreport, plaintestreport;
+{$ENDIF FPC_DOTTEDUNITS}
 
 const
   Version = '0.1';

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

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

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

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

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

@@ -4,7 +4,7 @@
     This file is part of the Free Component Library (FCL)
     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,
     for details about the copyright.
@@ -14,12 +14,19 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
  **********************************************************************}
+{$IFNDEF FPC_DOTTEDUNITS}
 unit testreport;
+{$ENDIF FPC_DOTTEDUNITS}
 
 interface
 
+{$IFDEF FPC_DOTTEDUNITS}
+uses
+  System.Classes, System.SysUtils, FpcUnit.Test, FpcUnit.Utils;
+{$ELSE FPC_DOTTEDUNITS}
 uses
   classes, SysUtils, fpcunit, testutils;
+{$ENDIF FPC_DOTTEDUNITS}
 
 type
 

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

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

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

@@ -16,12 +16,21 @@
  **********************************************************************}
 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
 {$IFDEF UNIX}
   cwstring,
 {$endif}
   consoletestrunner, classes, SysUtils, fpcunit, testreport, asserttest,
   suitetest;
+{$ENDIF FPC_DOTTEDUNITS}
 
 
 Type

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

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

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

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

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

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

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

@@ -27,11 +27,23 @@
 
 }
 
+{$IFNDEF FPC_DOTTEDUNITS}
 unit xmlreporter;
+{$ENDIF FPC_DOTTEDUNITS}
 
 {$mode objfpc}{$H+}
 
 interface
+{$IFDEF FPC_DOTTEDUNITS}
+uses
+  System.Classes
+  ,System.SysUtils
+  ,FpcUnit.Test
+  ,FpcUnit.Utils
+  ,Xml.Dom
+  ,Xml.Writer
+  ;
+{$ELSE FPC_DOTTEDUNITS}
 uses
   Classes
   ,SysUtils
@@ -40,6 +52,7 @@ uses
   ,dom
   ,XMLWrite
   ;
+{$ENDIF FPC_DOTTEDUNITS}
   
 
 type
@@ -127,7 +140,7 @@ end;
 procedure TXMLResultsWriter.WriteHeader;
 begin
   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) ));
   FDoc.AppendChild(FResults);
   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)
     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,
     for details about the copyright.
@@ -28,14 +28,21 @@
 
 }
 
+{$IFNDEF FPC_DOTTEDUNITS}
 unit xmltestreport;
+{$ENDIF FPC_DOTTEDUNITS}
 
 {$mode objfpc}{$H+}
 
 interface
 
+{$IFDEF FPC_DOTTEDUNITS}
 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
@@ -222,7 +229,7 @@ procedure TXMLResultsWriter.WriteHeader;
 begin
   inherited;
   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) ));
   FDoc.AppendChild(FResults);
   FListing := FDoc.CreateElement('TestListing');