summaryrefslogtreecommitdiff
path: root/fpcsrc/tests/tbs/tb0572.pp
blob: b126529b70e7877f905d012422dcdef8ebfb6bdd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{ test copy optimization of dyn. arrays }
uses
  Sysutils;
var
  a,b,c : array of ansistring;
  i : longint;

begin
  SetLength(a,1000);
  SetLength(c,1000);
  for i:=low(a) to high(a) do
    a[i]:=IntToStr(random(10000));
  b:=copy(a);
  c:=copy(a);
  a:=nil;
  for i:=low(b) to high(b) do
    if b[i]<>c[i] then
      halt(1);
  writeln('ok');
end.