mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-05-14 07:22:41 +02:00
codetools: added test TTestRefactoring.TestRenameProcReferences
git-svn-id: trunk@64998 -
This commit is contained in:
parent
4d1cf08cde
commit
cb6eb68d7e
@ -33,6 +33,7 @@ type
|
||||
published
|
||||
procedure TestExplodeWith;
|
||||
procedure TestRenameReferences;
|
||||
procedure TestRenameProcReferences;
|
||||
end;
|
||||
|
||||
implementation
|
||||
@ -300,6 +301,36 @@ begin
|
||||
'']);
|
||||
end;
|
||||
|
||||
procedure TTestRefactoring.TestRenameProcReferences;
|
||||
begin
|
||||
StartProgram;
|
||||
Add([
|
||||
'procedure Cow;',
|
||||
'begin',
|
||||
'end;',
|
||||
'',
|
||||
'begin',
|
||||
' cow{#Rename};',
|
||||
' test1.cow;',
|
||||
'end.',
|
||||
'']);
|
||||
RenameReferences('Bird');
|
||||
CheckDiff(Code,[
|
||||
'program test1;',
|
||||
'',
|
||||
'{$mode objfpc}{$H+}',
|
||||
'',
|
||||
'procedure Bird;',
|
||||
'begin',
|
||||
'end;',
|
||||
'',
|
||||
'begin',
|
||||
' Bird{#Rename};',
|
||||
' test1.Bird;',
|
||||
'end.',
|
||||
'']);
|
||||
end;
|
||||
|
||||
initialization
|
||||
RegisterTests([TTestRefactoring]);
|
||||
end.
|
||||
|
Loading…
Reference in New Issue
Block a user