Browse Source

* new tests

peter 20 years ago
parent
commit
6f93efe3de
3 changed files with 53 additions and 0 deletions
  1. 17 0
      tests/webtbs/tw3172.pp
  2. 29 0
      tests/webtbs/tw3257.pp
  3. 7 0
      tests/webtbs/tw3567.pp

+ 17 - 0
tests/webtbs/tw3172.pp

@@ -0,0 +1,17 @@
+{ %opt=-Sew }
+
+type
+  PUI32 = ^Longword;
+var
+  P : PUI32;
+  Count : Longint;
+  Dw    : Longword;
+begin
+  Dw:=1;
+  Count:=1;
+  p:=@DW;
+  // Increase pointer
+  Inc(P,Count);
+  if Dw<>1 then
+    halt(1);
+end.

+ 29 - 0
tests/webtbs/tw3257.pp

@@ -0,0 +1,29 @@
+{ %target=linux,freebsd }
+
+{ Source provided for Free Pascal Bug Report 3257 }
+{ Submitted by "peter green" on  2004-08-18 }
+{ e-mail: [email protected] }
+unit tw3257;
+
+{$mode delphi}
+{$inline on}
+
+interface
+
+implementation
+uses
+  baseunix,unix,sysutils;
+
+  procedure gettimeofday(var tv:ttimeval);inline;
+    begin
+      fpgettimeofday(@tv,nil);
+    end;
+    function gettimeofdaysec : longint;inline;
+    var
+      tv:ttimeval;
+    begin
+      gettimeofday(tv);
+      result := tv.tv_sec;
+    end;
+end.
+

+ 7 - 0
tests/webtbs/tw3567.pp

@@ -0,0 +1,7 @@
+{ %opt=-Sew }
+
+(*$WEAKPACKAGEUNIT*)
+(*$HPPEMIT '#include "some_include.h"' *)
+(*$NODEFINE xxx*)
+begin
+end.