From f29d2c0dfce3a79cdb84803e0005f7a58badee82 Mon Sep 17 00:00:00 2001 From: Vincent Parrett Date: Wed, 9 Jun 2021 11:22:36 +1000 Subject: [PATCH] Used unit namespaces, removed all efforts to support earlier than XE2 (pointless). --- README.md | 4 +- Source/Delphi.Mocks.AutoMock.pas | 2 +- Source/Delphi.Mocks.Behavior.pas | 4 +- Source/Delphi.Mocks.Expectation.pas | 4 +- Source/Delphi.Mocks.Helpers.pas | 18 +- Source/Delphi.Mocks.Interfaces.pas | 10 +- Source/Delphi.Mocks.MethodData.pas | 6 +- Source/Delphi.Mocks.ObjectProxy.pas | 11 +- Source/Delphi.Mocks.ParamMatcher.pas | 12 +- Source/Delphi.Mocks.Proxy.TypeInfo.pas | 8 +- Source/Delphi.Mocks.Proxy.pas | 8 +- Source/Delphi.Mocks.ReturnTypePatch.pas | 4 +- Source/Delphi.Mocks.Utils.pas | 8 +- Source/Delphi.Mocks.Validation.pas | 2 +- Source/Delphi.Mocks.VirtualInterface.pas | 61 -- .../Delphi.Mocks.VirtualMethodInterceptor.pas | 24 - Source/Delphi.Mocks.WeakReference.pas | 56 -- Source/Delphi.Mocks.When.pas | 2 +- Source/Delphi.Mocks.inc | 36 +- Source/Delphi.Mocks.pas | 14 +- Source/DelphiMocks.dpk | 52 + Source/DelphiMocks.dproj | 170 ++++ Source/DelphiMocks104.dpk | 52 + Source/DelphiMocks104.dproj | 891 ++++++++++++++++++ Source/DelphiMocksXE5.dpk | 52 + Source/DelphiMocksXE5.dproj | 164 ++++ VSoft.DelphiMocks.dspec | 102 +- 27 files changed, 1534 insertions(+), 243 deletions(-) delete mode 100644 Source/Delphi.Mocks.VirtualInterface.pas delete mode 100644 Source/Delphi.Mocks.VirtualMethodInterceptor.pas create mode 100644 Source/DelphiMocks.dpk create mode 100644 Source/DelphiMocks.dproj create mode 100644 Source/DelphiMocks104.dpk create mode 100644 Source/DelphiMocks104.dproj create mode 100644 Source/DelphiMocksXE5.dpk create mode 100644 Source/DelphiMocksXE5.dproj diff --git a/README.md b/README.md index f3ec469..cb21d0e 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Delphi Mocks -Delphi Mocks is a simple mocking framework for Delphi XE2 or later. It makes use of RTTI features that are only available in Delphi XE2, however I do hope to be able to get it working with earlier versions of Delphi (2010 or later) at some stage. +Delphi Mocks is a simple mocking framework for Delphi XE2 or later. It makes use of RTTI features that are only available in Delphi XE2. # Example @@ -43,7 +43,7 @@ type implementation uses - Rtti; + System.Rtti; { TMockObjectTests } diff --git a/Source/Delphi.Mocks.AutoMock.pas b/Source/Delphi.Mocks.AutoMock.pas index 134a1ad..67459e1 100644 --- a/Source/Delphi.Mocks.AutoMock.pas +++ b/Source/Delphi.Mocks.AutoMock.pas @@ -3,7 +3,7 @@ interface uses - TypInfo, + System.TypInfo, System.Generics.Collections, Delphi.Mocks, Delphi.Mocks.WeakReference; diff --git a/Source/Delphi.Mocks.Behavior.pas b/Source/Delphi.Mocks.Behavior.pas index e04a8cf..fbaaaa9 100644 --- a/Source/Delphi.Mocks.Behavior.pas +++ b/Source/Delphi.Mocks.Behavior.pas @@ -28,8 +28,8 @@ interface uses - Rtti, - SysUtils, + System.Rtti, + System.SysUtils, Delphi.Mocks, Delphi.Mocks.Interfaces, Delphi.Mocks.ParamMatcher; diff --git a/Source/Delphi.Mocks.Expectation.pas b/Source/Delphi.Mocks.Expectation.pas index f7e011c..665420f 100644 --- a/Source/Delphi.Mocks.Expectation.pas +++ b/Source/Delphi.Mocks.Expectation.pas @@ -29,7 +29,7 @@ interface uses - Rtti, + System.Rtti, Delphi.Mocks, Delphi.Mocks.ParamMatcher, Delphi.Mocks.Interfaces, @@ -96,7 +96,7 @@ TExpectation = class(TInterfacedObject,IExpectation) implementation uses - SysUtils, + System.SysUtils, Delphi.Mocks.Helpers; { TExpectation } diff --git a/Source/Delphi.Mocks.Helpers.pas b/Source/Delphi.Mocks.Helpers.pas index cf4434f..e91c3ff 100644 --- a/Source/Delphi.Mocks.Helpers.pas +++ b/Source/Delphi.Mocks.Helpers.pas @@ -33,7 +33,7 @@ interface uses - Rtti; + System.Rtti; type //TValue really needs to have an Equals operator overload! @@ -85,11 +85,11 @@ function SameValue(const Left, Right: TValue): Boolean; implementation uses - SysUtils, - Math, - TypInfo, - Variants, - StrUtils; + System.SysUtils, + System.Math, + System.TypInfo, + System.Variants, + System.StrUtils; var Context : TRttiContext; @@ -107,11 +107,11 @@ function CompareValue(const Left, Right: TValue): Integer; if leftIsEmpty or rightIsEmpty then Result := EmptyResults[leftIsEmpty, rightIsEmpty] else if left.IsOrdinal and right.IsOrdinal then - Result := Math.CompareValue(left.AsOrdinal, right.AsOrdinal) + Result := System.Math.CompareValue(left.AsOrdinal, right.AsOrdinal) else if left.IsFloat and right.IsFloat then - Result := Math.CompareValue(left.AsExtended, right.AsExtended) + Result := System.Math.CompareValue(left.AsExtended, right.AsExtended) else if left.IsString and right.IsString then - Result := SysUtils.AnsiCompareStr(left.AsString, right.AsString) + Result := System.SysUtils.AnsiCompareStr(left.AsString, right.AsString) else if left.IsObject and right.IsObject then Result := NativeInt(left.AsObject) - NativeInt(right.AsObject) // TODO: instance comparer else if Left.IsInterface and Right.IsInterface then diff --git a/Source/Delphi.Mocks.Interfaces.pas b/Source/Delphi.Mocks.Interfaces.pas index 81bb503..df2ce56 100644 --- a/Source/Delphi.Mocks.Interfaces.pas +++ b/Source/Delphi.Mocks.Interfaces.pas @@ -28,12 +28,12 @@ interface uses - SysUtils, - TypInfo, - Generics.Collections, + System.SysUtils, + System.TypInfo, + System.Rtti, + System.Generics.Collections, Delphi.Mocks, - Delphi.Mocks.ParamMatcher, - Rtti; + Delphi.Mocks.ParamMatcher; type TBehaviorType = (WillReturn,ReturnDefault,WillRaise,WillRaiseAlways,WillExecute,WillExecuteWhen); diff --git a/Source/Delphi.Mocks.MethodData.pas b/Source/Delphi.Mocks.MethodData.pas index 0762613..2c351c2 100644 --- a/Source/Delphi.Mocks.MethodData.pas +++ b/Source/Delphi.Mocks.MethodData.pas @@ -31,9 +31,9 @@ interface uses - Rtti, - SysUtils, - Generics.Collections, + System.Rtti, + System.SysUtils, + System.Generics.Collections, Delphi.Mocks, Delphi.Mocks.Interfaces, Delphi.Mocks.ParamMatcher; diff --git a/Source/Delphi.Mocks.ObjectProxy.pas b/Source/Delphi.Mocks.ObjectProxy.pas index 6013cce..50dd760 100644 --- a/Source/Delphi.Mocks.ObjectProxy.pas +++ b/Source/Delphi.Mocks.ObjectProxy.pas @@ -28,14 +28,13 @@ interface uses - Rtti, - SysUtils, - TypInfo, - Generics.Collections, + System.Rtti, + System.SysUtils, + System.TypInfo, + System.Generics.Collections, Delphi.Mocks, Delphi.Mocks.Interfaces, - Delphi.Mocks.Proxy, - Delphi.Mocks.VirtualMethodInterceptor; + Delphi.Mocks.Proxy; type TObjectProxy = class(TProxy) diff --git a/Source/Delphi.Mocks.ParamMatcher.pas b/Source/Delphi.Mocks.ParamMatcher.pas index 3d75b6e..0f2ae83 100644 --- a/Source/Delphi.Mocks.ParamMatcher.pas +++ b/Source/Delphi.Mocks.ParamMatcher.pas @@ -28,10 +28,10 @@ interface uses - Generics.Collections, - SysUtils, - TypInfo, - Rtti; + System.Generics.Collections, + System.SysUtils, + System.TypInfo, + System.Rtti; type @@ -67,8 +67,8 @@ TMatcherFactory = class implementation uses - Classes, - SyncObjs; + System.Classes, + System.SyncObjs; { TMatcherFactory } diff --git a/Source/Delphi.Mocks.Proxy.TypeInfo.pas b/Source/Delphi.Mocks.Proxy.TypeInfo.pas index e8681e6..77d9f0e 100644 --- a/Source/Delphi.Mocks.Proxy.TypeInfo.pas +++ b/Source/Delphi.Mocks.Proxy.TypeInfo.pas @@ -28,10 +28,10 @@ interface uses - Rtti, - SysUtils, - Generics.Collections, - TypInfo, + System.Rtti, + System.SysUtils, + System.Generics.Collections, + System.TypInfo, Delphi.Mocks, Delphi.Mocks.Proxy, Delphi.Mocks.WeakReference, diff --git a/Source/Delphi.Mocks.Proxy.pas b/Source/Delphi.Mocks.Proxy.pas index 38d9e04..baf341f 100644 --- a/Source/Delphi.Mocks.Proxy.pas +++ b/Source/Delphi.Mocks.Proxy.pas @@ -28,10 +28,10 @@ interface uses - Rtti, - SysUtils, - TypInfo, - Generics.Collections, + System.Rtti, + System.SysUtils, + System.TypInfo, + System.Generics.Collections, Delphi.Mocks, Delphi.Mocks.WeakReference, Delphi.Mocks.Interfaces, diff --git a/Source/Delphi.Mocks.ReturnTypePatch.pas b/Source/Delphi.Mocks.ReturnTypePatch.pas index 1a4976f..69fa720 100644 --- a/Source/Delphi.Mocks.ReturnTypePatch.pas +++ b/Source/Delphi.Mocks.ReturnTypePatch.pas @@ -54,8 +54,8 @@ initialization interface uses - Rtti, - TypInfo; + System.Rtti, + System.TypInfo; type ReturnTypePatchAttribute = class(TCustomAttribute) diff --git a/Source/Delphi.Mocks.Utils.pas b/Source/Delphi.Mocks.Utils.pas index a0f28be..084c422 100644 --- a/Source/Delphi.Mocks.Utils.pas +++ b/Source/Delphi.Mocks.Utils.pas @@ -29,8 +29,8 @@ interface uses - TypInfo, - RTTI; + System.TypInfo, + System.Rtti; function CheckInterfaceHasRTTI(const info : PTypeInfo) : boolean; @@ -45,8 +45,8 @@ function ArgsToString(const Args: TArray; OffSet: Integer = 0): string; implementation uses - Variants, - SysUtils; + System.Variants, + System.SysUtils; function CheckInterfaceHasRTTI(const info : PTypeInfo) : boolean; var diff --git a/Source/Delphi.Mocks.Validation.pas b/Source/Delphi.Mocks.Validation.pas index 5fb8f3d..f7bfa23 100644 --- a/Source/Delphi.Mocks.Validation.pas +++ b/Source/Delphi.Mocks.Validation.pas @@ -3,7 +3,7 @@ interface uses - typInfo; + System.TypInfo; type TMocksValidation = class(TObject) diff --git a/Source/Delphi.Mocks.VirtualInterface.pas b/Source/Delphi.Mocks.VirtualInterface.pas deleted file mode 100644 index 89b8426..0000000 --- a/Source/Delphi.Mocks.VirtualInterface.pas +++ /dev/null @@ -1,61 +0,0 @@ -{***************************************************************************} -{ } -{ Delphi.Mocks } -{ } -{ Copyright (C) 2011 Vincent Parrett } -{ } -{ http://www.finalbuilder.com } -{ } -{ } -{***************************************************************************} -{ } -{ Licensed under the Apache License, Version 2.0 (the "License"); } -{ you may not use this file except in compliance with the License. } -{ You may obtain a copy of the License at } -{ } -{ http://www.apache.org/licenses/LICENSE-2.0 } -{ } -{ Unless required by applicable law or agreed to in writing, software } -{ distributed under the License is distributed on an "AS IS" BASIS, } -{ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. } -{ See the License for the specific language governing permissions and } -{ limitations under the License. } -{ } -{***************************************************************************} - -unit Delphi.Mocks.VirtualInterface; - -interface -{$I 'Delphi.Mocks.inc'} - - -uses - TypInfo, - Rtti, - Generics.Collections; - -type - {$IFDEF DELPHI_XE2_UP} - TVirtualInterface = System.Rtti.TVirtualInterface; - {$ELSE} - //Attempt to create a cleanish room implementation of this class for D2010?? - {$ENDIF} - - - -implementation - -uses - RTLConsts, - SysUtils - {$IFDEF DELPHI_XE2_UP} - ; - {$ELSE} - ,PrivateHeap; - {$ENDIF} - -{$IFNDEF DELPHI_XE2_UP} - -{$ENDIF} - -end. diff --git a/Source/Delphi.Mocks.VirtualMethodInterceptor.pas b/Source/Delphi.Mocks.VirtualMethodInterceptor.pas deleted file mode 100644 index 968d4fa..0000000 --- a/Source/Delphi.Mocks.VirtualMethodInterceptor.pas +++ /dev/null @@ -1,24 +0,0 @@ -unit Delphi.Mocks.VirtualMethodInterceptor; - -interface -{$I 'Delphi.Mocks.inc'} - -uses - Rtti, - TypInfo, - Generics.Collections, - SysUtils; - {$IFDEF DELPHI_XE_UP} //TVirtualMethodInterceptor introduced in DelphiXE -type - TVirtualMethodInterceptor = System.Rtti.TVirtualMethodInterceptor; - {$ELSE} - //Attempt to create a cleanish room implementation of this class for D2010?? - //Difficult to do having seen the implementation of TVirtualMethodInterceptor - //in XE/XE2 - {$ENDIF} - -implementation -{$IFNDEF DELPHI_XE_UP} - -{$ENDIF} -end. diff --git a/Source/Delphi.Mocks.WeakReference.pas b/Source/Delphi.Mocks.WeakReference.pas index 708ab04..7370d96 100644 --- a/Source/Delphi.Mocks.WeakReference.pas +++ b/Source/Delphi.Mocks.WeakReference.pas @@ -31,11 +31,7 @@ interface {$I 'Delphi.Mocks.inc'} uses - {$IFDEF USE_NS} System.Generics.Collections; - {$ELSE} - Generics.Collections; - {$ENDIF} type /// Implemented by our weak referenced object base class @@ -100,62 +96,10 @@ function SafeMonitorTryEnter(const AObject: TObject): Boolean; implementation uses - {$IFDEF USE_NS} System.TypInfo, System.Classes, System.Sysutils, System.SyncObjs; - {$ELSE} - TypInfo, - classes, - SysUtils, - SyncObjs; - {$ENDIF} - -{$IFNDEF DELPHI_XE2_UP} -type - TInterlocked = class - public - class function Increment(var Target: Integer): Integer; static; inline; - class function Decrement(var Target: Integer): Integer; static; inline; - class function Add(var Target: Integer; Increment: Integer): Integer;static; - class function CompareExchange(var Target: Integer; Value, Comparand: Integer): Integer; static; - end; - -class function TInterlocked.Decrement(var Target: Integer): Integer; -begin - result := Add(Target,-1); -end; - -class function TInterlocked.Increment(var Target: Integer): Integer; -begin - result := Add(Target,1); -end; - -class function TInterlocked.Add(var Target: Integer; Increment: Integer): Integer; -{$IFNDEF CPUX86} -asm - .NOFRAME - MOV EAX,EDX - LOCK XADD [RCX].Integer,EAX - ADD EAX,EDX -end; -{$ELSE CPUX86} -asm - MOV ECX,EDX - XCHG EAX,EDX - LOCK XADD [EDX],EAX - ADD EAX,ECX -end; -{$ENDIF} - -class function TInterlocked.CompareExchange(var Target: Integer; Value, Comparand: Integer): Integer; -asm - XCHG EAX,EDX - XCHG EAX,ECX - LOCK CMPXCHG [EDX],ECX -end; -{$ENDIF DELPHI_XE2_UPE2} //MonitorTryEnter doesn't do a nil check! function SafeMonitorTryEnter(const AObject: TObject): Boolean; diff --git a/Source/Delphi.Mocks.When.pas b/Source/Delphi.Mocks.When.pas index 64b5a31..9df2e7d 100644 --- a/Source/Delphi.Mocks.When.pas +++ b/Source/Delphi.Mocks.When.pas @@ -44,7 +44,7 @@ TWhen = class(TInterfacedObject,IWhen) implementation uses - SysUtils; + System.SysUtils; { TWhen } diff --git a/Source/Delphi.Mocks.inc b/Source/Delphi.Mocks.inc index 5910d56..faca29c 100644 --- a/Source/Delphi.Mocks.inc +++ b/Source/Delphi.Mocks.inc @@ -25,7 +25,7 @@ //Basic Version of Compiler Supported {$IFDEF CONDITIONALEXPRESSIONS} //Started being defined with D2009 - {$IF CompilerVersion < 21.0} // Before RAD Studio 2010 + {$IF CompilerVersion < 23.0} // Before RAD Studio XE2 {$DEFINE UNSUPPORTED_COMPILER_VERSION} {$IFEND} {$IF CompilerVersion > 22.0} // XE2 or later @@ -36,9 +36,13 @@ {$ENDIF} {$IFDEF UNSUPPORTED_COMPILER_VERSION} - Unsupported Compiler Version (Delphi 2010 or later required!) + Unsupported Compiler Version (Delphi XE2 or later required!) {$ENDIF} + +//Use namespaces +{$DEFINE USE_NS} + {$DEFINE DELPHI_XE104_DOWN} {$DEFINE DELPHI_XE103_DOWN} {$DEFINE DELPHI_XE102_DOWN} @@ -51,24 +55,7 @@ {$DEFINE DELPHI_XE4_DOWN} {$DEFINE DELPHI_XE3_DOWN} {$DEFINE DELPHI_XE2_DOWN} -{$DEFINE DELPHI_XE_DOWN} -{$DEFINE DELPHI_2010_DOWN} - -{$IFDEF VER210} // RAD Studio 2010 - {$DEFINE DELPHI_2010} - {$DEFINE DELPHI_2010_UP} - {$DEFINE CPUX86} - {$UNDEF USE_NS} -{$ENDIF VER210} -{$IFDEF VER220} // RAD Studio XE - {$DEFINE DELPHI_2010_UP} - {$DEFINE DELPHI_XE} - {$DEFINE DELPHI_XE_UP} - {$DEFINE CPUX86} - {$UNDEF DELPHI_2010_DOWN} - {$UNDEF USE_NS} -{$ENDIF VER220} {$IFDEF VER230} // RAD Studio XE2 {$DEFINE DELPHI_2010_UP} @@ -76,7 +63,6 @@ {$DEFINE DELPHI_XE2} {$DEFINE DELPHI_XE2_UP} {$DEFINE SUPPORTS_REGEX} - {$DEFINE USE_NS} {$UNDEF DELPHI_2010_DOWN} {$UNDEF DELPHI_XE_DOWN} {$ENDIF VER230} @@ -101,7 +87,6 @@ {$DEFINE DELPHI_XE4} {$DEFINE DELPHI_XE4_UP} {$DEFINE SUPPORTS_REGEX} - {$DEFINE USE_NS} {$UNDEF DELPHI_2010_DOWN} {$UNDEF DELPHI_XE_DOWN} {$UNDEF DELPHI_XE2_DOWN} @@ -117,7 +102,6 @@ {$DEFINE DELPHI_XE5} {$DEFINE DELPHI_XE5_UP} {$DEFINE SUPPORTS_REGEX} - {$DEFINE USE_NS} {$UNDEF DELPHI_2010_DOWN} {$UNDEF DELPHI_XE_DOWN} {$UNDEF DELPHI_XE2_DOWN} @@ -135,7 +119,6 @@ {$DEFINE DELPHI_XE6} {$DEFINE DELPHI_XE6_UP} {$DEFINE SUPPORTS_REGEX} - {$DEFINE USE_NS} {$UNDEF DELPHI_2010_DOWN} {$UNDEF DELPHI_XE_DOWN} {$UNDEF DELPHI_XE2_DOWN} @@ -155,7 +138,6 @@ {$DEFINE DELPHI_XE7} {$DEFINE DELPHI_XE7_UP} {$DEFINE SUPPORTS_REGEX} - {$DEFINE USE_NS} {$UNDEF DELPHI_2010_DOWN} {$UNDEF DELPHI_XE_DOWN} {$UNDEF DELPHI_XE2_DOWN} @@ -178,7 +160,6 @@ {$DEFINE DELPHI_XE8_UP} {$DEFINE SUPPORTS_REGEX} - {$DEFINE USE_NS} {$UNDEF DELPHI_2010_DOWN} {$UNDEF DELPHI_XE_DOWN} {$UNDEF DELPHI_XE2_DOWN} @@ -203,7 +184,6 @@ {$DEFINE DELPHIX_XE10_UP} {$DEFINE DELPHIX_XE10} {$DEFINE SUPPORTS_REGEX} - {$DEFINE USE_NS} {$UNDEF DELPHI_2010_DOWN} {$UNDEF DELPHI_XE_DOWN} {$UNDEF DELPHI_XE2_DOWN} @@ -232,7 +212,6 @@ {$DEFINE DELPHI_XE101_UP} {$DEFINE DELPHI_XE101} {$DEFINE SUPPORTS_REGEX} - {$DEFINE USE_NS} {$UNDEF DELPHI_2010_DOWN} {$UNDEF DELPHI_XE_DOWN} {$UNDEF DELPHI_XE2_DOWN} @@ -263,7 +242,6 @@ {$DEFINE DELPHI_XE102_UP} {$DEFINE DELPHI_XE102} {$DEFINE SUPPORTS_REGEX} - {$DEFINE USE_NS} {$UNDEF DELPHI_2010_DOWN} {$UNDEF DELPHI_XE_DOWN} {$UNDEF DELPHI_XE2_DOWN} @@ -296,7 +274,6 @@ {$DEFINE DELPHI_XE103_UP} {$DEFINE DELPHI_XE103} {$DEFINE SUPPORTS_REGEX} - {$DEFINE USE_NS} {$UNDEF DELPHI_2010_DOWN} {$UNDEF DELPHI_XE_DOWN} {$UNDEF DELPHI_XE2_DOWN} @@ -331,7 +308,6 @@ {$DEFINE DELPHI_XE104_UP} {$DEFINE DELPHI_XE103} {$DEFINE SUPPORTS_REGEX} - {$DEFINE USE_NS} {$UNDEF DELPHI_2010_DOWN} {$UNDEF DELPHI_XE_DOWN} {$UNDEF DELPHI_XE2_DOWN} diff --git a/Source/Delphi.Mocks.pas b/Source/Delphi.Mocks.pas index b4c5540..953fc40 100644 --- a/Source/Delphi.Mocks.pas +++ b/Source/Delphi.Mocks.pas @@ -30,12 +30,10 @@ interface {$I 'Delphi.Mocks.inc'} uses - TypInfo, - Rtti, - Sysutils, - {$IFDEF SUPPORTS_REGEX} + System.TypInfo, + System.Rtti, + System.Sysutils, System.RegularExpressions, - {$ENDIF} Delphi.Mocks.WeakReference; type @@ -252,9 +250,7 @@ ItRec = record function IsIn(const values : IEnumerable) : T; overload; function IsNotIn(const values : TArray) : T; overload; function IsNotIn(const values : IEnumerable) : T; overload; - {$IFDEF SUPPORTS_REGEX} //XE2 or later function IsRegex(const regex : string; const options : TRegExOptions = []) : string; - {$ENDIF} function AreSamePropertiesThat(const Value: T): T; function AreSameFieldsThat(const Value: T): T; function AreSameFieldsAndPropertiedThat(const Value: T): T; @@ -294,7 +290,7 @@ TTypeInfoHelper = record helper for TTypeInfo implementation uses - Classes, + System.Classes, Generics.Defaults, Delphi.Mocks.Utils, Delphi.Mocks.Interfaces, @@ -833,7 +829,6 @@ function ItRec.Matches(const predicate: TPredicate): T; // result := 0; //end; -{$IFDEF SUPPORTS_REGEX} //XE2 or later function ItRec.IsRegex(const regex : string; const options : TRegExOptions) : string; begin result := ''; @@ -843,7 +838,6 @@ function ItRec.IsRegex(const regex : string; const options : TRegExOptions) : st result := TRegEx.IsMatch(param,regex,options) end); end; -{$ENDIF} function It(const AParamIndx : Integer) : ItRec; begin diff --git a/Source/DelphiMocks.dpk b/Source/DelphiMocks.dpk new file mode 100644 index 0000000..3b29585 --- /dev/null +++ b/Source/DelphiMocks.dpk @@ -0,0 +1,52 @@ +package DelphiMocks; + +{$R *.res} +{$IFDEF IMPLICITBUILDING This IFDEF should not be used by users} +{$ALIGN 8} +{$ASSERTIONS ON} +{$BOOLEVAL OFF} +{$DEBUGINFO ON} +{$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} +{$RUNONLY} +{$IMPLICITBUILD OFF} + +requires + rtl; + +contains + Delphi.Mocks.AutoMock in 'Delphi.Mocks.AutoMock.pas', + Delphi.Mocks.Behavior in 'Delphi.Mocks.Behavior.pas', + Delphi.Mocks.Expectation in 'Delphi.Mocks.Expectation.pas', + Delphi.Mocks.Helpers in 'Delphi.Mocks.Helpers.pas', + Delphi.Mocks.Interfaces in 'Delphi.Mocks.Interfaces.pas', + Delphi.Mocks.MethodData in 'Delphi.Mocks.MethodData.pas', + Delphi.Mocks.ObjectProxy in 'Delphi.Mocks.ObjectProxy.pas', + Delphi.Mocks.ParamMatcher in 'Delphi.Mocks.ParamMatcher.pas', + Delphi.Mocks in 'Delphi.Mocks.pas', + Delphi.Mocks.Proxy in 'Delphi.Mocks.Proxy.pas', + Delphi.Mocks.Proxy.TypeInfo in 'Delphi.Mocks.Proxy.TypeInfo.pas', + Delphi.Mocks.ReturnTypePatch in 'Delphi.Mocks.ReturnTypePatch.pas', + Delphi.Mocks.Utils in 'Delphi.Mocks.Utils.pas', + Delphi.Mocks.Validation in 'Delphi.Mocks.Validation.pas', + Delphi.Mocks.WeakReference in 'Delphi.Mocks.WeakReference.pas', + Delphi.Mocks.When in 'Delphi.Mocks.When.pas'; + +end. diff --git a/Source/DelphiMocks.dproj b/Source/DelphiMocks.dproj new file mode 100644 index 0000000..a3d667d --- /dev/null +++ b/Source/DelphiMocks.dproj @@ -0,0 +1,170 @@ + + + {95C966B8-00C0-4F2D-BE60-93794EC1525F} + DelphiMocks.dpk + 13.4 + None + True + Debug + Win64 + 3 + Package + + + true + + + true + Base + true + + + true + Base + true + + + true + Base + true + + + true + Cfg_1 + true + true + + + true + Base + true + + + true + All + true + System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace) + true + true + .\$(Platform)\$(Config) + .\$(Platform)\$(Config) + + + 1033 + true + CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments= + Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace) + + + 1033 + true + CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments= + Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) + + + DEBUG;$(DCC_Define) + false + true + true + true + + + true + 1033 + false + + + false + RELEASE;$(DCC_Define) + 0 + false + + + + MainSource + + + + + + + + + + + + + + + + + + + + Cfg_2 + Base + + + Base + + + Cfg_1 + Base + + + + Delphi.Personality.12 + Package + + + + DelphiMocks.dpk + + + True + False + 1 + 0 + 0 + 0 + False + False + False + False + False + 3081 + 1252 + + + + + 1.0.0.0 + + + + + + 1.0.0.0 + + + + madBasic 1.2.7 - www.madshi.net + madHelp 1.1.1 - www.madshi.net + madDisAsm 2.2.6 - www.madshi.net + madExceptIde 1.1.0 - www.madshi.net + madExcept 5.1.0 - www.madshi.net + madExceptVcl 2.1.0 - www.madshi.net + madExceptWizard 3.1.8 - www.madshi.net + + + + + True + True + + + 12 + + + + diff --git a/Source/DelphiMocks104.dpk b/Source/DelphiMocks104.dpk new file mode 100644 index 0000000..4ee47b3 --- /dev/null +++ b/Source/DelphiMocks104.dpk @@ -0,0 +1,52 @@ +package DelphiMocks104; + +{$R *.res} +{$IFDEF IMPLICITBUILDING This IFDEF should not be used by users} +{$ALIGN 8} +{$ASSERTIONS ON} +{$BOOLEVAL OFF} +{$DEBUGINFO ON} +{$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} +{$RUNONLY} +{$IMPLICITBUILD OFF} + +requires + rtl; + +contains + Delphi.Mocks.AutoMock in 'Delphi.Mocks.AutoMock.pas', + Delphi.Mocks.Behavior in 'Delphi.Mocks.Behavior.pas', + Delphi.Mocks.Expectation in 'Delphi.Mocks.Expectation.pas', + Delphi.Mocks.Helpers in 'Delphi.Mocks.Helpers.pas', + Delphi.Mocks.Interfaces in 'Delphi.Mocks.Interfaces.pas', + Delphi.Mocks.MethodData in 'Delphi.Mocks.MethodData.pas', + Delphi.Mocks.ObjectProxy in 'Delphi.Mocks.ObjectProxy.pas', + Delphi.Mocks.ParamMatcher in 'Delphi.Mocks.ParamMatcher.pas', + Delphi.Mocks in 'Delphi.Mocks.pas', + Delphi.Mocks.Proxy in 'Delphi.Mocks.Proxy.pas', + Delphi.Mocks.Proxy.TypeInfo in 'Delphi.Mocks.Proxy.TypeInfo.pas', + Delphi.Mocks.ReturnTypePatch in 'Delphi.Mocks.ReturnTypePatch.pas', + Delphi.Mocks.Utils in 'Delphi.Mocks.Utils.pas', + Delphi.Mocks.Validation in 'Delphi.Mocks.Validation.pas', + Delphi.Mocks.WeakReference in 'Delphi.Mocks.WeakReference.pas', + Delphi.Mocks.When in 'Delphi.Mocks.When.pas'; + +end. diff --git a/Source/DelphiMocks104.dproj b/Source/DelphiMocks104.dproj new file mode 100644 index 0000000..76a056d --- /dev/null +++ b/Source/DelphiMocks104.dproj @@ -0,0 +1,891 @@ + + + {95C966B8-00C0-4F2D-BE60-93794EC1525F} + DelphiMocks104.dpk + 19.2 + None + True + Debug + Win64 + 3 + Package + + + true + + + true + Base + true + + + true + Base + true + + + true + Base + true + + + true + Base + true + + + true + Cfg_1 + true + true + + + true + Base + true + + + true + All + true + System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace) + true + true + .\$(Platform)\$(Config) + .\$(Platform)\$(Config) + DelphiMocks104 + + + CFBundleName=$(MSBuildProjectName);CFBundleDisplayName=$(MSBuildProjectName);CFBundleIdentifier=$(MSBuildProjectName);CFBundleVersion=1.0.0;CFBundleShortVersionString=1.0.0;CFBundlePackageType=APPL;CFBundleSignature=????;CFBundleAllowMixedLocalizations=YES;CFBundleExecutable=$(MSBuildProjectName);NSHighResolutionCapable=true;LSApplicationCategoryType=public.app-category.utilities;NSLocationUsageDescription=The reason for accessing the location information of the user;NSContactsUsageDescription=The reason for accessing the contacts;NSCalendarsUsageDescription=The reason for accessing the calendar data;NSRemindersUsageDescription=The reason for accessing the reminders;NSCameraUsageDescription=The reason for accessing the camera;NSMicrophoneUsageDescription=The reason for accessing the microphone;NSMotionUsageDescription=The reason for accessing the accelerometer;NSDesktopFolderUsageDescription=The reason for accessing the Desktop folder;NSDocumentsFolderUsageDescription=The reason for accessing the Documents folder;NSDownloadsFolderUsageDescription=The reason for accessing the Downloads folder;NSNetworkVolumesUsageDescription=The reason for accessing files on a network volume;NSRemovableVolumesUsageDescription=The reason for accessing files on a removable volume;NSSpeechRecognitionUsageDescription=The reason for requesting to send user data to Apple's speech recognition servers + Debug + + + 1033 + 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) + Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) + + + 1033 + 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) + Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace) + + + DEBUG;$(DCC_Define) + false + true + true + true + + + true + 1033 + false + + + false + RELEASE;$(DCC_Define) + 0 + 0 + + + + MainSource + + + + + + + + + + + + + + + + + + + + Cfg_2 + Base + + + Base + + + Cfg_1 + Base + + + + Delphi.Personality.12 + Package + + + + DelphiMocks104.dpk + + + True + False + 1 + 0 + 0 + 0 + False + False + False + False + False + 3081 + 1252 + + + + + 1.0.0.0 + + + + + + 1.0.0.0 + + + + madBasic 1.2.7 - www.madshi.net + madHelp 1.1.1 - www.madshi.net + madDisAsm 2.2.6 - www.madshi.net + madExceptIde 1.1.0 - www.madshi.net + madExcept 5.1.0 - www.madshi.net + madExceptVcl 2.1.0 - www.madshi.net + madExceptWizard 3.1.8 - www.madshi.net + + + + + + true + + + + + true + + + + + true + + + + + 1 + + + 0 + + + + + classes + 1 + + + classes + 1 + + + + + res\xml + 1 + + + res\xml + 1 + + + + + library\lib\armeabi-v7a + 1 + + + + + library\lib\armeabi + 1 + + + library\lib\armeabi + 1 + + + + + library\lib\armeabi-v7a + 1 + + + + + library\lib\mips + 1 + + + library\lib\mips + 1 + + + + + library\lib\armeabi-v7a + 1 + + + library\lib\arm64-v8a + 1 + + + + + library\lib\armeabi-v7a + 1 + + + + + res\drawable + 1 + + + res\drawable + 1 + + + + + res\values + 1 + + + res\values + 1 + + + + + res\values-v21 + 1 + + + res\values-v21 + 1 + + + + + res\values + 1 + + + res\values + 1 + + + + + res\drawable + 1 + + + res\drawable + 1 + + + + + res\drawable-xxhdpi + 1 + + + res\drawable-xxhdpi + 1 + + + + + res\drawable-xxxhdpi + 1 + + + res\drawable-xxxhdpi + 1 + + + + + res\drawable-ldpi + 1 + + + res\drawable-ldpi + 1 + + + + + res\drawable-mdpi + 1 + + + res\drawable-mdpi + 1 + + + + + res\drawable-hdpi + 1 + + + res\drawable-hdpi + 1 + + + + + res\drawable-xhdpi + 1 + + + res\drawable-xhdpi + 1 + + + + + res\drawable-mdpi + 1 + + + res\drawable-mdpi + 1 + + + + + res\drawable-hdpi + 1 + + + res\drawable-hdpi + 1 + + + + + res\drawable-xhdpi + 1 + + + res\drawable-xhdpi + 1 + + + + + res\drawable-xxhdpi + 1 + + + res\drawable-xxhdpi + 1 + + + + + res\drawable-xxxhdpi + 1 + + + res\drawable-xxxhdpi + 1 + + + + + res\drawable-small + 1 + + + res\drawable-small + 1 + + + + + res\drawable-normal + 1 + + + res\drawable-normal + 1 + + + + + res\drawable-large + 1 + + + res\drawable-large + 1 + + + + + res\drawable-xlarge + 1 + + + res\drawable-xlarge + 1 + + + + + res\values + 1 + + + res\values + 1 + + + + + 1 + + + 1 + + + 0 + + + + + 1 + .framework + + + 1 + .framework + + + 0 + + + + + 1 + .dylib + + + 1 + .dylib + + + 0 + .dll;.bpl + + + + + 1 + .dylib + + + 1 + .dylib + + + 1 + .dylib + + + 1 + .dylib + + + 1 + .dylib + + + 0 + .bpl + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + 1 + + + 1 + + + + + ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF + 1 + + + ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF + 1 + + + + + + + + 1 + + + 1 + + + 1 + + + + + + + + Contents\Resources + 1 + + + Contents\Resources + 1 + + + + + library\lib\armeabi-v7a + 1 + + + library\lib\arm64-v8a + 1 + + + 1 + + + 1 + + + 1 + + + 1 + + + 1 + + + 1 + + + 0 + + + + + library\lib\armeabi-v7a + 1 + + + + + 1 + + + 1 + + + + + Assets + 1 + + + Assets + 1 + + + + + Assets + 1 + + + Assets + 1 + + + + + + + + + + + + + + + False + False + True + True + + + 12 + + + + + diff --git a/Source/DelphiMocksXE5.dpk b/Source/DelphiMocksXE5.dpk new file mode 100644 index 0000000..6ec4023 --- /dev/null +++ b/Source/DelphiMocksXE5.dpk @@ -0,0 +1,52 @@ +package DelphiMocksXE5; + +{$R *.res} +{$IFDEF IMPLICITBUILDING This IFDEF should not be used by users} +{$ALIGN 8} +{$ASSERTIONS ON} +{$BOOLEVAL OFF} +{$DEBUGINFO ON} +{$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} +{$RUNONLY} +{$IMPLICITBUILD OFF} + +requires + rtl; + +contains + Delphi.Mocks.AutoMock in 'Delphi.Mocks.AutoMock.pas', + Delphi.Mocks.Behavior in 'Delphi.Mocks.Behavior.pas', + Delphi.Mocks.Expectation in 'Delphi.Mocks.Expectation.pas', + Delphi.Mocks.Helpers in 'Delphi.Mocks.Helpers.pas', + Delphi.Mocks.Interfaces in 'Delphi.Mocks.Interfaces.pas', + Delphi.Mocks.MethodData in 'Delphi.Mocks.MethodData.pas', + Delphi.Mocks.ObjectProxy in 'Delphi.Mocks.ObjectProxy.pas', + Delphi.Mocks.ParamMatcher in 'Delphi.Mocks.ParamMatcher.pas', + Delphi.Mocks in 'Delphi.Mocks.pas', + Delphi.Mocks.Proxy in 'Delphi.Mocks.Proxy.pas', + Delphi.Mocks.Proxy.TypeInfo in 'Delphi.Mocks.Proxy.TypeInfo.pas', + Delphi.Mocks.ReturnTypePatch in 'Delphi.Mocks.ReturnTypePatch.pas', + Delphi.Mocks.Utils in 'Delphi.Mocks.Utils.pas', + Delphi.Mocks.Validation in 'Delphi.Mocks.Validation.pas', + Delphi.Mocks.WeakReference in 'Delphi.Mocks.WeakReference.pas', + Delphi.Mocks.When in 'Delphi.Mocks.When.pas'; + +end. diff --git a/Source/DelphiMocksXE5.dproj b/Source/DelphiMocksXE5.dproj new file mode 100644 index 0000000..1b09bd9 --- /dev/null +++ b/Source/DelphiMocksXE5.dproj @@ -0,0 +1,164 @@ + + + {95C966B8-00C0-4F2D-BE60-93794EC1525F} + DelphiMocksXE5.dpk + 15.3 + None + True + Debug + Win64 + 3 + Package + + + true + + + true + Base + true + + + true + Base + true + + + true + Base + true + + + true + Cfg_1 + true + true + + + true + Base + true + + + true + All + true + System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace) + true + true + .\$(Platform)\$(Config) + .\$(Platform)\$(Config) + + + 1033 + true + CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments= + Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) + + + 1033 + true + CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments= + Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace) + + + DEBUG;$(DCC_Define) + false + true + true + true + + + true + 1033 + false + + + false + RELEASE;$(DCC_Define) + 0 + 0 + + + + MainSource + + + + + + + + + + + + + + + + + + + + Cfg_2 + Base + + + Base + + + Cfg_1 + Base + + + + Delphi.Personality.12 + Package + + + + DelphiMocksXE5.dpk + + + True + False + 1 + 0 + 0 + 0 + False + False + False + False + False + 3081 + 1252 + + + + + 1.0.0.0 + + + + + + 1.0.0.0 + + + + + + False + False + False + True + True + + + 12 + + + + diff --git a/VSoft.DelphiMocks.dspec b/VSoft.DelphiMocks.dspec index 06cfa29..38f3fb3 100644 --- a/VSoft.DelphiMocks.dspec +++ b/VSoft.DelphiMocks.dspec @@ -1,7 +1,7 @@ { "metadata": { "id": "VSoft.DelphiMocks", - "version": "0.0.2", + "version": "0.1.0", "description": "Simple mocking framework for Delphi XE2 or later.", "authors": "Vincent Parrett", "projectUrl": "https://github.com/VSoftTechnologies/Delphi-Mocks", @@ -28,47 +28,47 @@ { "compiler": "XE5", "platforms": "Win32, Win64", - "template": "default" + "template": "XE5+" }, { "compiler": "XE6", "platforms": "Win32, Win64", - "template": "default" + "template": "XE5+" }, { "compiler": "XE7", "platforms": "Win32, Win64", - "template": "default" + "template": "XE5+" }, { "compiler": "XE8", "platforms": "Win32, Win64", - "template": "default" + "template": "XE5+" }, { "compiler": "10.0", "platforms": "Win32, Win64", - "template": "default" + "template": "XE5+" }, { "compiler": "10.1", "platforms": "Win32, Win64", - "template": "default" + "template": "XE5+" }, { "compiler": "10.2", "platforms": "Win32, Win64", - "template": "default" + "template": "XE5+" }, { "compiler": "10.3", "platforms": "Win32, Win64", - "template": "default" + "template": "XE5+" }, { "compiler": "10.4", "platforms": "Win32, Win64", - "template": "default" + "template": "10.4+" } ], "templates": [ @@ -82,13 +82,95 @@ { "src": "Source\\*.inc", "dest": "src" + }, + { + "src": "Source\\DelphiMocks.dpk", + "dest": "src" + }, + { + "src": "Source\\DelphiMocks.dproj", + "dest": "src" } + ], "searchPaths": [ { "path": "src" } + ], + "build": [ + { + "id": "DelphiMocks", + "project": ".\\src\\DelphiMocks.dproj" + } + ] + }, + { + "name": "XE5+", + "source": [ + { + "src": "Source\\*.pas", + "dest": "src" + }, + { + "src": "Source\\*.inc", + "dest": "src" + }, + { + "src": "Source\\DelphiMocksXE5.dpk", + "dest": "src" + }, + { + "src": "Source\\DelphiMocksXE5.dproj", + "dest": "src" + } + + ], + "searchPaths": [ + { + "path": "src" + } + ], + "build": [ + { + "id": "DelphiMocks", + "project": ".\\src\\DelphiMocksXE5.dproj" + } + ] + }, + { + "name": "10.4+", + "source": [ + { + "src": "Source\\*.pas", + "dest": "src" + }, + { + "src": "Source\\*.inc", + "dest": "src" + }, + { + "src": "Source\\DelphiMocks104.dpk", + "dest": "src" + }, + { + "src": "Source\\DelphiMocks104.dproj", + "dest": "src" + } + + ], + "searchPaths": [ + { + "path": "src" + } + ], + "build": [ + { + "id": "DelphiMocks", + "project": ".\\src\\DelphiMocks104.dproj" + } ] } + ] }