FpDebugger: updated tests

git-svn-id: trunk@64021 -
This commit is contained in:
martin 2020-10-15 18:38:18 +00:00
parent 6156b1bf31
commit 569ea0aeb7
2 changed files with 22 additions and 4 deletions

View File

@ -5,10 +5,9 @@ unit TestBreakPoint;
interface interface
uses uses
Classes, SysUtils, math, Classes, SysUtils, math, TestDbgControl, TestDbgTestSuites,
TestDbgControl, TestDbgTestSuites, TTestWatchUtilities, TestCommonSources, TestDbgConfig, TTestDebuggerClasses,
TTestWatchUtilities, TestCommonSources, TestDbgConfig, DbgIntfDebuggerBase, DbgIntfDebuggerBase, DbgIntfBaseTypes, LazLoggerBase, Forms;
DbgIntfBaseTypes, LazLoggerBase, Forms;
type type
@ -306,6 +305,15 @@ begin
(* Initialize (* Initialize
Find all threads Find all threads
*) *)
dbg.Threads.CurrentThreads.Count;
j := 0;
while TTestThreads(dbg.Threads.CurrentThreads).DataValidity <> ddsValid do begin
sleep(50);
Application.ProcessMessages;
inc(j);
if j > 100 then break;
end;
j := 0; j := 0;
for i := 0 to dbg.Threads.CurrentThreads.Count-1 do begin for i := 0 to dbg.Threads.CurrentThreads.Count-1 do begin
t := dbg.Threads.CurrentThreads.Entries[i]; t := dbg.Threads.CurrentThreads.Entries[i];
@ -339,6 +347,15 @@ var
r: TRegisters; r: TRegisters;
ax, bx: TRegisterValue; ax, bx: TRegisterValue;
begin begin
dbg.Threads.CurrentThreads.Count;
j := 0;
while TTestThreads(dbg.Threads.CurrentThreads).DataValidity <> ddsValid do begin
sleep(50);
Application.ProcessMessages;
inc(j);
if j > 100 then break;
end;
for i := -1 to Min(9, dbg.Threads.CurrentThreads.Count-1) do begin for i := -1 to Min(9, dbg.Threads.CurrentThreads.Count-1) do begin
t := dbg.Threads.CurrentThreads.EntryById[FThrPrgInfo.Threads[i].ID]; t := dbg.Threads.CurrentThreads.EntryById[FThrPrgInfo.Threads[i].ID];
TestTrue(ATestName+' thread for '+inttostr(FThrPrgInfo.Threads[i].ID), t<> nil); TestTrue(ATestName+' thread for '+inttostr(FThrPrgInfo.Threads[i].ID), t<> nil);

View File

@ -62,6 +62,7 @@ type
function Count: Integer; override; function Count: Integer; override;
procedure Clear; override; procedure Clear; override;
procedure SetValidity(AValidity: TDebuggerDataState); override; procedure SetValidity(AValidity: TDebuggerDataState); override;
property DataValidity: TDebuggerDataState read FDataValidity;
end; end;
{ TTestThreadsMonitor } { TTestThreadsMonitor }