* test for method aliases (function)

git-svn-id: trunk@45419 -
This commit is contained in:
michael 2020-05-18 13:12:29 +00:00
parent 7649e205aa
commit 45d08916f2

View File

@ -102,6 +102,7 @@ type
Procedure TestMethodSimpleComment; Procedure TestMethodSimpleComment;
Procedure TestMethodWithDotFails; Procedure TestMethodWithDotFails;
Procedure TestMethodWithDotOK; Procedure TestMethodWithDotOK;
Procedure TestMethodFunctionWithDotOK;
Procedure TestClassMethodSimple; Procedure TestClassMethodSimple;
Procedure TestClassMethodSimpleComment; Procedure TestClassMethodSimpleComment;
Procedure TestConstructor; Procedure TestConstructor;
@ -922,6 +923,16 @@ begin
AssertNotNull('1 method resolution procedure',TPasMethodResolution(members[0]).ImplementationProc); AssertNotNull('1 method resolution procedure',TPasMethodResolution(members[0]).ImplementationProc);
end; end;
procedure TTestClassType.TestMethodFunctionWithDotOK;
begin
AddMember('Function DoSomething.Stupid=me');
ParseClass;
AssertEquals('1 members',1,TheClass.members.Count);
AssertEquals('1 method resolution procedure',TPasMethodResolution,members[0].ClassType);
AssertEquals('Default visibility',visDefault,Members[0].Visibility);
AssertNotNull('1 method resolution procedure',TPasMethodResolution(members[0]).ImplementationProc);
end;
procedure TTestClassType.TestClassMethodSimple; procedure TTestClassType.TestClassMethodSimple;
begin begin