mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-03 20:30:55 +02:00
* Test for const list
This commit is contained in:
parent
cb03124cc5
commit
c8403ad49e
@ -101,6 +101,7 @@ type
|
||||
Procedure TestConstDeclarationStatement;
|
||||
Procedure TestDebuggerStatement;
|
||||
Procedure TestVarListDeclarationStatement;
|
||||
Procedure TestConstListDeclarationStatement;
|
||||
Procedure TestVarListDeclarationStatement2Vars;
|
||||
Procedure TestVarListDeclarationStatement3Vars;
|
||||
Procedure TestReturnStatement;
|
||||
@ -1058,6 +1059,23 @@ begin
|
||||
AssertWrite('simple var','var a',S);
|
||||
end;
|
||||
|
||||
procedure TTestStatementWriter.TestConstListDeclarationStatement;
|
||||
Var
|
||||
S : TJSVariableStatement;
|
||||
V : TJSVarDeclaration;
|
||||
L : TJSVariableDeclarationList;
|
||||
|
||||
begin
|
||||
S:=TJSVariableStatement.Create(0,0);
|
||||
L:=TJSVariableDeclarationList.Create(0,0);
|
||||
V:=TJSVarDeclaration.Create(0,0);
|
||||
S.VarType:=vtConst;
|
||||
L.A:=V;
|
||||
S.VarDecl:=L;
|
||||
V.Name:='a';
|
||||
AssertWrite('simple const','const a',S);
|
||||
end;
|
||||
|
||||
procedure TTestStatementWriter.TestVarListDeclarationStatement2Vars;
|
||||
Var
|
||||
S : TJSVariableStatement;
|
||||
|
Loading…
Reference in New Issue
Block a user