mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-14 17:22:11 +02:00
codetools: fixed some tests
This commit is contained in:
parent
6b9fd935b2
commit
66b36cd172
@ -1503,7 +1503,7 @@ var
|
||||
'.':
|
||||
if (not FoundFloat)
|
||||
and (CurPos.StartPos>2)
|
||||
and (LastChar in ['0'..'9'])
|
||||
and (LastChar in ['0'..'9','e','E'])
|
||||
and (Src[CurPos.StartPos-2] in ['0'..'9']) then
|
||||
begin
|
||||
// float
|
||||
|
@ -198,7 +198,7 @@ var i, l, l2: integer;
|
||||
pSrc, pDest: PWord;
|
||||
begin
|
||||
l:=length(s);
|
||||
SetLength(Result,l);
|
||||
SetLength(Result{%H-},l);
|
||||
if l>0 then begin
|
||||
pDest:=PWord(@Result[1]);
|
||||
pSrc:=PWord(@s[1]);
|
||||
@ -853,6 +853,7 @@ begin
|
||||
IsIdentChar[c]:=c in ['a'..'z','A'..'Z','_','0'..'9'];
|
||||
IsDottedIdentChar[c]:=c in ['.','a'..'z','A'..'Z','_','0'..'9'];
|
||||
IsNumberChar[c]:=c in ['0'..'9'];
|
||||
IsNumberOrSepChar[c]:=c in ['0'..'9','_'];
|
||||
IsCommentStartChar[c]:=c in ['/','{','('];
|
||||
IsCommentEndChar[c]:=c in ['}',')',#13,#10];
|
||||
IsHexNumberChar[c]:=c in ['0'..'9','a'..'f','A'..'F'];
|
||||
|
@ -2143,7 +2143,7 @@ begin
|
||||
if not WordIsTermOperator.DoItCaseInsensitive(Src,CurPos.StartPos,
|
||||
CurPos.EndPos-CurPos.StartPos)
|
||||
then begin
|
||||
// not a operator
|
||||
// not an operator
|
||||
break;
|
||||
end;
|
||||
// operator => read further
|
||||
|
@ -1076,7 +1076,8 @@ procedure TTestFindDeclaration.TestFindDeclaration_AnonymProc;
|
||||
begin
|
||||
StartProgram;
|
||||
Add([
|
||||
'{$mode objfpc}{$modeswitch closures}',
|
||||
'{$mode objfpc}',
|
||||
'{$modeswitch anonymousfunctions}',
|
||||
'type',
|
||||
' int = word;',
|
||||
' TFunc = function(i: int): int;',
|
||||
@ -1106,7 +1107,8 @@ procedure TTestFindDeclaration.TestFindDeclaration_AnonymProc_ExprDot;
|
||||
begin
|
||||
StartProgram;
|
||||
Add([
|
||||
'{$mode objfpc}{$modeswitch closures}',
|
||||
'{$mode objfpc}',
|
||||
'{$modeswitch anonymousfunctions}',
|
||||
'type',
|
||||
' int = word;',
|
||||
' TFunc = function(i: int): int;',
|
||||
|
@ -526,7 +526,7 @@ procedure TTestPascalParser.TestParseProcAnoAssign;
|
||||
begin
|
||||
Add([
|
||||
'program test1;',
|
||||
'{$modeswitch closures}',
|
||||
'{$modeswitch anonymousfunctions}',
|
||||
'procedure DoIt;',
|
||||
'begin',
|
||||
' p:=procedure begin end;',
|
||||
@ -550,7 +550,7 @@ begin
|
||||
Add([
|
||||
'program test1;',
|
||||
'{$mode objfpc}',
|
||||
'{$modeswitch closures}',
|
||||
'{$modeswitch anonymousfunctions}',
|
||||
'procedure DoIt;',
|
||||
'begin',
|
||||
' DoIt(procedure begin end);',
|
||||
@ -574,7 +574,7 @@ begin
|
||||
Add([
|
||||
'program test1;',
|
||||
'{$mode objfpc}',
|
||||
'{$modeswitch closures}',
|
||||
'{$modeswitch anonymousfunctions}',
|
||||
'procedure DoIt;',
|
||||
'begin',
|
||||
' DoIt(',
|
||||
|
Loading…
Reference in New Issue
Block a user