|
@@ -101,6 +101,7 @@ type
|
|
Procedure TestConstDeclarationStatement;
|
|
Procedure TestConstDeclarationStatement;
|
|
Procedure TestDebuggerStatement;
|
|
Procedure TestDebuggerStatement;
|
|
Procedure TestVarListDeclarationStatement;
|
|
Procedure TestVarListDeclarationStatement;
|
|
|
|
+ Procedure TestConstListDeclarationStatement;
|
|
Procedure TestVarListDeclarationStatement2Vars;
|
|
Procedure TestVarListDeclarationStatement2Vars;
|
|
Procedure TestVarListDeclarationStatement3Vars;
|
|
Procedure TestVarListDeclarationStatement3Vars;
|
|
Procedure TestReturnStatement;
|
|
Procedure TestReturnStatement;
|
|
@@ -1058,6 +1059,23 @@ begin
|
|
AssertWrite('simple var','var a',S);
|
|
AssertWrite('simple var','var a',S);
|
|
end;
|
|
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;
|
|
procedure TTestStatementWriter.TestVarListDeclarationStatement2Vars;
|
|
Var
|
|
Var
|
|
S : TJSVariableStatement;
|
|
S : TJSVariableStatement;
|