codetools: tests: class helpers Self.Method

git-svn-id: trunk@49979 -
This commit is contained in:
mattias 2015-10-07 21:19:17 +00:00
parent 540ba629c0
commit 8f39050549

View File

@ -1,3 +1,7 @@
{
Test with:
./finddeclarationtest --format=plain --suite=TestFindDeclaration_ClassHelper
}
unit fdt_classhelper;
{$mode objfpc}{$H+}
@ -16,6 +20,21 @@ type
function MyVar: integer;
end;
{ TMyClass }
TMyClass = class(TObject)
public
procedure Hello;
end;
{ TMyClassHelper }
TMyClassHelper = class helper for TMyClass
public
procedure Hello2;
end;
procedure DoIt;
implementation
@ -29,6 +48,20 @@ begin
sl.Free;
end;
{ TMyClassHelper }
procedure TMyClassHelper.Hello2;
begin
end;
{ TMyClass }
procedure TMyClass.Hello;
begin
Self.Hello2{declaration:fdt_classhelper.TMyClassHelper.Hello2};
end;
{ TStringsClassHelper }
function TStringsClassHelper.MyVar: integer;