+ some new tests for the goto checking in exception blocks added

This commit is contained in:
florian 1999-12-14 09:59:06 +00:00
parent 577edbbd3f
commit 4598827d00
6 changed files with 71 additions and 0 deletions

View File

@ -53,3 +53,6 @@ testaoc.pp test Array of construct.
testansi.pp test ansistrings
testrtti.pp test RTTI generation and typinfo unit.
testexc.pp test exceptions.
testi642.pp test int64/qword
testpvar.pp test procedure variables
testgoto.pp test goto (very simple)

24
tests/testgoto.pp Normal file
View File

@ -0,0 +1,24 @@
function test : longint;
label l;
var
a,b : longint;
begin
a:=1;
b:=1;
l:
if a>b then
begin
exit(0);
end;
a:=2;
goto l;
end;
begin
test;
end.

10
tests/tf/tf000003.pp Normal file
View File

@ -0,0 +1,10 @@
{$mode objfpc}
label l;
begin
try
goto l;
finally
end;
l:
end.

10
tests/tf/tf000004.pp Normal file
View File

@ -0,0 +1,10 @@
{$mode objfpc}
label l;
begin
try
finally
l:
end;
goto l;
end.

10
tests/tf/tf000005.pp Normal file
View File

@ -0,0 +1,10 @@
{$mode objfpc}
label l;
begin
try
except
goto l;
end;
l:
end.

14
tests/tf/tf000006.pp Normal file
View File

@ -0,0 +1,14 @@
{$mode objfpc}
uses
sysutils;
label l;
begin
try
except
on e : exception do
goto l;
end;
l:
end.