|
@@ -78,7 +78,8 @@ type
|
|
procedure TestWPO_Class_OmitPropertySetter2;
|
|
procedure TestWPO_Class_OmitPropertySetter2;
|
|
procedure TestWPO_CallInherited;
|
|
procedure TestWPO_CallInherited;
|
|
procedure TestWPO_UseUnit;
|
|
procedure TestWPO_UseUnit;
|
|
- procedure TestWPO_ArrayOfConst;
|
|
|
|
|
|
+ procedure TestWPO_ArrayOfConst_Use;
|
|
|
|
+ procedure TestWPO_ArrayOfConst_NotUsed;
|
|
procedure TestWPO_Class_PropertyInOtherUnit;
|
|
procedure TestWPO_Class_PropertyInOtherUnit;
|
|
procedure TestWPO_ProgramPublicDeclaration;
|
|
procedure TestWPO_ProgramPublicDeclaration;
|
|
procedure TestWPO_ConstructorDefaultValueConst;
|
|
procedure TestWPO_ConstructorDefaultValueConst;
|
|
@@ -815,12 +816,13 @@ begin
|
|
CheckDiff('TestWPO_UseUnit',ExpectedSrc,ActualSrc);
|
|
CheckDiff('TestWPO_UseUnit',ExpectedSrc,ActualSrc);
|
|
end;
|
|
end;
|
|
|
|
|
|
-procedure TTestOptimizations.TestWPO_ArrayOfConst;
|
|
|
|
|
|
+procedure TTestOptimizations.TestWPO_ArrayOfConst_Use;
|
|
begin
|
|
begin
|
|
StartProgram(true,[supTVarRec]);
|
|
StartProgram(true,[supTVarRec]);
|
|
Add([
|
|
Add([
|
|
'procedure Say(arr: array of const);',
|
|
'procedure Say(arr: array of const);',
|
|
- 'begin end;',
|
|
|
|
|
|
+ 'begin',
|
|
|
|
+ 'end;',
|
|
'begin',
|
|
'begin',
|
|
' Say([true]);']);
|
|
' Say([true]);']);
|
|
ConvertProgram;
|
|
ConvertProgram;
|
|
@@ -851,6 +853,23 @@ begin
|
|
'']));
|
|
'']));
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
+procedure TTestOptimizations.TestWPO_ArrayOfConst_NotUsed;
|
|
|
|
+begin
|
|
|
|
+ StartProgram(true,[supTVarRec]);
|
|
|
|
+ Add([
|
|
|
|
+ 'procedure Say(arr: array of const);',
|
|
|
|
+ 'begin',
|
|
|
|
+ 'end;',
|
|
|
|
+ 'begin']);
|
|
|
|
+ ConvertProgram;
|
|
|
|
+ CheckUnit('system.pp',
|
|
|
|
+ LinesToStr([
|
|
|
|
+ 'rtl.module("system", [], function () {',
|
|
|
|
+ ' var $mod = this;',
|
|
|
|
+ '});',
|
|
|
|
+ '']));
|
|
|
|
+end;
|
|
|
|
+
|
|
procedure TTestOptimizations.TestWPO_Class_PropertyInOtherUnit;
|
|
procedure TTestOptimizations.TestWPO_Class_PropertyInOtherUnit;
|
|
begin
|
|
begin
|
|
AddModuleWithIntfImplSrc('unit1.pp',
|
|
AddModuleWithIntfImplSrc('unit1.pp',
|