diff --git a/.gitignore b/.gitignore index af227908..4225ed2b 100644 --- a/.gitignore +++ b/.gitignore @@ -25,6 +25,7 @@ *.drc *.rc *.res +*.dres # Output Folders # ################### diff --git a/DUNitX.Loggers.GUIX.pas b/DUNitX.Loggers.GUIX.pas index b913539c..38789c0c 100644 --- a/DUNitX.Loggers.GUIX.pas +++ b/DUNitX.Loggers.GUIX.pas @@ -34,7 +34,16 @@ interface FMX.Types, FMX.Graphics, FMX.Controls, FMX.Forms, FMX.Dialogs, FMX.StdCtrls, System.Actions, FMX.ActnList, FMX.Layouts, FMX.TreeView, FMX.Edit, DUnitX.TestFramework, DUnitX.Extensibility, DUnitX.InternalInterfaces, FMX.ListView.Types, FMX.ListView.Appearances, - FMX.ListView, FMX.ListBox, Generics.Collections, FMX.Memo, FMX.ScrollBox, FMX.Controls.Presentation, System.IniFiles; + FMX.ListView, FMX.ListBox, System.Generics.Collections, FMX.Memo, FMX.ScrollBox, FMX.Controls.Presentation, System.IniFiles, + FMX.ListView.Adapters.Base; + +{$HPPEMIT '#if defined(USEPACKAGES)'} +{$HPPEMIT '# pragma comment(lib, "Fmx.bpi")'} +{$HPPEMIT '# pragma comment(lib, "DUnitXFMXRuntime.bpi")'} +{$HPPEMIT '#else'} +{$HPPEMIT '# pragma comment(lib, "Fmx")'} +{$HPPEMIT '# pragma comment(lib, "DUnitXFMXRuntime")'} +{$HPPEMIT '#endif'} type TGUIXTestRunner = class(TForm, ITestLogger) diff --git a/DUnitX.Assert.pas b/DUnitX.Assert.pas index f3909184..e831bdbd 100644 --- a/DUnitX.Assert.pas +++ b/DUnitX.Assert.pas @@ -251,17 +251,18 @@ implementation uses DUnitX.ResStrs, - Generics.Defaults, {$IFDEF SUPPORTS_REGEX} System.RegularExpressions, {$ENDIF} {$IFDEF USE_NS} + System.Generics.Defaults, System.Math, System.Rtti, System.StrUtils, System.TypInfo, System.Variants; {$ELSE} + Generics.Defaults, Math, Rtti, StrUtils, diff --git a/DUnitX.AutoDetect.Console.pas b/DUnitX.AutoDetect.Console.pas index 6b890276..d9926964 100644 --- a/DUnitX.AutoDetect.Console.pas +++ b/DUnitX.AutoDetect.Console.pas @@ -47,24 +47,25 @@ /// /// /// +/// /// unit DUnitX.AutoDetect.Console; interface uses - {$IFDEF MSWINDOWS} + {$IF Defined(MSWINDOWS)} DUnitX.Windows.Console; - {$ENDIF MSWINDOWS} - {$IFDEF MACOS} + {$ELSEIF Defined(MACOS) or Defined(OSX32)} // Simplification as MacOS console supports Ansi, and other terminals // on platforms other than windows typically support some form of // ANSI colors. - DUnitX.MacOS.Console; - {$ENDIF MACOS} - {$IFDEF LINUX} - DUnitX.Linux.Console; - {$ENDIF LINUX} + DUnitX.MacOS.Console; + {$ELSEIF Defined(LINUX) or Defined(ANDROID)} + DUnitX.Linux.Console; + {$ELSE} + {$MESSAGE Error 'Unknown Platform for Console Writer'} + {$ENDIF} implementation diff --git a/DUnitX.Filters.pas b/DUnitX.Filters.pas index a2fe0493..760ebaf2 100644 --- a/DUnitX.Filters.pas +++ b/DUnitX.Filters.pas @@ -35,10 +35,11 @@ interface uses {$IFDEF USE_NS} System.Classes, + System.Generics.Collections, {$ELSE} Classes, - {$ENDIF} Generics.Collections, + {$ENDIF} DUnitX.Extensibility; type diff --git a/DUnitX.FixtureProviderPlugin.pas b/DUnitX.FixtureProviderPlugin.pas index d010a392..da012b57 100644 --- a/DUnitX.FixtureProviderPlugin.pas +++ b/DUnitX.FixtureProviderPlugin.pas @@ -33,10 +33,11 @@ interface uses {$IFDEF USE_NS} System.Rtti, + System.Generics.Collections, {$ELSE} Rtti, - {$ENDIF} Generics.Collections, + {$ENDIF} DUnitX.Extensibility; type diff --git a/DUnitX.Linux.Console.pas b/DUnitX.Linux.Console.pas index fb66dc4c..278d9882 100644 --- a/DUnitX.Linux.Console.pas +++ b/DUnitX.Linux.Console.pas @@ -54,13 +54,13 @@ interface type - /// - /// Internal Class and should not be created directly. Adding this unit to - /// the uses will automatically register this class as a - /// IDUnitXConsoleWriter - /// in the DUnitX IOC Container. - /// - TDUnitXLinuxConsoleWriter = class(TDUnitXConsoleWriterBase) + /// + /// Internal Class and should not be created directly. Adding this unit to + /// the uses will automatically register this class as a + /// IDUnitXConsoleWriter + /// in the DUnitX IOC Container. + /// + TDUnitXLinuxConsoleWriter = class(TDUnitXConsoleWriterBase) private protected procedure InternalWriteLn(const s : String); override; @@ -107,7 +107,7 @@ implementation AT_BG_WHITE = #27 + '[47m'; -{ TDUnitXMacOSConsoleWriter } +{ TDUnitXLinuxConsoleWriter } procedure TDUnitXLinuxConsoleWriter.InternalWrite(const s: string); begin @@ -159,9 +159,9 @@ procedure TDUnitXLinuxConsoleWriter.SetColour(const foreground, background: TCon end; -{$IFDEF LINUX} -initialization - TDUnitXIoC.DefaultContainer.RegisterType(); -{$ENDIF LINUX} +{$IF Defined(LINUX)} + initialization + TDUnitXIoC.DefaultContainer.RegisterType(); +{$ENDIF} end. diff --git a/DUnitX.MacOS.Console.pas b/DUnitX.MacOS.Console.pas index 9665add8..d89cb230 100644 --- a/DUnitX.MacOS.Console.pas +++ b/DUnitX.MacOS.Console.pas @@ -159,8 +159,8 @@ procedure TDUnitXMacOSConsoleWriter.SetColour(const foreground, background: TCon end; -{$IFDEF MACOS} -initialization +{$IF Defined(MACOS) or Defined(OSX32)} + initialization TDUnitXIoC.DefaultContainer.RegisterType(); {$ENDIF} diff --git a/DUnitX.MemoryLeakMonitor.FastMM4.pas b/DUnitX.MemoryLeakMonitor.FastMM4.pas index ff9dddc7..705d160e 100644 --- a/DUnitX.MemoryLeakMonitor.FastMM4.pas +++ b/DUnitX.MemoryLeakMonitor.FastMM4.pas @@ -84,7 +84,7 @@ function TDUnitXFastMM4MemoryLeakMonitor.GetMemoryAllocated: Int64; for sb in st.SmallBlockTypeStates do begin - Result := Result + sb.UseableBlockSize * sb.AllocatedBlockCount; + Result := Result + Int64(sb.UseableBlockSize * sb.AllocatedBlockCount); end; end; diff --git a/DUnitX.ResStrs.pas b/DUnitX.ResStrs.pas index f1695948..2e37340c 100644 --- a/DUnitX.ResStrs.pas +++ b/DUnitX.ResStrs.pas @@ -107,7 +107,7 @@ interface SNoImplementationRegistered = 'No implementation registered for type %s'; SNoInstance = 'The activator delegate failed to return an instance %s'; - SNoConsoleWriterClassRegistered = 'No ConsoleWriter Class is registered. You will need to include DUnitX.Windows.Console or DUnitX.MACOS.Console in your application'; + SNoConsoleWriterClassRegistered = 'No ConsoleWriter Class is registered. You will need to include DUnitX.Windows.Console, DUnitX.MacOS.Console or DUnitX.Linux.Console in you application'; SExecutingTest = 'Executing Test : '; SRunningFixtureSetup = 'Running Fixture Setup Method : '; SRunningSetup = 'Running Setup for : '; diff --git a/DUnitX.TestNameParser.pas b/DUnitX.TestNameParser.pas index 5e7b06c5..d7edd0d2 100644 --- a/DUnitX.TestNameParser.pas +++ b/DUnitX.TestNameParser.pas @@ -50,7 +50,7 @@ implementation {$IFDEF USE_NS} System.Classes, System.SysUtils, - Generics.Collections, + System.Generics.Collections, {$ELSE} Classes, SysUtils, diff --git a/DUnitX.Timeout.pas b/DUnitX.Timeout.pas index bb2004cb..44b051bb 100644 --- a/DUnitX.Timeout.pas +++ b/DUnitX.Timeout.pas @@ -152,7 +152,6 @@ procedure TTimeoutThread.Execute; stopwatch := TStopWatch.Create; stopwatch.Reset; stopwatch.Start; - elapsedTime := 0; if Terminated then exit; diff --git a/DUnitX.Windows.Console.pas b/DUnitX.Windows.Console.pas index 780fba88..089c52fb 100644 --- a/DUnitX.Windows.Console.pas +++ b/DUnitX.Windows.Console.pas @@ -120,7 +120,6 @@ procedure TDUnitXWindowsConsoleWriter.SetColour(const foreground, background: TC function TDUnitXWindowsConsoleWriter.GetForegroundColourCode(const cc : TConsoleColour) : Word; begin - Result := 0; case cc of ccDefault : Result := FDefaultForeground; ccBrightRed : Result := FOREGROUND_RED or FOREGROUND_INTENSITY; @@ -139,6 +138,8 @@ function TDUnitXWindowsConsoleWriter.GetForegroundColourCode(const cc : TConsole ccBlack : Result := 0; ccBrightWhite : Result := FOREGROUND_BLUE or FOREGROUND_GREEN or FOREGROUND_RED or FOREGROUND_INTENSITY; ccWhite : Result := FOREGROUND_BLUE or FOREGROUND_GREEN or FOREGROUND_RED; + else + Result := 0; end; end; @@ -181,7 +182,6 @@ destructor TDUnitXWindowsConsoleWriter.Destroy; function TDUnitXWindowsConsoleWriter.GetBackgroundColourCode(const cc : TConsoleColour) : Word; begin - Result := 0; case cc of ccDefault : Result := FDefaultBackground; ccBrightRed : Result := BACKGROUND_RED or BACKGROUND_INTENSITY; @@ -200,6 +200,8 @@ function TDUnitXWindowsConsoleWriter.GetBackgroundColourCode(const cc : TConsole ccBlack : Result := 0; ccBrightWhite : Result := BACKGROUND_BLUE or BACKGROUND_GREEN or BACKGROUND_RED or BACKGROUND_INTENSITY; ccWhite : Result := BACKGROUND_BLUE or BACKGROUND_GREEN or BACKGROUND_RED; + else + Result := 0; end; end; diff --git a/DUnitX.inc b/DUnitX.inc index 9dfb5e13..09e3aa51 100644 --- a/DUnitX.inc +++ b/DUnitX.inc @@ -226,6 +226,7 @@ {$DEFINE DELPHI_XE8_UP} {$DEFINE DELPHIX_SEATTLE_UP} {$DEFINE DELPHIX_SEATTLE} + {$DEFINE DELPHI_XE10_UP} {$DEFINE SUPPORTS_REGEX} {$DEFINE USE_NS} {$UNDEF DELPHI_2010_DOWN} @@ -241,6 +242,36 @@ {$ENDIF VER310} +{$IFDEF VER320} // RAD Studio 10.2 Tokyo + {$DEFINE DELPHI_2010_UP} + {$DEFINE DELPHI_XE_UP} + {$DEFINE DELPHI_XE2_UP} + {$DEFINE DELPHI_XE3_UP} + {$DEFINE DELPHI_XE4_UP} + {$DEFINE DELPHI_XE5_UP} + {$DEFINE DELPHI_XE6_UP} + {$DEFINE DELPHI_XE7} + {$DEFINE DELPHI_XE7_UP} + {$DEFINE DELPHI_XE8_UP} + {$DEFINE DELPHIX_SEATTLE_UP} + {$DEFINE DELPHIX_SEATTLE} + {$DEFINE DELPHI_XE10_UP} + {$DEFINE DELPHI_XE101_UP} + {$DEFINE SUPPORTS_REGEX} + {$DEFINE USE_NS} + {$UNDEF DELPHI_2010_DOWN} + {$UNDEF DELPHI_XE_DOWN} + {$UNDEF DELPHI_XE2_DOWN} + {$UNDEF DELPHI_XE3_DOWN} + {$UNDEF DELPHI_XE4_DOWN} + {$UNDEF DELPHI_XE5_DOWN} + {$UNDEF DELPHI_XE6_DOWN} + {$UNDEF DELPHI_XE7_DOWN} + {$UNDEF DELPHI_XE8_DOWN} + {$UNDEF DELPHI_XE10_DOWN} + {$UNDEF DELPHI_XE101_DOWN} +{$ENDIF VER320} + {$I DUnitX.Stacktrace.inc} {$I DUnitX.MemoryLeaks.inc} diff --git a/DUnitX_D10Tokyo.groupproj b/DUnitX_D10Tokyo.groupproj new file mode 100644 index 00000000..f796881f --- /dev/null +++ b/DUnitX_D10Tokyo.groupproj @@ -0,0 +1,72 @@ + + + {578B7A11-D6C6-468D-8C4F-BC822BA313A8} + + + + + + + + + + + + + + + + + Default.Personality.12 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Examples/DUnitXExamples_D10Tokyo.dpr b/Examples/DUnitXExamples_D10Tokyo.dpr new file mode 100644 index 00000000..d94a9f9d --- /dev/null +++ b/Examples/DUnitXExamples_D10Tokyo.dpr @@ -0,0 +1,68 @@ +program DUnitXExamples_D10Tokyo; + +{$APPTYPE CONSOLE} + +uses + System.SysUtils, + DUnitX.Examples.General in 'DUnitX.Examples.General.pas', + DUnitX.ConsoleWriter.Base in '..\DUnitX.ConsoleWriter.Base.pas', + DUnitX.DUnitCompatibility in '..\DUnitX.DUnitCompatibility.pas', + DUnitX.Generics in '..\DUnitX.Generics.pas', + DUnitX.InternalInterfaces in '..\DUnitX.InternalInterfaces.pas', + DUnitX.IoC in '..\DUnitX.IoC.pas', + DUnitX.Loggers.Console in '..\DUnitX.Loggers.Console.pas', + DUnitX.Loggers.Text in '..\DUnitX.Loggers.Text.pas', + DUnitX.Loggers.XML.NUnit in '..\DUnitX.Loggers.XML.NUnit.pas', + DUnitX.Loggers.XML.xUnit in '..\DUnitX.Loggers.XML.xUnit.pas', + DUnitX.MacOS.Console in '..\DUnitX.MacOS.Console.pas', + DUnitX.Test in '..\DUnitX.Test.pas', + DUnitX.TestFixture in '..\DUnitX.TestFixture.pas', + DUnitX.TestFramework in '..\DUnitX.TestFramework.pas', + DUnitX.TestResult in '..\DUnitX.TestResult.pas', + DUnitX.RunResults in '..\DUnitX.RunResults.pas', + DUnitX.TestRunner in '..\DUnitX.TestRunner.pas', + DUnitX.Utils in '..\DUnitX.Utils.pas', + DUnitX.Utils.XML in '..\DUnitX.Utils.XML.pas', + DUnitX.WeakReference in '..\DUnitX.WeakReference.pas', + DUnitX.Windows.Console in '..\DUnitX.Windows.Console.pas', + DUnitX.StackTrace.EurekaLog7 in '..\DUnitX.StackTrace.EurekaLog7.pas', + NonNamespacedExample in 'NonNamespacedExample.pas', + DUnitX.Examples.EqualityAsserts in 'DUnitX.Examples.EqualityAsserts.pas', + DUnitX.FixtureResult in '..\DUnitX.FixtureResult.pas', + DUnitX.Loggers.Null in '..\DUnitX.Loggers.Null.pas', + DUnitX.MemoryLeakMonitor.Default in '..\DUnitX.MemoryLeakMonitor.Default.pas', + DUnitX.Extensibility in '..\DUnitX.Extensibility.pas', + DUnitX.CommandLine.OptionDef in '..\DUnitX.CommandLine.OptionDef.pas', + DUnitX.CommandLine.Options in '..\DUnitX.CommandLine.Options.pas', + DUnitX.CommandLine.Parser in '..\DUnitX.CommandLine.Parser.pas', + DUnitX.FixtureProviderPlugin in '..\DUnitX.FixtureProviderPlugin.pas', + DUnitX.Timeout in '..\DUnitX.Timeout.pas', + DUnitX.Attributes in '..\DUnitX.Attributes.pas', + DUnitX.Linux.Console in '..\DUnitX.Linux.Console.pas'; + +var + runner : ITestRunner; + results : IRunResults; + logger : ITestLogger; + nunitLogger : ITestLogger; +begin + try + //Create the runner + runner := TDUnitX.CreateRunner; + runner.UseRTTI := True; + //tell the runner how we will log things + logger := TDUnitXConsoleLogger.Create(true); + nunitLogger := TDUnitXXMLNUnitFileLogger.Create; + runner.AddLogger(logger); + runner.AddLogger(nunitLogger); + + //Run tests + results := runner.Execute; + + System.Write('Done.. press key to quit.'); + System.Readln; + except + on E: Exception do + System.Writeln(E.ClassName, ': ', E.Message); + end; +end. diff --git a/Examples/DUnitXExamples_D10Tokyo.dproj b/Examples/DUnitXExamples_D10Tokyo.dproj new file mode 100644 index 00000000..c0c1e7b8 --- /dev/null +++ b/Examples/DUnitXExamples_D10Tokyo.dproj @@ -0,0 +1,591 @@ + + + {8B735605-DC55-491C-9C13-C871E326E254} + 18.2 + DUnitXExamples_D10Tokyo.dpr + Debug + DCC32 + VCL + True + Win32 + 3 + Console + + + true + + + true + Base + true + + + true + Base + true + + + true + Base + true + + + true + Cfg_1 + true + true + + + true + Cfg_1 + true + true + + + true + Base + true + + + true + Cfg_2 + true + true + + + true + Cfg_2 + true + true + + + $(BDS)\bin\delphi_PROJECTICON.ico + $(BDS)\bin\delphi_PROJECTICNS.icns + DUnitXExamples_D10Tokyo + ..\;$(DelphiMocks);..\..\Delphi-Mocks;$(DCC_UnitSearchPath) + .\$(Platform)\$(Config) + .\$(Platform)\$(Config) + $(BDS)\bin\default_app.manifest + System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace) + CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments= + 3081 + DUnitXExamples.exe + 00400000 + x86 + + + Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) + 1033 + + + 1033 + Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace) + + + false + RELEASE;$(DCC_Define) + 0 + 0 + + + 1033 + + + 1033 + + + DEBUG;$(DCC_Define) + + + 1 + DUNITXDEBUG;madExcept;LeakChecking;$(DCC_Define) + 3 + 1033 + + + true + 1033 + + + + MainSource + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Cfg_2 + Base + + + Base + + + Cfg_1 + Base + + + + + Delphi.Personality.12 + + + + + DUnitXExamples_D10Tokyo.dpr + + + False + True + False + + + False + False + 1 + 0 + 0 + 0 + False + False + False + False + False + 3081 + 1252 + + + + + 1.0.0.0 + + + + + + 1.0.0.0 + + + + Embarcadero Metropolis UI Live Tile Standard Components + Embarcadero C++Builder Office 2000 Servers Package + Embarcadero C++Builder Office XP Servers Package + Microsoft Office 2000 Sample Automation Server Wrapper Components + Microsoft Office XP Sample Automation Server Wrapper Components + + + + False + True + True + + + + + DUnitXExamples_D10Tokyo.exe + true + + + + + DUnitXExamples_D10Tokyo.exe + true + + + + + 1 + + + Contents\MacOS + 0 + + + + + classes + 1 + + + + + library\lib\armeabi-v7a + 1 + + + + + library\lib\armeabi + 1 + + + + + library\lib\mips + 1 + + + + + + library\lib\armeabi-v7a + 1 + + + + + res\drawable + 1 + + + + + res\values + 1 + + + + + res\drawable + 1 + + + + + res\drawable-xxhdpi + 1 + + + + + res\drawable-ldpi + 1 + + + + + res\drawable-mdpi + 1 + + + + + res\drawable-hdpi + 1 + + + + + res\drawable-xhdpi + 1 + + + + + res\drawable-small + 1 + + + + + res\drawable-normal + 1 + + + + + res\drawable-large + 1 + + + + + res\drawable-xlarge + 1 + + + + + 1 + + + 1 + + + 0 + + + + + 1 + .framework + + + 0 + + + + + 1 + .dylib + + + 0 + .dll;.bpl + + + + + 1 + .dylib + + + 1 + .dylib + + + 1 + .dylib + + + 1 + .dylib + + + 0 + .bpl + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + + + ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF + 1 + + + ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF + 1 + + + + + + + + 1 + + + 1 + + + 1 + + + + + + + Contents\Resources + 1 + + + + + library\lib\armeabi-v7a + 1 + + + 1 + + + 1 + + + 1 + + + 1 + + + 1 + + + 0 + + + + + 1 + + + 1 + + + + + Assets + 1 + + + Assets + 1 + + + + + Assets + 1 + + + Assets + 1 + + + + + + + + + + + + + 12 + + + + diff --git a/Examples/DUnitXFiremonkeyGUI_D10Tokyo.dpr b/Examples/DUnitXFiremonkeyGUI_D10Tokyo.dpr new file mode 100644 index 00000000..1bca53d6 --- /dev/null +++ b/Examples/DUnitXFiremonkeyGUI_D10Tokyo.dpr @@ -0,0 +1,30 @@ +program DUnitXFiremonkeyGUI_D10Tokyo; + +uses + FMX.Forms, + DUNitX.Loggers.GUIX in '..\DUNitX.Loggers.GUIX.pas' {GUIXTestRunner}, + DUnitX.Examples.EqualityAsserts in 'DUnitX.Examples.EqualityAsserts.pas', + DUnitX.Examples.General in 'DUnitX.Examples.General.pas', + NonNamespacedExample in 'NonNamespacedExample.pas', + DUnitX.Generics in '..\DUnitX.Generics.pas', + DUnitX.InternalInterfaces in '..\DUnitX.InternalInterfaces.pas', + DUnitX.WeakReference in '..\DUnitX.WeakReference.pas', + DUnitX.FixtureResult in '..\DUnitX.FixtureResult.pas', + DUnitX.RunResults in '..\DUnitX.RunResults.pas', + DUnitX.Test in '..\DUnitX.Test.pas', + DUnitX.TestFixture in '..\DUnitX.TestFixture.pas', + DUnitX.TestFramework in '..\DUnitX.TestFramework.pas', + DUnitX.TestResult in '..\DUnitX.TestResult.pas', + DUnitX.TestRunner in '..\DUnitX.TestRunner.pas', + DUnitX.Utils in '..\DUnitX.Utils.pas', + DUnitX.IoC in '..\DUnitX.IoC.pas', + DUnitX.MemoryLeakMonitor.Default in '..\DUnitX.MemoryLeakMonitor.Default.pas', + DUnitX.DUnitCompatibility in '..\DUnitX.DUnitCompatibility.pas'; + +{$R *.res} + +begin + Application.Initialize; + Application.CreateForm(TGUIXTestRunner, GUIXTestRunner); + Application.Run; +end. diff --git a/Examples/DUnitXFiremonkeyGUI_D10Tokyo.dproj b/Examples/DUnitXFiremonkeyGUI_D10Tokyo.dproj new file mode 100644 index 00000000..95776d47 --- /dev/null +++ b/Examples/DUnitXFiremonkeyGUI_D10Tokyo.dproj @@ -0,0 +1,676 @@ + + + {5BF5CE09-7514-46AA-A240-F0FF29884E54} + 18.2 + FMX + DUnitXFiremonkeyGUI_D10Tokyo.dpr + True + Debug + Win64 + 7 + Application + + + true + + + true + Base + true + + + true + Base + true + + + true + Base + true + + + true + Base + true + + + true + Cfg_1 + true + true + + + true + Cfg_1 + true + true + + + true + Cfg_1 + true + true + + + true + Base + true + + + DUnitXFiremonkeyGUI_D10Tokyo + ..\;$(DCC_UnitSearchPath) + $(BDS)\bin\default_app.manifest + $(BDS)\bin\delphi_PROJECTICON.ico + $(BDS)\bin\delphi_PROJECTICNS.icns + System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace) + .\$(Platform)\$(Config) + .\$(Platform)\$(Config) + false + false + false + false + false + + + DataSnapIndy10ServerTransport;FireDACASADriver;FireDACSqliteDriver;bindcompfmx;DBXSqliteDriver;FireDACPgDriver;FireDACODBCDriver;fmx;rtl;dbrtl;DbxClientDriver;IndySystem;FireDACCommon;bindcomp;inetdb;DBXInterBaseDriver;DataSnapClient;DataSnapCommon;DataSnapServer;DataSnapProviderClient;xmlrtl;DbxCommonDriver;IndyProtocols;dbxcds;DBXMySQLDriver;FireDACCommonDriver;bindengine;soaprtl;bindcompdbx;fmxFireDAC;FireDACADSDriver;DBXOracleDriver;CustomIPTransport;FireDACMSSQLDriver;FireDAC;dsnap;IndyIPServer;fmxase;IndyCore;FireDACDataSnapDriver;IndyIPCommon;CloudService;FireDACIBDriver;DBXFirebirdDriver;inet;DBXInformixDriver;fmxobj;FireDACDBXDriver;FireDACMySQLDriver;inetdbxpress;DBXSybaseASADriver;FireDACOracleDriver;fmxdae;FireDACDb2Driver;RESTComponents;FireDACMSAccDriver;dbexpress;IndyIPClient;$(DCC_UsePackage) + CFBundleName=$(MSBuildProjectName);CFBundleDisplayName=$(MSBuildProjectName);CFBundleIdentifier=$(MSBuildProjectName);CFBundleVersion=1.0.0;CFBundlePackageType=APPL;CFBundleSignature=????;CFBundleAllowMixedLocalizations=YES;CFBundleExecutable=$(MSBuildProjectName);NSHighResolutionCapable=true;LSApplicationCategoryType=public.app-category.utilities;NSLocationWhenInUseUsageDescription=The reason for accessing the location information of the user;NSLocationAlwaysUsageDescription=The reason for accessing the location information of the user;NSContactsUsageDescription=The reason for accessing the contacts + true + + + CompanyName=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(MSBuildProjectName);FileDescription=$(MSBuildProjectName);ProductName=$(MSBuildProjectName) + 1033 + DataSnapIndy10ServerTransport;FireDACASADriver;FireDACSqliteDriver;bindcompfmx;DBXSqliteDriver;vcldbx;FireDACPgDriver;FireDACODBCDriver;fmx;rtl;dbrtl;DbxClientDriver;IndySystem;FireDACCommon;bindcomp;inetdb;inetdbbde;DBXInterBaseDriver;DataSnapClient;DataSnapCommon;DBXOdbcDriver;DataSnapServer;vclFireDAC;DataSnapProviderClient;xmlrtl;svnui;DBXSybaseASEDriver;DbxCommonDriver;vclimg;IndyProtocols;dbxcds;DBXMySQLDriver;DatasnapConnectorsFreePascal;FireDACCommonDriver;MetropolisUILiveTile;bindengine;vclactnband;vcldb;soaprtl;bindcompdbx;vcldsnap;bindcompvcl;vclie;fmxFireDAC;FireDACADSDriver;vcltouch;DBXDb2Driver;DBXOracleDriver;CustomIPTransport;vclribbon;VclSmp;FireDACMSSQLDriver;FireDAC;dsnap;IndyIPServer;fmxase;vcl;IndyCore;FireDACDataSnapDriver;VCLRESTComponents;IndyIPCommon;CloudService;DBXMSSQLDriver;dsnapcon;FireDACIBDriver;DBXFirebirdDriver;inet;DBXInformixDriver;fmxobj;FireDACDBXDriver;DataSnapConnectors;FireDACMySQLDriver;vclx;inetdbxpress;svn;DBXSybaseASADriver;FireDACOracleDriver;fmxdae;FireDACDb2Driver;RESTComponents;bdertl;adortl;FireDACMSAccDriver;dbexpress;IndyIPClient;$(DCC_UsePackage) + Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) + true + $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png + $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png + + + CompanyName=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(MSBuildProjectName);FileDescription=$(MSBuildProjectName);ProductName=$(MSBuildProjectName) + true + Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace) + 1033 + DataSnapIndy10ServerTransport;FireDACASADriver;FireDACSqliteDriver;bindcompfmx;DBXSqliteDriver;FireDACPgDriver;FireDACODBCDriver;fmx;rtl;dbrtl;DbxClientDriver;IndySystem;FireDACCommon;bindcomp;inetdb;DBXInterBaseDriver;DataSnapClient;DataSnapCommon;DBXOdbcDriver;DataSnapServer;vclFireDAC;DataSnapProviderClient;xmlrtl;DBXSybaseASEDriver;DbxCommonDriver;vclimg;IndyProtocols;dbxcds;DBXMySQLDriver;DatasnapConnectorsFreePascal;FireDACCommonDriver;MetropolisUILiveTile;bindengine;vclactnband;vcldb;soaprtl;bindcompdbx;vcldsnap;bindcompvcl;vclie;fmxFireDAC;FireDACADSDriver;vcltouch;DBXDb2Driver;DBXOracleDriver;CustomIPTransport;vclribbon;VclSmp;FireDACMSSQLDriver;FireDAC;dsnap;IndyIPServer;fmxase;vcl;IndyCore;FireDACDataSnapDriver;VCLRESTComponents;IndyIPCommon;CloudService;DBXMSSQLDriver;dsnapcon;FireDACIBDriver;DBXFirebirdDriver;inet;DBXInformixDriver;fmxobj;FireDACDBXDriver;DataSnapConnectors;FireDACMySQLDriver;vclx;inetdbxpress;DBXSybaseASADriver;FireDACOracleDriver;fmxdae;FireDACDb2Driver;RESTComponents;adortl;FireDACMSAccDriver;dbexpress;IndyIPClient;$(DCC_UsePackage) + $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png + $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png + + + DEBUG;$(DCC_Define) + true + false + true + true + true + + + Debug + + + 1033 + true + false + Debug + + + true + 1033 + Debug + + + false + RELEASE;$(DCC_Define) + 0 + 0 + + + + MainSource + + +
GUIXTestRunner
+ fmx +
+ + + + + + + + + + + + + + + + + + + Cfg_2 + Base + + + Base + + + Cfg_1 + Base + +
+ + Delphi.Personality.12 + + + + + False + False + 1 + 0 + 0 + 0 + False + False + False + False + False + 1046 + 1252 + + + + + 1.0.0.0 + + + + + + 1.0.0.0 + + + + + + + + + + + + + + + + + + + + + + + + + + + DUnitXFiremonkeyGUI_D10Tokyo.dpr + + + Embarcadero C++Builder Office 2000 Servers Package + Embarcadero C++Builder Office XP Servers Package + Microsoft Office 2000 Sample Automation Server Wrapper Components + Microsoft Office XP Sample Automation Server Wrapper Components + + + + + + true + + + + + true + + + + + true + + + + + true + + + + + 1 + + + Contents\MacOS + 1 + + + Contents\MacOS + 0 + + + + + classes + 1 + + + + + library\lib\armeabi-v7a + 1 + + + + + library\lib\armeabi + 1 + + + + + library\lib\mips + 1 + + + + + + library\lib\armeabi-v7a + 1 + + + + + res\drawable + 1 + + + + + res\values + 1 + + + + + res\drawable + 1 + + + + + res\drawable-xxhdpi + 1 + + + + + res\drawable-ldpi + 1 + + + + + res\drawable-mdpi + 1 + + + + + res\drawable-hdpi + 1 + + + + + res\drawable-xhdpi + 1 + + + + + res\drawable-small + 1 + + + + + res\drawable-normal + 1 + + + + + res\drawable-large + 1 + + + + + res\drawable-xlarge + 1 + + + + + 1 + + + Contents\MacOS + 1 + + + 0 + + + + + Contents\MacOS + 1 + .framework + + + 0 + + + + + 1 + .dylib + + + 1 + .dylib + + + 1 + .dylib + + + Contents\MacOS + 1 + .dylib + + + 0 + .dll;.bpl + + + + + 1 + .dylib + + + 1 + .dylib + + + 1 + .dylib + + + Contents\MacOS + 1 + .dylib + + + 0 + .bpl + + + + + 0 + + + 0 + + + 0 + + + 0 + + + Contents\Resources\StartUp\ + 0 + + + 0 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + + + ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF + 1 + + + ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF + 1 + + + + + 1 + + + 1 + + + + + ..\ + 1 + + + ..\ + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + ..\ + 1 + + + + + Contents + 1 + + + + + Contents\Resources + 1 + + + + + library\lib\armeabi-v7a + 1 + + + 1 + + + 1 + + + 1 + + + 1 + + + Contents\MacOS + 1 + + + 0 + + + + + 1 + + + 1 + + + + + Assets + 1 + + + Assets + 1 + + + + + Assets + 1 + + + Assets + 1 + + + + + + + + + + + + + True + True + True + + + 12 + + + + +
diff --git a/Expert/DUnitX_IDE_Expert_D10Tokyo.dpk b/Expert/DUnitX_IDE_Expert_D10Tokyo.dpk new file mode 100644 index 00000000..f3b31487 --- /dev/null +++ b/Expert/DUnitX_IDE_Expert_D10Tokyo.dpk @@ -0,0 +1,51 @@ +package DUnitX_IDE_Expert_D10Tokyo; + +{$R *.res} +{$R *.dres} +{$IFDEF IMPLICITBUILDING This IFDEF should not be used by users} +{$ALIGN 8} +{$ASSERTIONS ON} +{$BOOLEVAL OFF} +{$DEBUGINFO OFF} +{$EXTENDEDSYNTAX ON} +{$IMPORTEDDATA ON} +{$IOCHECKS ON} +{$LOCALSYMBOLS ON} +{$LONGSTRINGS ON} +{$OPENSTRINGS ON} +{$OPTIMIZATION OFF} +{$OVERFLOWCHECKS OFF} +{$RANGECHECKS OFF} +{$REFERENCEINFO ON} +{$SAFEDIVIDE OFF} +{$STACKFRAMES ON} +{$TYPEDADDRESS OFF} +{$VARSTRINGCHECKS ON} +{$WRITEABLECONST OFF} +{$MINENUMSIZE 1} +{$IMAGEBASE $400000} +{$DEFINE DEBUG} +{$ENDIF IMPLICITBUILDING} +{$DESCRIPTION 'DUnitX IDE Expert'} +{$DESIGNONLY} +{$IMPLICITBUILD ON} + +requires + rtl, + designide, + ExpertsCreators; + +contains + DUnitX.Expert.CodeGen.SourceFile in 'DUnitX.Expert.CodeGen.SourceFile.pas', + DUnitX.Expert.Registration in 'DUnitX.Expert.Registration.pas', + DUnitX.Expert.Forms.NewUnitWizard in 'DUnitX.Expert.Forms.NewUnitWizard.pas' {frmDunitXNewUnit}, + DUnitX.Expert.Forms.NewProjectWizard in 'DUnitX.Expert.Forms.NewProjectWizard.pas' {frmDunitXNewProject}, + DUnitX.Expert.CodeGen.NewUnit in 'DUnitX.Expert.CodeGen.NewUnit.pas', + DUnitX.Expert.CodeGen.NewTestProject in 'DUnitX.Expert.CodeGen.NewTestProject.pas', + DUnitX.Expert.CodeGen.Templates in 'DUnitX.Expert.CodeGen.Templates.pas', + DUnitX.Expert.CodeGen.NewProject in 'DUnitX.Expert.CodeGen.NewProject.pas', + DUnitX.Expert.CodeGen.NewTestUnit in 'DUnitX.Expert.CodeGen.NewTestUnit.pas', + DUnitX.Expert.NewUnitWizardEx in 'DUnitX.Expert.NewUnitWizardEx.pas', + DUnitX.Expert.ProjectWizardEx in 'DUnitX.Expert.ProjectWizardEx.pas'; + +end. diff --git a/Expert/DUnitX_IDE_Expert_D10Tokyo.dproj b/Expert/DUnitX_IDE_Expert_D10Tokyo.dproj new file mode 100644 index 00000000..3d38c48e --- /dev/null +++ b/Expert/DUnitX_IDE_Expert_D10Tokyo.dproj @@ -0,0 +1,587 @@ + + + {516CEAEF-DA74-4CBA-9344-CD4C630B73A8} + DUnitX_IDE_Expert_D10Tokyo.dpk + 18.2 + VCL + True + Debug + Win32 + 1 + Package + + + true + + + true + Base + true + + + true + Base + true + + + true + Base + true + + + true + Base + true + + + true + Cfg_1 + true + true + + + true + Base + true + + + ..\;$(DCC_UnitSearchPath) + DUnitX_IDE_Expert_D10Tokyo + DUnitX - IDE Expert + 1033 + true + CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments= + true + true + System;Xml;Data;Datasnap;Web;Soap;Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;$(DCC_Namespace) + All + .\$(Platform)\$(Config) + .\$(Platform)\$(Config) + false + false + false + false + false + + + rtl;$(DCC_UsePackage) + + + rtl;$(DCC_UsePackage) + 1033 + Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) + CompanyName=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(MSBuildProjectName);FileDescription=$(MSBuildProjectName);ProductName=$(MSBuildProjectName) + true + + + rtl;$(DCC_UsePackage) + + + DEBUG;$(DCC_Define) + true + false + true + true + true + + + true + DUnitX IDE Expert + false + + + false + RELEASE;$(DCC_Define) + 0 + 0 + + + + MainSource + + + + + + + +
frmDunitXNewUnit
+ dfm +
+ +
frmDunitXNewProject
+ dfm +
+ + + + + + + + + ICON + DUnitXNewProjectIcon + + + ICON + DUnitXNewUnitIcon + + + Cfg_2 + Base + + + Base + + + Cfg_1 + Base + +
+ + Delphi.Personality.12 + Package + + + + DUnitX_IDE_Expert_D10Tokyo.dpk + + + True + False + 1 + 0 + 0 + 0 + False + False + False + False + False + 1033 + 1252 + + + + + 1.0.0.0 + + + + + + 1.0.0.0 + + + + + + + + + + + + + + + + + + + + + + + + + + + Embarcadero C++Builder Office 2000 Servers Package + Embarcadero C++Builder Office XP Servers Package + Microsoft Office 2000 Sample Automation Server Wrapper Components + Microsoft Office XP Sample Automation Server Wrapper Components + + + + + + DUnitX_IDE_Expert_D10Tokyo.bpl + true + + + + + 1 + + + Contents\MacOS + 0 + + + + + classes + 1 + + + + + library\lib\armeabi-v7a + 1 + + + + + library\lib\armeabi + 1 + + + + + library\lib\mips + 1 + + + + + + library\lib\armeabi-v7a + 1 + + + + + res\drawable + 1 + + + + + res\values + 1 + + + + + res\drawable + 1 + + + + + res\drawable-xxhdpi + 1 + + + + + res\drawable-ldpi + 1 + + + + + res\drawable-mdpi + 1 + + + + + res\drawable-hdpi + 1 + + + + + res\drawable-xhdpi + 1 + + + + + res\drawable-small + 1 + + + + + res\drawable-normal + 1 + + + + + res\drawable-large + 1 + + + + + res\drawable-xlarge + 1 + + + + + 1 + + + 1 + + + 0 + + + + + 1 + .framework + + + 0 + + + + + 1 + .dylib + + + 0 + .dll;.bpl + + + + + 1 + .dylib + + + 1 + .dylib + + + 1 + .dylib + + + 1 + .dylib + + + 0 + .bpl + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + + + ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF + 1 + + + ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF + 1 + + + + + + + + 1 + + + 1 + + + 1 + + + + + + + Contents\Resources + 1 + + + + + library\lib\armeabi-v7a + 1 + + + 1 + + + 1 + + + 1 + + + 1 + + + 1 + + + 0 + + + + + 1 + + + 1 + + + + + Assets + 1 + + + Assets + 1 + + + + + Assets + 1 + + + Assets + 1 + + + + + + + + + + + + + False + True + False + + + C:\dev\DUnitX\Expert\Test\DUnitX_IDE_Expert_XE5Tests.dproj + + + 12 + + + + +
diff --git a/Tests/DUnitX.Tests.Assert.pas b/Tests/DUnitX.Tests.Assert.pas index 66f6ef2f..e9f7f562 100644 --- a/Tests/DUnitX.Tests.Assert.pas +++ b/Tests/DUnitX.Tests.Assert.pas @@ -28,7 +28,7 @@ interface -{$I DUnitX.inc} +{$I ..\DUnitX.inc} uses DUnitX.TestFramework; @@ -177,10 +177,10 @@ TTestsAssert = class [Test] [TestCase( 'substring', 'ing,a string,false' )] [TestCase( 'substring - case sensitive', 'ing,a string,true' )] - procedure EndsWith_SubString_Is_At_The_End__Of_String( const subString, theString: string; caseSensitive: boolean ); - [Test] [TestCase( 'empty substring', ',a string,false' )] [TestCase( 'empty substring - case sensitive', ',a string,true' )] + procedure EndsWith_SubString_Is_At_The_End__Of_String( const subString, theString: string; caseSensitive: boolean ); + [Test] [TestCase( 'empty string', 'substring,,false' )] [TestCase( 'empty string - case sensitive', 'substring,,true' )] [TestCase( 'at start of string', 'at the,at the end if the substring,false' )] diff --git a/Tests/DUnitXTest_D10Tokyo.dpr b/Tests/DUnitXTest_D10Tokyo.dpr new file mode 100644 index 00000000..c09866d9 --- /dev/null +++ b/Tests/DUnitXTest_D10Tokyo.dpr @@ -0,0 +1,124 @@ +program DUnitXTest_D10Tokyo; + +{$IFNDEF GUI} +{$APPTYPE CONSOLE} +{$ENDIF} + +{$STRONGLINKTYPES ON} + +uses + System.SysUtils, + DUnitX.Loggers.GUI.VCL in '..\DUnitX.Loggers.GUI.VCL.pas', + DUnitX.Loggers.Console in '..\DUnitX.Loggers.Console.pas', + DUnitX.Loggers.Text in '..\DUnitX.Loggers.Text.pas', + DUnitX.MacOS.Console in '..\DUnitX.MacOS.Console.pas', + DUnitX.Windows.Console in '..\DUnitX.Windows.Console.pas', + DUnitX.ConsoleWriter.Base in '..\DUnitX.ConsoleWriter.Base.pas', + DUnitX.Loggers.XML.xUnit in '..\DUnitX.Loggers.XML.xUnit.pas', + DUnitX.Generics in '..\DUnitX.Generics.pas', + DUnitX.Utils in '..\DUnitX.Utils.pas', + DUnitX.WeakReference in '..\DUnitX.WeakReference.pas', + DUnitX.Test in '..\DUnitX.Test.pas', + DUnitX.TestFixture in '..\DUnitX.TestFixture.pas', + DUnitX.TestResult in '..\DUnitX.TestResult.pas', + DUnitX.RunResults in '..\DUnitX.RunResults.pas', + DUnitX.TestRunner in '..\DUnitX.TestRunner.pas', + DUnitX.InternalInterfaces in '..\DUnitX.InternalInterfaces.pas', + DUnitX.TestFramework in '..\DUnitX.TestFramework.pas', + DUnitX.DUnitCompatibility in '..\DUnitX.DUnitCompatibility.pas', + DUnitX.IoC in '..\DUnitX.IoC.pas', + DUnitX.Utils.XML in '..\DUnitX.Utils.XML.pas', + DUnitX.StackTrace.JCL in '..\DUnitX.StackTrace.JCL.pas', + DUnitX.StackTrace.MadExcept3 in '..\DUnitX.StackTrace.MadExcept3.pas', + DUnitX.StackTrace.MadExcept4 in '..\DUnitX.StackTrace.MadExcept4.pas', + DUnitX.StackTrace.EurekaLog7 in '..\DUnitX.StackTrace.EurekaLog7.pas', + DUnitX.Loggers.Null in '..\DUnitX.Loggers.Null.pas', + DUnitX.FixtureResult in '..\DUnitX.FixtureResult.pas', + DUnitX.Tests.Assert in 'DUnitX.Tests.Assert.pas', + DUnitX.Tests.DUnitCompatibility in 'DUnitX.Tests.DUnitCompatibility.pas', + DUnitX.Tests.Example in 'DUnitX.Tests.Example.pas', + DUnitX.Tests.Framework in 'DUnitX.Tests.Framework.pas', + DUnitX.Tests.IoC in 'DUnitX.Tests.IoC.pas', + DUnitX.Tests.TestFixture in 'DUnitX.Tests.TestFixture.pas', + DUnitX.Tests.Utils.XML in 'DUnitX.Tests.Utils.XML.pas', + DUnitX.Tests.WeakReference in 'DUnitX.Tests.WeakReference.pas', + DUnitX.Tests.Loggers.XML.NUnit in 'DUnitX.Tests.Loggers.XML.NUnit.pas', + DUnitX.Loggers.XML.NUnit in '..\DUnitX.Loggers.XML.NUnit.pas', + DUnitX.SingleNameSpace in 'DUnitX.SingleNameSpace.pas', + DUnitX.MemoryLeakMonitor.Default in '..\DUnitX.MemoryLeakMonitor.Default.pas', + DUnitX.MemoryLeakMonitor.FastMM4 in '..\DUnitX.MemoryLeakMonitor.FastMM4.pas', + DUnitX.Tests.MemoryLeaks in 'DUnitX.Tests.MemoryLeaks.pas', + DUnitX.Extensibility in '..\DUnitX.Extensibility.pas', + DUnitX.Extensibility.PluginManager in '..\DUnitX.Extensibility.PluginManager.pas', + DUnitX.FixtureProviderPlugin in '..\DUnitX.FixtureProviderPlugin.pas', + DUnitX.Tests.CommandLineParser in 'DUnitX.Tests.CommandLineParser.pas', + DUnitX.Filters in '..\DUnitX.Filters.pas', + DUnitX.CategoryExpression in '..\DUnitX.CategoryExpression.pas', + DUnitX.Tests.CategoryParser in 'DUnitX.Tests.CategoryParser.pas', + DUnitX.TestNameParser in '..\DUnitX.TestNameParser.pas', + DUnitX.Tests.TestNameParser in 'DUnitX.Tests.TestNameParser.pas', + DUnitX.AutoDetect.Console in '..\DUnitX.AutoDetect.Console.pas', + DUnitX.CommandLine.OptionDef in '..\DUnitX.CommandLine.OptionDef.pas', + DUnitX.CommandLine.Options in '..\DUnitX.CommandLine.Options.pas', + DUnitX.CommandLine.Parser in '..\DUnitX.CommandLine.Parser.pas', + DUnitX.OptionsDefinition in '..\DUnitX.OptionsDefinition.pas', + DUnitX.FilterBuilder in '..\DUnitX.FilterBuilder.pas', + DUnitX.Tests.Inheritance in 'DUnitX.Tests.Inheritance.pas', + DUnitX.Tests.ConsoleWriter.Base in 'DUnitX.Tests.ConsoleWriter.Base.pas', + DUnitX.Assert in '..\DUnitX.Assert.pas', + DUnitX.Types in '..\DUnitX.Types.pas', + DUnitX.Attributes in '..\DUnitX.Attributes.pas'; + +var + runner : ITestRunner; + results : IRunResults; + logger : ITestLogger; + nunitLogger : ITestLogger; +begin + {$IFDEF GUI} + DUnitX.Loggers.GUI.VCL.Run; + exit; + {$ENDIF} + + try + TDUnitX.CheckCommandLine; + //Create the runner + runner := TDUnitX.CreateRunner; + runner.UseRTTI := True; + runner.FailsOnNoAsserts := True; //Assertions must be made during tests; + //tell the runner how we will log things + logger := TDUnitXConsoleLogger.Create(false); + nunitLogger := TDUnitXXMLNUnitFileLogger.Create(TDUnitX.Options.XMLOutputFile); + runner.AddLogger(logger); + runner.AddLogger(nunitLogger); + + logger := nil; + nunitLogger := nil; + //Run tests + results := runner.Execute; + runner := nil; + //Let the CI Server know that something failed. + + {$IFDEF CI} + if not results.AllPassed then + System.ExitCode := EXIT_ERRORS; + {$ELSE} + //We don;t want this happening when running under CI. + if TDUnitX.Options.ExitBehavior = TDUnitXExitBehavior.Pause then + begin + System.Write('Done... Press key to quit.'); + System.Readln; + end; + {$ENDIF} + results := nil; + + except + on E: Exception do + begin + System.Writeln(E.ClassName, ': ', E.Message); + {$IFNDEF CI} + System.Readln; + {$ENDIF} + end; + end; +end. diff --git a/Tests/DUnitXTest_D10Tokyo.dproj b/Tests/DUnitXTest_D10Tokyo.dproj new file mode 100644 index 00000000..ed576a16 --- /dev/null +++ b/Tests/DUnitXTest_D10Tokyo.dproj @@ -0,0 +1,601 @@ + + + {78AC97F9-EC37-4A68-8525-9C5EC2F94223} + DUnitXTest_D10Tokyo.dpr + Debug + DCC32 + 18.2 + VCL + True + Win64 + 3 + Console + + + true + + + true + Base + true + + + true + Base + true + + + true + Base + true + + + true + Cfg_2 + true + true + + + $(BDS)\bin\delphi_PROJECTICON.ico + $(BDS)\bin\delphi_PROJECTICNS.icns + DUnitXTest_D10Tokyo + rtl;vcl;vclx;vclactnband;xmlrtl;vclimg;dbrtl;vcldb;vcldbx;bdertl;vcltouch;dsnap;dsnapcon;vclie;webdsnap;inet;inetdbbde;inetdbxpress;soaprtl;DbxCommonDriver;DbxClientDriver;DBXInterBaseDriver;DBXMySQLDriver;dbexpress;dbxcds;FBDream2010;SynEdit_R2010;NxCommonRun;NxGridRun;KWizardD2010R;GFDLIB2009;dclRouteMapD2010;tb2k_d12;SpTBXLib_d12;dwWin7Controls_2010;IndyCore140;IndySystem140;IndyProtocols140;lmddocking11rt_140;lmdrtl11rt_140;RaizeComponentsVcl;FBMiscComponents;FBFormDesigner;FBSynEditHighlighters;VSPageR;madBasic_;madDisAsm_;madExcept_;adortl;TeeWorld814;TeeImage814;TeeLanguage814;TeePro814;TeeGL814;TeeUI814;TeeDB814;Tee814;VirtualTreesR;VSMessageAPIDesign;VSMessageAPIRun;$(DCC_UsePackage) + .\$(Platform)\$(Config) + .\$(Platform)\$(Config) + $(BDS)\bin\default_app.manifest + ..\;$(DelphiMocks);..\..\Delphi-Mocks;$(DCC_UnitSearchPath) + System;Xml;Data;Datasnap;Web;Soap;Winapi;Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;$(DCC_Namespace) + CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments= + 3081 + %Platform%\%Config%\DUnitXTest.exe + 00400000 + x86 + + + 1033 + System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace) + + + false + RELEASE;$(DCC_Define) + 0 + 0 + + + 3 + DEBUG;$(DCC_Define) + + + DUNITXDEBUG;$(DCC_Define) + + + + MainSource + + +
GUIVCLTestRunner
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Cfg_2 + Base + + + Base + + + Cfg_1 + Base + +
+ + + Delphi.Personality.12 + VCLApplication + + + + DUnitXTest_D10Tokyo.dpr + + + False + True + False + + + False + False + 1 + 0 + 0 + 0 + False + False + False + False + False + 3081 + 1252 + + + + + 1.0.0.0 + + + + + + 1.0.0.0 + + + + Embarcadero Metropolis UI Live Tile Standard Components + Embarcadero C++Builder Office 2000 Servers Package + Embarcadero C++Builder Office XP Servers Package + Microsoft Office 2000 Sample Automation Server Wrapper Components + Microsoft Office XP Sample Automation Server Wrapper Components + + + + False + True + True + + + + + DUnitXTest_D10Tokyo.exe + true + + + + + .\ + true + + + + + .\ + true + + + + + .\ + true + + + + + DUnitXTest_D10Tokyo.exe + true + + + + + 1 + + + Contents\MacOS + 0 + + + + + classes + 1 + + + + + library\lib\armeabi-v7a + 1 + + + + + library\lib\armeabi + 1 + + + + + library\lib\mips + 1 + + + + + + library\lib\armeabi-v7a + 1 + + + + + res\drawable + 1 + + + + + res\values + 1 + + + + + res\drawable + 1 + + + + + res\drawable-xxhdpi + 1 + + + + + res\drawable-ldpi + 1 + + + + + res\drawable-mdpi + 1 + + + + + res\drawable-hdpi + 1 + + + + + res\drawable-xhdpi + 1 + + + + + res\drawable-small + 1 + + + + + res\drawable-normal + 1 + + + + + res\drawable-large + 1 + + + + + res\drawable-xlarge + 1 + + + + + 1 + + + 1 + + + 0 + + + + + 1 + .framework + + + 0 + + + + + 1 + .dylib + + + 0 + .dll;.bpl + + + + + 1 + .dylib + + + 1 + .dylib + + + 1 + .dylib + + + 1 + .dylib + + + 0 + .bpl + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + + + ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF + 1 + + + ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF + 1 + + + + + + + + 1 + + + 1 + + + 1 + + + + + + + Contents\Resources + 1 + + + + + library\lib\armeabi-v7a + 1 + + + 1 + + + 1 + + + 1 + + + 1 + + + 1 + + + 0 + + + + + 1 + + + 1 + + + + + Assets + 1 + + + Assets + 1 + + + + + Assets + 1 + + + Assets + 1 + + + + + + + + + + + + + 12 + + + +