* new tests

This commit is contained in:
peter 2001-09-02 21:11:53 +00:00
parent 8b3905de23
commit d523065fb1
4 changed files with 58 additions and 0 deletions

12
tests/tbf/tb0107.pp Normal file
View File

@ -0,0 +1,12 @@
{ %FAIL }
var
i : longint;
j,j2 : word;
k : byte;
begin
j:=5;
byte(i):=j;
longint(j):=12;
end.

10
tests/tbf/tb0108.pp Normal file
View File

@ -0,0 +1,10 @@
{ %FAIL }
{$mode delphi}
var
i : int64;
e : extended;
begin
e:=int(i);
end.

22
tests/tbf/tb0109.pp Normal file
View File

@ -0,0 +1,22 @@
{ %fail }
{$mode delphi}
type
tcl1=class
end;
tcl2=class(tcl1)
end;
procedure p1(var p:tcl1);
begin
end;
var
t : tcl2;
begin
t:=tcl2.create;
{ in delphi the passed argument must match exact }
p1(t);
end.

14
tests/tbs/tb0377.pp Normal file
View File

@ -0,0 +1,14 @@
{$ifdef fpc}{$mode tp}{$endif}
var
i : longint;
j : word;
begin
j:=5;
i:=-1;
{ this is allowed in tp7 }
byte(i):=j;
writeln('i: ',i,' (should be -251)');
if i<>-251 then
halt(1);
end.