Ver Fonte

* more bugs

peter há 23 anos atrás
pai
commit
e37725d6fd
4 ficheiros alterados com 98 adições e 0 exclusões
  1. 55 0
      tests/webtbf/tw1842.pp
  2. 24 0
      tests/webtbf/tw1939.pp
  3. 0 0
      tests/webtbs/tw1851.pp
  4. 19 0
      tests/webtbs/tw1938.pp

+ 55 - 0
tests/webtbf/tw1842.pp

@@ -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 - 0
tests/webtbf/tw1939.pp

@@ -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.
+

+ 0 - 0
tests/webtbf/tw1851.pp → tests/webtbs/tw1851.pp


+ 19 - 0
tests/webtbs/tw1938.pp

@@ -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.
+