* more bugs

This commit is contained in:
peter 2002-04-23 13:16:42 +00:00
parent 51c5fb965e
commit e37725d6fd
4 changed files with 98 additions and 0 deletions

55
tests/webtbf/tw1842.pp Normal file
View File

@ -0,0 +1,55 @@
{ %fail }
type
s8=shortint;
s16=smallint;
s32=longint;
addrtype=pchar;
InPacket=pchar;
PROCEDURE getlrc1 ( Buffer : AddrType ;
StartPos : s32 ;
MaxPos : s32 ;
LastChar : s32 ;
VAR LRCPos : s16 ;
VAR LRCVal : s8); CDECL; [Public, alias: 'getlrc'];
begin
LRCPos:=200;
LRCVal:=100;
end;
PROCEDURE CalcLRC ( APacket : InPacket ;
PacketLen : s32;
StartPos : s16 ;
EndingChar: s16 ;
VAR LRCPos : s16 ;
VAR LRCVal : s8 );
PROCEDURE getlrc ( Buffer : AddrType ;
StartPos : s32 ;
MaxPos : s32 ;
LastChar : s32 ;
VAR LRCPos : s16 ;
VAR LRCVal : s8); CDECL; EXTERNAL;
BEGIN
getlrc (APacket,
StartPos - 1,
PacketLen,
EndingChar, {--ETX or SO--}
LRCPos,
LRCVal);
LRCPos := LRCPos + 1;
END; { CalcLRC }
VAR
LRCPos : s16 ;
LRCVal : s8;
begin
calclrc('12345',5,2,ord('5'),LRCPos,LRCVal);
writeln(LRCPos,' ',LRCVal);
end.

24
tests/webtbf/tw1939.pp Normal file
View File

@ -0,0 +1,24 @@
{ %fail }
Type
GLEnum = longint;
tShader=Record
TexturesUsed:Longint;
Primitive:GLenum;
Blended:Boolean;
BlendSrc:GLenum;
BlendDst:GLenum;
ShaderName:String;
End;
Const EmptyShader:tShader=(
TexturesUsed:-1;
Primitive:0;
Blended:False;
BlendSrc:0;
BlendDst:0;
Tag:'');
begin
end.

19
tests/webtbs/tw1938.pp Normal file
View File

@ -0,0 +1,19 @@
var A: array [0..1] of Integer;
function F: Integer; inline;
begin
F := A[1];
end;
begin
A[0] := 1234;
A[1] := 5678;
WriteLn(F); { writes 1234 }
if F<>5678 then
begin
Writeln('ERROR!');
Halt(1);
end;
end.