mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 15:19:19 +02:00
gdbmi debugger tests
git-svn-id: branches/fixes_1_8@56551 -
This commit is contained in:
parent
b0b5617f89
commit
1d2dc52d99
@ -34,6 +34,22 @@ begin
|
||||
except
|
||||
writeln(1);
|
||||
end;
|
||||
|
||||
try
|
||||
try
|
||||
raise Exception.create('a');
|
||||
writeln(1);
|
||||
writeln(1);
|
||||
writeln(1);
|
||||
finally
|
||||
writeln(11);
|
||||
end;
|
||||
raise Exception.create('xxx');
|
||||
writeln(2);
|
||||
except
|
||||
writeln(1);
|
||||
end;
|
||||
|
||||
writeln(2);
|
||||
writeln(2);
|
||||
writeln(2);
|
||||
|
@ -42,7 +42,9 @@ const
|
||||
*)
|
||||
BREAK_LINE_EXCEPT_1 = 20; // first except blog // may be 18 = at "except" keyword
|
||||
BREAK_LINE_EXCEPT_2 = 31; // 2nd except
|
||||
BREAK_LINE_EXCEPT_END = 38; // line for break at end
|
||||
BREAK_LINE_EXCEPT_3 = 45; // 3rd except not handled
|
||||
BREAK_LINE_EXCEPT_4 = 50; // 3rd except
|
||||
BREAK_LINE_EXCEPT_END = 54; // line for break at end
|
||||
|
||||
implementation
|
||||
|
||||
@ -265,6 +267,7 @@ begin
|
||||
(FCurLine <= BREAK_LINE_EXCEPT_1) and (FCurLine >= BREAK_LINE_EXCEPT_1 - 2));
|
||||
TestEquals(TstName+' (Stepped) Still Got 1 exception', 1, FGotExceptCount);
|
||||
|
||||
|
||||
dbg.Run;
|
||||
TestEquals(TstName+' Got 2 exception', 2, FGotExceptCount);
|
||||
|
||||
@ -273,9 +276,24 @@ begin
|
||||
(FCurLine <= BREAK_LINE_EXCEPT_2) and (FCurLine >= BREAK_LINE_EXCEPT_2 - 2));
|
||||
TestEquals(TstName+' (Stepped 2) Still Got 2 exception', 2, FGotExceptCount);
|
||||
|
||||
|
||||
dbg.Run;
|
||||
TestEquals(TstName+' Got 3 exception', 3, FGotExceptCount);
|
||||
|
||||
dbg.StepOver;
|
||||
TestTrue(TstName+' (Stepped 2) at break '+IntToStr(FCurLine),
|
||||
(FCurLine <= BREAK_LINE_EXCEPT_3) and (FCurLine >= BREAK_LINE_EXCEPT_3 - 2));
|
||||
TestEquals(TstName+' (Stepped 3) Still Got 3 exception', 3, FGotExceptCount);
|
||||
|
||||
dbg.StepOver;
|
||||
TestTrue(TstName+' (Stepped 4) at break '+IntToStr(FCurLine),
|
||||
(FCurLine <= BREAK_LINE_EXCEPT_4) and (FCurLine >= BREAK_LINE_EXCEPT_4 - 2));
|
||||
TestEquals(TstName+' (Stepped 4) Still Got 3 exception', 3, FGotExceptCount);
|
||||
|
||||
|
||||
dbg.Run; // run to break (tmp break cleared)
|
||||
TestEquals(TstName+' at break', BREAK_LINE_EXCEPT_END, FCurLine);
|
||||
TestEquals(TstName+' Still Got 2 exception', 2, FGotExceptCount);
|
||||
TestEquals(TstName+' Still Got 3 exception', 3, FGotExceptCount);
|
||||
|
||||
dbg.Stop;
|
||||
finally
|
||||
|
Loading…
Reference in New Issue
Block a user