Browse Source

* add test for setlength with multiple parameters

peter 23 năm trước cách đây
mục cha
commit
451532aaed
1 tập tin đã thay đổi với 11 bổ sung0 xóa
  1. 11 0
      tests/webtbs/tw1856.pp

+ 11 - 0
tests/webtbs/tw1856.pp

@@ -1,6 +1,8 @@
 { %version=1.1 }
 
+{$ifdef fpc}
 {$mode objfpc}
+{$endif}
 
 type
  TFlowItem = class
@@ -9,12 +11,21 @@ type
 
  TFlow = array of TFlowItem;
 
+ TFlow2 = array of array of TFlowItem;
+
 var
  flow: tflow;
+ flow2 : TFLow2;
 begin
  setlength(flow, 10);
  setlength(flow, 1);
+ flow[1]:=TFlowItem.Create;
+
  { release }
  setlength(flow, 0);
+
+ setlength(flow2, 10, 20);
+ setlength(flow2, 0);
+
  writeln('no crash');
 end.