You've already forked lazarus-ccr
Add "Word" and "Byte" overloaded "CheckEquals"
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3154 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -20,13 +20,13 @@ uses
|
|||||||
{$ELSE}
|
{$ELSE}
|
||||||
TestFrameWork,
|
TestFrameWork,
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
date_utils;
|
test_suite_utils, date_utils;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
{ TTest_DateUtils }
|
{ TTest_DateUtils }
|
||||||
|
|
||||||
TTest_DateUtils = class(TTestCase)
|
TTest_DateUtils = class(TWstBaseTest)
|
||||||
protected
|
protected
|
||||||
{$IFDEF FPC}
|
{$IFDEF FPC}
|
||||||
class procedure CheckEquals(expected, actual: TTimeRec; msg: string = ''); overload;
|
class procedure CheckEquals(expected, actual: TTimeRec; msg: string = ''); overload;
|
||||||
|
@ -38,6 +38,10 @@ type
|
|||||||
procedure CheckEquals(expected, actual: QWord; msg: string = ''; const AStrict : Boolean = True); overload;
|
procedure CheckEquals(expected, actual: QWord; msg: string = ''; const AStrict : Boolean = True); overload;
|
||||||
procedure CheckEquals(expected, actual: Currency; msg: string = ''); overload;
|
procedure CheckEquals(expected, actual: Currency; msg: string = ''); overload;
|
||||||
{$ENDIF FPC}
|
{$ENDIF FPC}
|
||||||
|
{$IFDEF WST_DELPHI}
|
||||||
|
procedure CheckEquals(expected, actual: Word; msg: string = ''); overload;
|
||||||
|
procedure CheckEquals(expected, actual: Byte; msg: string = ''); overload;
|
||||||
|
{$ENDIF WST_DELPHI}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function CompareNodes(const A,B : TDOMNode) : Boolean;overload;
|
function CompareNodes(const A,B : TDOMNode) : Boolean;overload;
|
||||||
@ -160,7 +164,7 @@ begin
|
|||||||
FailNotEquals(IntToStr(expected), IntToStr(actual), msg{$IFDEF WST_DELPHI}, CallerAddr{$ENDIF WST_DELPHI});
|
FailNotEquals(IntToStr(expected), IntToStr(actual), msg{$IFDEF WST_DELPHI}, CallerAddr{$ENDIF WST_DELPHI});
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TWstBaseTest.CheckEquals(expected, actual : Currency; msg : string);
|
procedure TWstBaseTest.CheckEquals(expected, actual : Currency; msg : string);
|
||||||
begin
|
begin
|
||||||
if (expected <> actual) then
|
if (expected <> actual) then
|
||||||
FailNotEquals(CurrToStr(expected), CurrToStr(actual), msg{$IFDEF WST_DELPHI}, CallerAddr{$ENDIF WST_DELPHI});
|
FailNotEquals(CurrToStr(expected), CurrToStr(actual), msg{$IFDEF WST_DELPHI}, CallerAddr{$ENDIF WST_DELPHI});
|
||||||
@ -180,5 +184,18 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{$IFDEF WST_DELPHI}
|
||||||
|
procedure TWstBaseTest.CheckEquals(expected, actual: Word; msg: string);
|
||||||
|
begin
|
||||||
|
if (expected <> actual) then
|
||||||
|
FailNotEquals(IntToStr(expected), IntToStr(actual), msg, CallerAddr);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TWstBaseTest.CheckEquals(expected, actual: Byte; msg: string);
|
||||||
|
begin
|
||||||
|
if (expected <> actual) then
|
||||||
|
FailNotEquals(IntToStr(expected), IntToStr(actual), msg,CallerAddr);
|
||||||
|
end;
|
||||||
|
{$ENDIF WST_DELPHI}
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
@ -106,7 +106,7 @@ type
|
|||||||
|
|
||||||
{ TTest_TBaseComplexRemotable }
|
{ TTest_TBaseComplexRemotable }
|
||||||
|
|
||||||
TTest_TBaseComplexRemotable = class(TTestCase)
|
TTest_TBaseComplexRemotable = class(TWstBaseTest)
|
||||||
protected
|
protected
|
||||||
procedure Compare(const a,b : TClass_A);overload;
|
procedure Compare(const a,b : TClass_A);overload;
|
||||||
procedure Compare(const a,b : TClass_B);overload;
|
procedure Compare(const a,b : TClass_B);overload;
|
||||||
@ -117,7 +117,7 @@ type
|
|||||||
|
|
||||||
{ TTest_TBaseArrayRemotable }
|
{ TTest_TBaseArrayRemotable }
|
||||||
|
|
||||||
TTest_TBaseArrayRemotable = class(TTestCase)
|
TTest_TBaseArrayRemotable = class(TWstBaseTest)
|
||||||
protected
|
protected
|
||||||
class function CreateArray() : TBaseArrayRemotable;virtual;abstract;
|
class function CreateArray() : TBaseArrayRemotable;virtual;abstract;
|
||||||
class function GetTypeInfo() : PTypeInfo;virtual;abstract;
|
class function GetTypeInfo() : PTypeInfo;virtual;abstract;
|
||||||
@ -298,7 +298,7 @@ type
|
|||||||
|
|
||||||
{ TTest_TDateTimeRemotable }
|
{ TTest_TDateTimeRemotable }
|
||||||
|
|
||||||
TTest_TDateTimeRemotable = class(TTestCase)
|
TTest_TDateTimeRemotable = class(TWstBaseTest)
|
||||||
published
|
published
|
||||||
procedure FormatDate();
|
procedure FormatDate();
|
||||||
procedure FormatDate_ZERO();
|
procedure FormatDate_ZERO();
|
||||||
@ -316,7 +316,7 @@ type
|
|||||||
|
|
||||||
{ TTest_TDateTimeRemotable }
|
{ TTest_TDateTimeRemotable }
|
||||||
|
|
||||||
TTest_TDateRemotable = class(TTestCase)
|
TTest_TDateRemotable = class(TWstBaseTest)
|
||||||
published
|
published
|
||||||
procedure FormatDate();
|
procedure FormatDate();
|
||||||
procedure FormatDate_ZERO();
|
procedure FormatDate_ZERO();
|
||||||
@ -355,7 +355,7 @@ type
|
|||||||
|
|
||||||
{ TTest_TTimeRemotable }
|
{ TTest_TTimeRemotable }
|
||||||
|
|
||||||
TTest_TTimeRemotable = class(TTestCase)
|
TTest_TTimeRemotable = class(TWstBaseTest)
|
||||||
protected
|
protected
|
||||||
{$IFDEF FPC}
|
{$IFDEF FPC}
|
||||||
class procedure CheckEquals(expected, actual: TTimeRec; msg: string = ''); overload;
|
class procedure CheckEquals(expected, actual: TTimeRec; msg: string = ''); overload;
|
||||||
|
@ -633,7 +633,7 @@ type
|
|||||||
|
|
||||||
{ TTestArray }
|
{ TTestArray }
|
||||||
|
|
||||||
TTestArray= class(TTestCase)
|
TTestArray= class(TWstBaseTest)
|
||||||
published
|
published
|
||||||
procedure Test_StringArray();
|
procedure Test_StringArray();
|
||||||
procedure Test_BooleanArray();
|
procedure Test_BooleanArray();
|
||||||
|
@ -23,15 +23,14 @@ uses
|
|||||||
{$ELSE}
|
{$ELSE}
|
||||||
TestFrameWork, xmldom, wst_delphi_xml,
|
TestFrameWork, xmldom, wst_delphi_xml,
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
metadata_generator, binary_streamer, metadata_repository, pastree,
|
test_suite_utils, metadata_generator, binary_streamer, metadata_repository,
|
||||||
pascal_parser_intf,
|
pastree, pascal_parser_intf, metadata_wsdl;
|
||||||
metadata_wsdl;
|
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
{ TTestMetadata }
|
{ TTestMetadata }
|
||||||
|
|
||||||
TTestMetadata= class(TTestCase)
|
TTestMetadata= class(TWstBaseTest)
|
||||||
protected
|
protected
|
||||||
function CreateSymbolTable():TwstPasTreeContainer;
|
function CreateSymbolTable():TwstPasTreeContainer;
|
||||||
published
|
published
|
||||||
|
Reference in New Issue
Block a user