+ tests from mantis #15777

git-svn-id: trunk@15013 -
This commit is contained in:
Jonas Maebe 2010-03-14 11:03:09 +00:00
parent f29973cc71
commit 171c0289b0
3 changed files with 53 additions and 0 deletions

2
.gitattributes vendored
View File

@ -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
tests/webtbs/tw15777e.pp Normal file
View File

@ -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
tests/webtbs/tw15777f.pp Normal file
View File

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