mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-22 03:19:48 +02:00
LazDebuggerFp: test, change testcase to use Test* instead of Assert* => so it will write logs
(cherry picked from commit 95a133b379
)
This commit is contained in:
parent
985f917ee1
commit
c891537cc0
@ -139,11 +139,11 @@ var
|
|||||||
if ExpFoundLine = -1 then ExpFoundLine := ALine;
|
if ExpFoundLine = -1 then ExpFoundLine := ALine;
|
||||||
r := Ctrl.CurrentProcess.DbgInfo.GetLineAddresses('StepOverPrg.pas',
|
r := Ctrl.CurrentProcess.DbgInfo.GetLineAddresses('StepOverPrg.pas',
|
||||||
ALine, ResLst, AFindSibling, @FndLine, @FndFile, AMaxAfter);
|
ALine, ResLst, AFindSibling, @FndLine, @FndFile, AMaxAfter);
|
||||||
AssertTrue(AName, r);
|
TestTrue(AName, r);
|
||||||
AssertTrue(AName, FndFile);
|
TestTrue(AName, FndFile);
|
||||||
AssertEquals(AName, ExpFoundLine, FndLine);
|
TestEquals(AName, ExpFoundLine, FndLine);
|
||||||
AssertTrue(AName, Length(ResLst) > 0);
|
TestTrue(AName, Length(ResLst) > 0);
|
||||||
AssertTrue(AName, ResLst[0] <> 0);
|
TestTrue(AName, ResLst[0] <> 0);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TestLineNotFound(ALine: Cardinal; AFindSibling: TGetLineAddrFindSibling;
|
procedure TestLineNotFound(ALine: Cardinal; AFindSibling: TGetLineAddrFindSibling;
|
||||||
@ -157,7 +157,7 @@ var
|
|||||||
AName := 'Found '+IntToStr(ALine);
|
AName := 'Found '+IntToStr(ALine);
|
||||||
r := Ctrl.CurrentProcess.DbgInfo.GetLineAddresses('StepOverPrg.pas',
|
r := Ctrl.CurrentProcess.DbgInfo.GetLineAddresses('StepOverPrg.pas',
|
||||||
ALine, ResLst, AFindSibling, @FndLine, @FndFile, AMaxAfter);
|
ALine, ResLst, AFindSibling, @FndLine, @FndFile, AMaxAfter);
|
||||||
AssertFalse(AName, r);
|
TestFalse(AName, r);
|
||||||
//AssertTrue(AName, FndFile);
|
//AssertTrue(AName, FndFile);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -259,10 +259,12 @@ begin
|
|||||||
|
|
||||||
dbg.Stop;
|
dbg.Stop;
|
||||||
finally
|
finally
|
||||||
Debugger.ClearDebuggerMonitors;
|
try
|
||||||
Debugger.FreeDebugger;
|
Debugger.ClearDebuggerMonitors;
|
||||||
|
Debugger.FreeDebugger;
|
||||||
AssertTestErrors;
|
finally
|
||||||
|
AssertTestErrors;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -278,7 +280,7 @@ begin
|
|||||||
Src := GetCommonSourceFor(AppDir + 'BreakPointPrg.pas');
|
Src := GetCommonSourceFor(AppDir + 'BreakPointPrg.pas');
|
||||||
TestCompile(Src, ExeName);
|
TestCompile(Src, ExeName);
|
||||||
|
|
||||||
AssertTrue('Start debugger', Debugger.StartDebugger(AppDir, ExeName));
|
TestTrue('Start debugger', Debugger.StartDebugger(AppDir, ExeName));
|
||||||
dbg := Debugger.LazDebugger;
|
dbg := Debugger.LazDebugger;
|
||||||
|
|
||||||
try
|
try
|
||||||
|
Loading…
Reference in New Issue
Block a user