mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-20 08:39:41 +02:00
codetools: test complete method with specialize in delphi mode
git-svn-id: trunk@56322 -
This commit is contained in:
parent
4cae594814
commit
dd4b6615a3
@ -20,6 +20,7 @@ type
|
||||
published
|
||||
procedure TestIntfProcUpdateArgName;
|
||||
procedure TestCompleteMethodBody_ParamSpecialize;
|
||||
procedure TestCompleteMethodBody_ParamDelphiSpecialize;
|
||||
end;
|
||||
|
||||
implementation
|
||||
@ -109,6 +110,38 @@ begin
|
||||
'end.']);
|
||||
end;
|
||||
|
||||
procedure TTestCodeCompletion.TestCompleteMethodBody_ParamDelphiSpecialize;
|
||||
begin
|
||||
Test('TestCompleteMethodBody_ParamSpecialize',
|
||||
['unit test1;',
|
||||
'{$mode delphi}',
|
||||
'interface',
|
||||
'type',
|
||||
' TBird = class',
|
||||
' procedure DoIt(i: TGenList<longint>);',
|
||||
' end;',
|
||||
'implementation',
|
||||
'end.'],
|
||||
6,1,
|
||||
['unit test1;',
|
||||
'{$mode delphi}',
|
||||
'interface',
|
||||
'type',
|
||||
'',
|
||||
' { TBird }',
|
||||
'',
|
||||
' TBird = class',
|
||||
' procedure DoIt(i: TGenList<longint>);',
|
||||
' end;',
|
||||
'implementation',
|
||||
'',
|
||||
'procedure TBird.DoIt(i: TGenList<longint>);',
|
||||
'begin',
|
||||
'end;',
|
||||
'',
|
||||
'end.']);
|
||||
end;
|
||||
|
||||
initialization
|
||||
RegisterTests([TTestCodeCompletion]);
|
||||
end.
|
||||
|
@ -558,6 +558,7 @@ procedure TTestFindDeclaration.TestFindDeclaration_GenericFunction;
|
||||
begin
|
||||
StartProgram;
|
||||
Add([
|
||||
'{$mode objfpc}',
|
||||
'generic function RandomFrom<T>(const AValues:array of T):T;',
|
||||
'begin',
|
||||
' Result:=Avalue[1];',
|
||||
|
Loading…
Reference in New Issue
Block a user