Browse Source

+ tests from mantis #15777

git-svn-id: trunk@15013 -
Jonas Maebe 15 years ago
parent
commit
171c0289b0
3 changed files with 53 additions and 0 deletions
  1. 2 0
      .gitattributes
  2. 25 0
      tests/webtbs/tw15777e.pp
  3. 26 0
      tests/webtbs/tw15777f.pp

+ 2 - 0
.gitattributes

@@ -10307,6 +10307,8 @@ tests/webtbs/tw1573.pp svneol=native#text/plain
 tests/webtbs/tw15777a.pp svneol=native#text/plain
 tests/webtbs/tw15777c.pp svneol=native#text/plain
 tests/webtbs/tw15777d.pp svneol=native#text/plain
+tests/webtbs/tw15777e.pp svneol=native#text/plain
+tests/webtbs/tw15777f.pp svneol=native#text/plain
 tests/webtbs/tw15812.pp svneol=native#text/plain
 tests/webtbs/tw1592.pp svneol=native#text/plain
 tests/webtbs/tw1617.pp svneol=native#text/plain

+ 25 - 0
tests/webtbs/tw15777e.pp

@@ -0,0 +1,25 @@
+{$mode macpas}
+{$B-}
+program test;
+
+type
+  IntegerPtr = ^Integer;
+
+var
+  gi: Integer;
+
+procedure A( procedure pp( p: univ Pointer));
+begin
+  pp( @gi)
+end;
+
+procedure B( p: IntegerPtr);
+begin
+  if ( p = nil) or ( p^ <> 12345) then halt( 1)
+end;
+
+begin
+  gi := 12345;
+  A( B)
+end.
+

+ 26 - 0
tests/webtbs/tw15777f.pp

@@ -0,0 +1,26 @@
+{$mode macpas}
+{$B-}
+program procparamvoidpointer2;
+
+type
+  IntegerPtr = ^Integer;
+  ProcParam = procedure( p: univ Pointer); 
+
+var
+  gi: Integer;
+
+procedure A( pp: ProcParam);
+begin
+  pp( @gi)
+end;
+
+procedure B( p: IntegerPtr);
+begin
+  if ( p = nil) or ( p^ <> 12345) then halt( 1)
+end;
+
+begin
+  gi := 12345;
+  A( B)
+end.
+