mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 09:06:02 +02:00
* new tests
This commit is contained in:
parent
d42db59d66
commit
ad52b0fbdf
5
tests/tbs/tb0393.pp
Normal file
5
tests/tbs/tb0393.pp
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
label 1;
|
||||||
|
begin
|
||||||
|
goto 1;
|
||||||
|
1:
|
||||||
|
end.
|
30
tests/tbs/tb0394.pp
Normal file
30
tests/tbs/tb0394.pp
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
{ %version=1.1 }
|
||||||
|
|
||||||
|
{$ifdef fpc}{$mode objfpc}{$endif}
|
||||||
|
{$apptype console}
|
||||||
|
var
|
||||||
|
err : boolean;
|
||||||
|
procedure Demo(x:array of longint);
|
||||||
|
var
|
||||||
|
i:longint;
|
||||||
|
begin
|
||||||
|
if high(x)<>4 then
|
||||||
|
err:=true
|
||||||
|
else if x[4]<>14 then
|
||||||
|
err:=true;
|
||||||
|
for i:=low(x)to high(x)do
|
||||||
|
writeln(i,' ',x[i]);
|
||||||
|
end;
|
||||||
|
var
|
||||||
|
y:array[10..40]of longint;
|
||||||
|
i:longint;
|
||||||
|
begin
|
||||||
|
for i:=10 to 40 do
|
||||||
|
y[i]:=i;
|
||||||
|
Demo(slice(y,5));
|
||||||
|
if err then
|
||||||
|
begin
|
||||||
|
writeln('ERROR!');
|
||||||
|
halt(1);
|
||||||
|
end;
|
||||||
|
end.
|
Loading…
Reference in New Issue
Block a user