* restored version

This commit is contained in:
michael 1998-03-25 13:43:38 +00:00
parent ff187a0a4f
commit 5132685b05
7 changed files with 123 additions and 0 deletions

13
tests/TS010009.PP Normal file
View File

@ -0,0 +1,13 @@
unit ts010009;
interface
type
tr = record
case a : (x,y,z) of
x : (l : longint);
end;
implementation
end.

15
tests/ts010010.pp Normal file
View File

@ -0,0 +1,15 @@
uses
ts010009;
var
r : tr;
begin
r.a:=x;
if r.a=x then
begin
with r do
if a=y then
;
end;
end.

18
tests/ts010014.bat Normal file
View File

@ -0,0 +1,18 @@
@echo off
rem
rem Batch file to compile and run ts010014
rem
echo Compiling ts010014...
ppc386 ts010014 >nul
if errorlevel 1 goto comfailed
echo compilation of ts010014 : PASSED
ts010014 >nul
if errorlevel 0 goto runpassed
echo execution of ts010014 : FAILED
goto end
:runpassed
echo execution of ts010014 : PASSED
goto end
:comfailed
echo Compilation of ts010014 : FAILED
:end

42
tests/ts010014.pp Normal file
View File

@ -0,0 +1,42 @@
{$R+}
type
ta = object
constructor init;
destructor done;
procedure p;virtual;
end;
pa = ^ta;
constructor ta.init;
begin
end;
destructor ta.done;
begin
end;
procedure ta.p;
begin
end;
type
plongint = ^longint;
var
p : pa;
data : array[0..4] of longint;
begin
fillchar(data,sizeof(data),12);
p:=new(pa,init);
p^.p;
{ the vmt pointer gets an invalid value: }
plongint(p)^:=longint(@data);
{ causes runerror }
p^.p;
halt(1);
end.

18
tests/ts010100.bat Normal file
View File

@ -0,0 +1,18 @@
@echo off
rem
rem Batch file to compile and run ts010100
rem
echo Compiling ts010100...
ppc386 ts010100 >nul
if errorlevel 1 goto comfailed
echo compilation of ts010100 : PASSED
ts010100 >nul
if errorlevel 0 goto runpassed
echo execution of ts010100 : FAILED
goto end
:runpassed
echo execution of ts010100 : PASSED
goto end
:comfailed
echo Compilation of ts010100 : FAILED
:end

6
tests/ts010100.pp Normal file
View File

@ -0,0 +1,6 @@
var
o : tobject;
begin
halt(1);
end.

11
tests/ts010101.pp Normal file
View File

@ -0,0 +1,11 @@
{ tests assignements and compare }
var
o1,o2 : tobject;
begin
o1:=nil;
o2:=o1;
if o2<>nil then
halt(1);
end.