소스 검색

* add test for setlength with multiple parameters

peter 23 년 전
부모
커밋
451532aaed
1개의 변경된 파일11개의 추가작업 그리고 0개의 파일을 삭제
  1. 11 0
      tests/webtbs/tw1856.pp

+ 11 - 0
tests/webtbs/tw1856.pp

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