mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-23 01:39:31 +02:00
codetools: test class completion for objfpc generic
git-svn-id: trunk@56523 -
This commit is contained in:
parent
512b7c6179
commit
5b452794dd
@ -19,6 +19,8 @@ type
|
||||
Expected: array of string);
|
||||
published
|
||||
procedure TestIntfProcUpdateArgName;
|
||||
procedure TestCompleteMethodBody_GenericObjFPC;
|
||||
procedure TestCompleteMethodBody_GenericDelphi;
|
||||
procedure TestCompleteMethodBody_ParamSpecialize;
|
||||
procedure TestCompleteMethodBody_ParamDelphiSpecialize;
|
||||
end;
|
||||
@ -63,21 +65,85 @@ begin
|
||||
Test('TestIntfProcUpdateArgName',
|
||||
['unit test1;'
|
||||
,'interface'
|
||||
,'procedure DoIt(a: longint);'
|
||||
,'procedure DoIt(NewName: longint);'
|
||||
,'implementation'
|
||||
,'procedure DoIt(b: longint);'
|
||||
,'procedure DoIt(OldName: longint);'
|
||||
,'begin end;'
|
||||
,'end.'],
|
||||
3,1,
|
||||
['unit test1;'
|
||||
,'interface'
|
||||
,'procedure DoIt(a: longint);'
|
||||
,'procedure DoIt(NewName: longint);'
|
||||
,'implementation'
|
||||
,'procedure DoIt(a: longint);'
|
||||
,'procedure DoIt(NewName: longint);'
|
||||
,'begin end;'
|
||||
,'end.']);
|
||||
end;
|
||||
|
||||
procedure TTestCodeCompletion.TestCompleteMethodBody_GenericObjFPC;
|
||||
begin
|
||||
Test('TestCompleteMethodBody_GenericObjFPC',
|
||||
['unit test1;',
|
||||
'{$mode objfpc}{$H+}',
|
||||
'interface',
|
||||
'type',
|
||||
' generic TBird<T: class> = class',
|
||||
' procedure DoIt;',
|
||||
' end;',
|
||||
'implementation',
|
||||
'end.'],
|
||||
6,1,
|
||||
['unit test1;',
|
||||
'{$mode objfpc}{$H+}',
|
||||
'interface',
|
||||
'type',
|
||||
'',
|
||||
' { TBird }',
|
||||
'',
|
||||
' generic TBird<T: class> = class',
|
||||
' procedure DoIt;',
|
||||
' end;',
|
||||
'implementation',
|
||||
'',
|
||||
'procedure TBird.DoIt;',
|
||||
'begin',
|
||||
'end;',
|
||||
'',
|
||||
'end.']);
|
||||
end;
|
||||
|
||||
procedure TTestCodeCompletion.TestCompleteMethodBody_GenericDelphi;
|
||||
begin
|
||||
Test('TestCompleteMethodBody_GenericObjFPC',
|
||||
['unit test1;',
|
||||
'{$mode delphi}',
|
||||
'interface',
|
||||
'type',
|
||||
' TBird<T: class> = class',
|
||||
' procedure DoIt;',
|
||||
' end;',
|
||||
'implementation',
|
||||
'end.'],
|
||||
6,1,
|
||||
['unit test1;',
|
||||
'{$mode delphi}',
|
||||
'interface',
|
||||
'type',
|
||||
'',
|
||||
' { TBird }',
|
||||
'',
|
||||
' TBird<T: class> = class',
|
||||
' procedure DoIt;',
|
||||
' end;',
|
||||
'implementation',
|
||||
'',
|
||||
'procedure TBird<T>.DoIt;',
|
||||
'begin',
|
||||
'end;',
|
||||
'',
|
||||
'end.']);
|
||||
end;
|
||||
|
||||
procedure TTestCodeCompletion.TestCompleteMethodBody_ParamSpecialize;
|
||||
begin
|
||||
Test('TestCompleteMethodBody_ParamSpecialize',
|
||||
|
Loading…
Reference in New Issue
Block a user