mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-27 12:50:30 +02:00
parent
e783e54e8c
commit
dbc9b7f8b4
@ -3222,13 +3222,13 @@ begin
|
||||
ExpectIdentifier;
|
||||
Location:=CurTokenText;
|
||||
NextToken;
|
||||
if CurToken=tkDot then
|
||||
While CurToken=tkDot do
|
||||
begin
|
||||
ExpectIdentifier;
|
||||
Location:=Location+'.'+CurTokenText;
|
||||
end
|
||||
else
|
||||
UnGetToken;
|
||||
NextToken;
|
||||
end;
|
||||
UnGetToken;
|
||||
end
|
||||
else
|
||||
UngetToken;
|
||||
|
@ -33,6 +33,9 @@ Type
|
||||
Procedure TestSimpleVarInitialized;
|
||||
procedure TestSimpleVarInitializedDeprecated;
|
||||
procedure TestSimpleVarInitializedPlatform;
|
||||
Procedure TestSimpleVarAbsolute;
|
||||
Procedure TestSimpleVarAbsoluteDot;
|
||||
Procedure TestSimpleVarAbsolute2Dots;
|
||||
Procedure TestVarProcedure;
|
||||
Procedure TestVarFunctionINitialized;
|
||||
Procedure TestVarProcedureDeprecated;
|
||||
@ -182,6 +185,27 @@ begin
|
||||
AssertExpression('Variable value',TheVar.expr,pekNumber,'123');
|
||||
end;
|
||||
|
||||
procedure TTestVarParser.TestSimpleVarAbsolute;
|
||||
begin
|
||||
ParseVar('q absolute v','');
|
||||
AssertVariableType('q');
|
||||
AssertEquals('correct absolute location','v',TheVar.AbsoluteLocation);
|
||||
end;
|
||||
|
||||
procedure TTestVarParser.TestSimpleVarAbsoluteDot;
|
||||
begin
|
||||
ParseVar('q absolute v.w','');
|
||||
AssertVariableType('q');
|
||||
AssertEquals('correct absolute location','v.w',TheVar.AbsoluteLocation);
|
||||
end;
|
||||
|
||||
procedure TTestVarParser.TestSimpleVarAbsolute2Dots;
|
||||
begin
|
||||
ParseVar('q absolute v.w.x','');
|
||||
AssertVariableType('q');
|
||||
AssertEquals('correct absolute location','v.w.x',TheVar.AbsoluteLocation);
|
||||
end;
|
||||
|
||||
procedure TTestVarParser.TestVarProcedure;
|
||||
begin
|
||||
ParseVar('procedure','');
|
||||
|
Loading…
Reference in New Issue
Block a user