mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-20 13:19:21 +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
|
published
|
||||||
procedure TestIntfProcUpdateArgName;
|
procedure TestIntfProcUpdateArgName;
|
||||||
procedure TestCompleteMethodBody_ParamSpecialize;
|
procedure TestCompleteMethodBody_ParamSpecialize;
|
||||||
|
procedure TestCompleteMethodBody_ParamDelphiSpecialize;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
@ -109,6 +110,38 @@ begin
|
|||||||
'end.']);
|
'end.']);
|
||||||
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
|
initialization
|
||||||
RegisterTests([TTestCodeCompletion]);
|
RegisterTests([TTestCodeCompletion]);
|
||||||
end.
|
end.
|
||||||
|
@ -558,6 +558,7 @@ procedure TTestFindDeclaration.TestFindDeclaration_GenericFunction;
|
|||||||
begin
|
begin
|
||||||
StartProgram;
|
StartProgram;
|
||||||
Add([
|
Add([
|
||||||
|
'{$mode objfpc}',
|
||||||
'generic function RandomFrom<T>(const AValues:array of T):T;',
|
'generic function RandomFrom<T>(const AValues:array of T):T;',
|
||||||
'begin',
|
'begin',
|
||||||
' Result:=Avalue[1];',
|
' Result:=Avalue[1];',
|
||||||
|
Loading…
Reference in New Issue
Block a user