mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 07:16:16 +02:00
codetools: tests with
git-svn-id: trunk@50265 -
This commit is contained in:
parent
a98baa8442
commit
7395b9b047
@ -1486,10 +1486,22 @@ begin
|
||||
|
||||
// RemoveWithHeader
|
||||
SourceChangeCache.MainScanner:=Scanner;
|
||||
if not FindBounds then exit;
|
||||
if not RemoveWithHeader then exit;
|
||||
if not UnindentAndEncloseSkippedCode then exit;
|
||||
if not PrefixSubIdentifiers then exit;
|
||||
if not FindBounds then begin
|
||||
debugln(['TExtractProcTool.RemoveWithBlock FindBounds failed']);
|
||||
exit;
|
||||
end;
|
||||
if not RemoveWithHeader then begin
|
||||
debugln(['TExtractProcTool.RemoveWithBlock RemoveWithHeader failed']);
|
||||
exit;
|
||||
end;
|
||||
if not UnindentAndEncloseSkippedCode then begin
|
||||
debugln(['TExtractProcTool.RemoveWithBlock UnindentAndEncloseSkippedCode failed']);
|
||||
exit;
|
||||
end;
|
||||
if not PrefixSubIdentifiers then begin
|
||||
debugln(['TExtractProcTool.RemoveWithBlock PrefixSubIdentifiers failed']);
|
||||
exit;
|
||||
end;
|
||||
|
||||
Result:=SourceChangeCache.Apply;
|
||||
//debugln(['TExtractProcTool.RemoveWithBlock SOURCE:']);
|
||||
|
@ -100,7 +100,7 @@ begin
|
||||
end;
|
||||
// check each marker
|
||||
Src:=Code.Source;
|
||||
//debugln(['TTestRefactoring.TestExplodeWith ',copy(Src,NewStartPos,NewEndPos-NewStartPos)]);
|
||||
//debugln(['TTestRefactoring.TestExplodeWith NewBlock=',copy(Src,NewStartPos,NewEndPos-NewStartPos)]);
|
||||
p:=NewStartPos;
|
||||
repeat
|
||||
CommentStartPos:=FindNextComment(Src,p,NewEndPos);
|
||||
|
@ -13,6 +13,8 @@ type
|
||||
|
||||
TMyClass = class
|
||||
public
|
||||
Parent: TMyClass;
|
||||
Left: string;
|
||||
procedure DoSomething;
|
||||
end;
|
||||
|
||||
@ -22,11 +24,16 @@ implementation
|
||||
|
||||
procedure TMyClass.DoSomething;
|
||||
var
|
||||
R: TRect;
|
||||
R1: TRect;
|
||||
begin
|
||||
R:=Rect(1,2,3,4);
|
||||
with R do
|
||||
{explodewith:R}Left:=4;
|
||||
R1:=Rect(1,2,3,4);
|
||||
with R1 do
|
||||
{explodewith:R1}Left:=4;
|
||||
if R1.Left= 4 then ;
|
||||
with Parent do
|
||||
{explodewith:Parent}Left:='A';
|
||||
with Parent.Parent do
|
||||
{explodewith:Parent}Left:='A';
|
||||
end;
|
||||
|
||||
end.
|
||||
|
Loading…
Reference in New Issue
Block a user