mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 07:36:14 +02:00
LazDebuggerFp: more tests
git-svn-id: trunk@59688 -
This commit is contained in:
parent
34803af734
commit
56745aed40
@ -137,7 +137,7 @@ initialization
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
ConfDir := AppDir;
|
ConfDir := AppDir;
|
||||||
AppDir := AppendPathDelim(AppDir + 'TestApps');
|
AppDir := AppendPathDelim(AppDir + 'testapps');
|
||||||
|
|
||||||
if DirectoryExistsUTF8(ConfDir+'logs') then
|
if DirectoryExistsUTF8(ConfDir+'logs') then
|
||||||
TestControlSetLogPath(ConfDir+'logs'+DirectorySeparator)
|
TestControlSetLogPath(ConfDir+'logs'+DirectorySeparator)
|
||||||
|
@ -126,6 +126,16 @@ procedure TTestWatches.TestWatchesScope;
|
|||||||
t.Add(n + '; Hide, view MainChild', 'TObject(Self).Int_HideTest_Class' , 0, f)^.AddFlag([ehExpectNotFound]);
|
t.Add(n + '; Hide, view MainChild', 'TObject(Self).Int_HideTest_Class' , 0, f)^.AddFlag([ehExpectNotFound]);
|
||||||
|
|
||||||
t.Add(n + '; Hide, view MainChild', 'Int_HideTest_Unit' , 3010, f);
|
t.Add(n + '; Hide, view MainChild', 'Int_HideTest_Unit' , 3010, f);
|
||||||
|
|
||||||
|
t.Add(n, 'TMethodMainChildNestedTwiceEnum(1)', weEnum('mmCNT2'), f);
|
||||||
|
t.Add(n, 'TMethodMainChildNestedEnum(1)', weEnum('mmCN2'), f);
|
||||||
|
t.Add(n, 'TMethodMainChildEnum(1)', weEnum('mmC2'), f);
|
||||||
|
t.Add(n, 'TMainEnum(1)', weEnum('mm2'), f);
|
||||||
|
t.Add(n, 'TMainBaseEnum(1)', weEnum('mmB2'), f);
|
||||||
|
t.Add(n, 'TMainGlobEnum(1)', weEnum('mmG2'), f);
|
||||||
|
|
||||||
|
t.Add(n, 'THideMainEnum(1)', weEnum('hmCNT2'), f);
|
||||||
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
n := AName + ' (Stack: MethodMainChildNested)';
|
n := AName + ' (Stack: MethodMainChildNested)';
|
||||||
@ -153,6 +163,15 @@ procedure TTestWatches.TestWatchesScope;
|
|||||||
|
|
||||||
t.Add(n + '; Hide, view MainChild', 'Int_HideTest_Class' , 3001, f);
|
t.Add(n + '; Hide, view MainChild', 'Int_HideTest_Class' , 3001, f);
|
||||||
t.Add(n + '; Hide, view MainChild', 'Int_HideTest_Unit' , 3010, f);
|
t.Add(n + '; Hide, view MainChild', 'Int_HideTest_Unit' , 3010, f);
|
||||||
|
|
||||||
|
t.Add(n, 'TMethodMainChildNestedTwiceEnum(1)', weEnum('mmCNT2'), f)^.AddFlag(ehExpectNotFound);
|
||||||
|
t.Add(n, 'TMethodMainChildNestedEnum(1)', weEnum('mmCN2'), f);
|
||||||
|
t.Add(n, 'TMethodMainChildEnum(1)', weEnum('mmC2'), f);
|
||||||
|
t.Add(n, 'TMainEnum(1)', weEnum('mm2'), f);
|
||||||
|
t.Add(n, 'TMainBaseEnum(1)', weEnum('mmB2'), f);
|
||||||
|
t.Add(n, 'TMainGlobEnum(1)', weEnum('mmG2'), f);
|
||||||
|
|
||||||
|
t.Add(n, 'THideMainEnum(1)', weEnum('hmCN2'), f);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
n := AName + ' (Stack: MethodMainChild)';
|
n := AName + ' (Stack: MethodMainChild)';
|
||||||
@ -180,6 +199,15 @@ procedure TTestWatches.TestWatchesScope;
|
|||||||
|
|
||||||
t.Add(n + '; Hide, view MainChild', 'Int_HideTest_Class' , 3001, f);
|
t.Add(n + '; Hide, view MainChild', 'Int_HideTest_Class' , 3001, f);
|
||||||
t.Add(n + '; Hide, view MainChild', 'Int_HideTest_Unit' , 3010, f);
|
t.Add(n + '; Hide, view MainChild', 'Int_HideTest_Unit' , 3010, f);
|
||||||
|
|
||||||
|
t.Add(n, 'TMethodMainChildNestedTwiceEnum(1)', weEnum('mmCNT2'), f)^.AddFlag(ehExpectNotFound);
|
||||||
|
t.Add(n, 'TMethodMainChildNestedEnum(1)', weEnum('mmCN2'), f)^.AddFlag(ehExpectNotFound);
|
||||||
|
t.Add(n, 'TMethodMainChildEnum(1)', weEnum('mmC2'), f);
|
||||||
|
t.Add(n, 'TMainEnum(1)', weEnum('mm2'), f);
|
||||||
|
t.Add(n, 'TMainBaseEnum(1)', weEnum('mmB2'), f);
|
||||||
|
t.Add(n, 'TMainGlobEnum(1)', weEnum('mmG2'), f);
|
||||||
|
|
||||||
|
t.Add(n, 'THideMainEnum(1)', weEnum('hmC2'), f);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
n := AName + ' (Stack: MethodMain)';
|
n := AName + ' (Stack: MethodMain)';
|
||||||
@ -206,6 +234,15 @@ procedure TTestWatches.TestWatchesScope;
|
|||||||
t.Add(n, 'Int_GlobalUnit2' , 202, f);
|
t.Add(n, 'Int_GlobalUnit2' , 202, f);
|
||||||
|
|
||||||
t.Add(n + ', Hide, view glob Prg', 'Int_HideTest_Class' , 3000, f)^.AddFlag([ehExpectNotFound, ehNotImplemented]);
|
t.Add(n + ', Hide, view glob Prg', 'Int_HideTest_Class' , 3000, f)^.AddFlag([ehExpectNotFound, ehNotImplemented]);
|
||||||
|
|
||||||
|
t.Add(n, 'TMethodMainChildNestedTwiceEnum(1)', weEnum('mmCNT2'), f)^.AddFlag(ehExpectNotFound);
|
||||||
|
t.Add(n, 'TMethodMainChildNestedEnum(1)', weEnum('mmCN2'), f)^.AddFlag(ehExpectNotFound);
|
||||||
|
t.Add(n, 'TMethodMainChildEnum(1)', weEnum('mmC2'), f)^.AddFlag(ehExpectNotFound);
|
||||||
|
t.Add(n, 'TMainEnum(1)', weEnum('mm2'), f);
|
||||||
|
t.Add(n, 'TMainBaseEnum(1)', weEnum('mmB2'), f);
|
||||||
|
t.Add(n, 'TMainGlobEnum(1)', weEnum('mmG2'), f);
|
||||||
|
|
||||||
|
t.Add(n, 'THideMainEnum(1)', weEnum('hmB2'), f)^.AddFlag(ehNotImplementedData);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
n := AName + ' (Stack: MethodMainBase)';
|
n := AName + ' (Stack: MethodMainBase)';
|
||||||
@ -270,6 +307,15 @@ procedure TTestWatches.TestWatchesScope;
|
|||||||
|
|
||||||
t.Add(n + '; Hide, view MainChild', 'Int_HideTest_Class' , 1001, f);
|
t.Add(n + '; Hide, view MainChild', 'Int_HideTest_Class' , 1001, f);
|
||||||
t.Add(n + '; Hide, view MainChild', 'Int_HideTest_Unit' , 1010, f);
|
t.Add(n + '; Hide, view MainChild', 'Int_HideTest_Unit' , 1010, f);
|
||||||
|
|
||||||
|
t.Add(n, 'TMethodMainChildNestedTwiceEnum(1)', weEnum('mmCNT2'), f)^.AddFlag(ehExpectNotFound);
|
||||||
|
t.Add(n, 'TMethodMainChildNestedEnum(1)', weEnum('mmCN2'), f)^.AddFlag(ehExpectNotFound);
|
||||||
|
t.Add(n, 'TMethodMainChildEnum(1)', weEnum('mmC2'), f)^.AddFlag(ehExpectNotFound);
|
||||||
|
t.Add(n, 'TMainEnum(1)', weEnum('mm2'), f)^.AddFlag([ehExpectNotFound, ehNotImplemented]); // found in other unit
|
||||||
|
t.Add(n, 'TMainBaseEnum(1)', weEnum('mmB2'), f);
|
||||||
|
t.Add(n, 'TMainGlobEnum(1)', weEnum('mmG2'), f)^.AddFlag([ehExpectNotFound, ehNotImplemented]);
|
||||||
|
|
||||||
|
t.Add(n, 'THideMainEnum(1)', weEnum('hmB2'), f); // found via unit / but otherwise ehNotImplemented;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
n := AName + ' (Stack: MethodMainBaseBase)';
|
n := AName + ' (Stack: MethodMainBaseBase)';
|
||||||
@ -297,6 +343,15 @@ procedure TTestWatches.TestWatchesScope;
|
|||||||
|
|
||||||
t.Add(n + '; Hide, view MainChild', 'Int_HideTest_Class' , 2001, f);
|
t.Add(n + '; Hide, view MainChild', 'Int_HideTest_Class' , 2001, f);
|
||||||
t.Add(n + '; Hide, view MainChild', 'Int_HideTest_Unit' , 2010, f);
|
t.Add(n + '; Hide, view MainChild', 'Int_HideTest_Unit' , 2010, f);
|
||||||
|
|
||||||
|
t.Add(n, 'TMethodMainChildNestedTwiceEnum(1)', weEnum('mmCNT2'), f)^.AddFlag(ehExpectNotFound);
|
||||||
|
t.Add(n, 'TMethodMainChildNestedEnum(1)', weEnum('mmCN2'), f)^.AddFlag(ehExpectNotFound);
|
||||||
|
t.Add(n, 'TMethodMainChildEnum(1)', weEnum('mmC2'), f)^.AddFlag(ehExpectNotFound);
|
||||||
|
t.Add(n, 'TMainEnum(1)', weEnum('mm2'), f)^.AddFlag([ehExpectNotFound, ehNotImplemented]); // found in other unit
|
||||||
|
t.Add(n, 'TMainBaseEnum(1)', weEnum('mmB2'), f)^.AddFlag([ehExpectNotFound, ehNotImplemented]); // found in other unit
|
||||||
|
t.Add(n, 'TMainGlobEnum(1)', weEnum('mmG2'), f)^.AddFlag([ehExpectNotFound, ehNotImplemented]);
|
||||||
|
|
||||||
|
t.Add(n, 'THideMainEnum(1)', weEnum('x'), f)^.AddFlag([ehExpectNotFound, ehNotImplemented]); // will find main unit
|
||||||
end;
|
end;
|
||||||
|
|
||||||
n := AName + ' (Stack: main)';
|
n := AName + ' (Stack: main)';
|
||||||
@ -324,6 +379,15 @@ procedure TTestWatches.TestWatchesScope;
|
|||||||
|
|
||||||
t.Add(n + '; Hide, view MainChild', 'Int_HideTest_Class' , 3000, f);
|
t.Add(n + '; Hide, view MainChild', 'Int_HideTest_Class' , 3000, f);
|
||||||
t.Add(n + '; Hide, view MainChild', 'Int_HideTest_Unit' , 3010, f);
|
t.Add(n + '; Hide, view MainChild', 'Int_HideTest_Unit' , 3010, f);
|
||||||
|
|
||||||
|
t.Add(n, 'TMethodMainChildNestedTwiceEnum(1)', weEnum('mmCNT2'), f)^.AddFlag(ehExpectNotFound);
|
||||||
|
t.Add(n, 'TMethodMainChildNestedEnum(1)', weEnum('mmCN2'), f)^.AddFlag(ehExpectNotFound);
|
||||||
|
t.Add(n, 'TMethodMainChildEnum(1)', weEnum('mmC2'), f)^.AddFlag(ehExpectNotFound);
|
||||||
|
t.Add(n, 'TMainEnum(1)', weEnum('mm2'), f)^.AddFlag([ehExpectNotFound, ehNotImplemented]); // found in unit scope
|
||||||
|
t.Add(n, 'TMainBaseEnum(1)', weEnum('mmB2'), f)^.AddFlag([ehExpectNotFound, ehNotImplemented]); // found in unit scope
|
||||||
|
t.Add(n, 'TMainGlobEnum(1)', weEnum('mmG2'), f);
|
||||||
|
|
||||||
|
t.Add(n, 'THideMainEnum(1)', weEnum('hmG2'), f)^.AddFlag([ehNotImplementedData]); // may find the class scope
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -403,9 +467,12 @@ begin
|
|||||||
Debugger.SetBreakPoint(Src, 'MethodMain');
|
Debugger.SetBreakPoint(Src, 'MethodMain');
|
||||||
Debugger.SetBreakPoint(Src, 'WatchesScopeUnit1.pas', 'MethodMainBase');
|
Debugger.SetBreakPoint(Src, 'WatchesScopeUnit1.pas', 'MethodMainBase');
|
||||||
Debugger.SetBreakPoint(Src, 'WatchesScopeUnit2.pas', 'MethodMainBaseBase');
|
Debugger.SetBreakPoint(Src, 'WatchesScopeUnit2.pas', 'MethodMainBaseBase');
|
||||||
|
|
||||||
Debugger.SetBreakPoint(Src, 'Prg');
|
Debugger.SetBreakPoint(Src, 'Prg');
|
||||||
AssertDebuggerNotInErrorState;
|
AssertDebuggerNotInErrorState;
|
||||||
|
|
||||||
|
(* ************ Nested Functions ************* *)
|
||||||
|
|
||||||
dbg.Run;
|
dbg.Run;
|
||||||
Debugger.WaitForFinishRun();
|
Debugger.WaitForFinishRun();
|
||||||
AssertDebuggerState(dsPause);
|
AssertDebuggerState(dsPause);
|
||||||
@ -438,28 +505,7 @@ begin
|
|||||||
t.EvaluateWatches;
|
t.EvaluateWatches;
|
||||||
t.CheckResults;
|
t.CheckResults;
|
||||||
|
|
||||||
(*
|
(* ************ Class ************* *)
|
||||||
|
|
||||||
|
|
||||||
t.Add('TestEnum', weEnum('te3', 'TTestEnum'));
|
|
||||||
t.Add('TTestEnum(x)', weEnum('te2', 'TTestEnum'));
|
|
||||||
t.Add('TTestEnum(y)', weEnum('te1', 'TTestEnum'));
|
|
||||||
t.Add('TTestEnum(1)', weEnum('te1', 'TTestEnum'));
|
|
||||||
|
|
||||||
t.Add('Integer', weEnum('XX', '')); // TODO
|
|
||||||
t.Add('TTestEnum', weEnum('TTestEnum = (te1, te2, te3)', '')); // TODO
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
t.Add('TestEnum', weEnum('te3', 'TTestEnum'));
|
|
||||||
t.Add('TTestEnum(x)', weEnum('te2', 'TTestEnum'));
|
|
||||||
t.Add('TTestEnum(y)', weEnum('te1', 'TTestEnum'))^.AddFlag(ehExpectNotFound);
|
|
||||||
t.Add('TTestEnum(1)', weEnum('te1', 'TTestEnum'));
|
|
||||||
|
|
||||||
t.Add('Integer', weEnum('XX', '')); // TODO
|
|
||||||
t.Add('TTestEnum', weEnum('TTestEnum = (te1, te2, te3)', '')); // TODO
|
|
||||||
|
|
||||||
*)
|
|
||||||
|
|
||||||
dbg.Run;
|
dbg.Run;
|
||||||
Debugger.WaitForFinishRun(); // MethodMainChildNestedTwice
|
Debugger.WaitForFinishRun(); // MethodMainChildNestedTwice
|
||||||
@ -509,8 +555,10 @@ begin
|
|||||||
t.EvaluateWatches;
|
t.EvaluateWatches;
|
||||||
t.CheckResults;
|
t.CheckResults;
|
||||||
|
|
||||||
|
(* ************ Program level ************* *)
|
||||||
|
|
||||||
dbg.Run;
|
dbg.Run;
|
||||||
Debugger.WaitForFinishRun(); // MethodMainBaseBase
|
Debugger.WaitForFinishRun();
|
||||||
AssertDebuggerState(dsPause);
|
AssertDebuggerState(dsPause);
|
||||||
t.Clear;
|
t.Clear;
|
||||||
AddWatchesForClassMethods(t, 'Scope in Prg', 6);
|
AddWatchesForClassMethods(t, 'Scope in Prg', 6);
|
||||||
|
@ -1,4 +1,70 @@
|
|||||||
// TEST_USES=WatchesScopeUnit1.pas,WatchesScopeUnit2.pas
|
// TEST_USES=WatchesScopeUnit1.pas,WatchesScopeUnit2.pas
|
||||||
|
|
||||||
|
(* Test Purpose
|
||||||
|
- Access to variables/tyes in current and all outer scopes
|
||||||
|
(each scope has a variable with a different name)
|
||||||
|
- Choose variable of correct (most inner visible) scope
|
||||||
|
(all scopes have a variable of the same name)
|
||||||
|
- Global vars according to the unit of the current selected stackframe
|
||||||
|
- Missing: Global vars of other units, according to order in "uses"
|
||||||
|
*)
|
||||||
|
|
||||||
|
(* Calling order / Do not change / Insertation allowed
|
||||||
|
|
||||||
|
// Nested functions
|
||||||
|
|
||||||
|
>> function FuncFoo: integer;
|
||||||
|
>> function FuncFooNested: AnsiString;
|
||||||
|
>> function FuncFooNestedTwice: AnsiString;
|
||||||
|
* TEST_BREAKPOINT//=FuncFooNestedTwice
|
||||||
|
<<
|
||||||
|
|
||||||
|
>> function FuncFooNestedTwice2(Int_Hide_Foo: Integer): AnsiString;
|
||||||
|
* TEST_BREAKPOINT//=FuncFooNestedTwice2
|
||||||
|
<<
|
||||||
|
|
||||||
|
* TEST_BREAKPOINT//=FuncFooNested
|
||||||
|
<< function FuncFooNested: AnsiString;
|
||||||
|
|
||||||
|
* TEST_BREAKPOINT//=FuncFoo
|
||||||
|
<< function FuncFoo: integer;
|
||||||
|
|
||||||
|
// Class vs Base Class + Nested Function in method (nested function access to self)
|
||||||
|
TClassMainBaseBase = class() // In Unit2 // private section should not be visible
|
||||||
|
TClassMainBase = class(TClassMainBaseBase) // In Unit1 // private section should not be visible
|
||||||
|
TClassMain = class(TClassMainBase)
|
||||||
|
TClassMainChild = class(TClassMain)
|
||||||
|
|
||||||
|
|
||||||
|
>> procedure TClassMainBaseBase.MethodMainBaseBase;
|
||||||
|
>> procedure TClassMainBase.MethodMainBase;
|
||||||
|
>> procedure TClassMain.MethodMain;
|
||||||
|
|
||||||
|
>>>> class TClassMainChild
|
||||||
|
>> procedure TClassMainChild.MethodMainChild;
|
||||||
|
>> procedure MethodMainChildNested;
|
||||||
|
>> procedure MethodMainChildNestedTwice;
|
||||||
|
* TEST_BREAKPOINT//=MethodMainChildNestedTwice
|
||||||
|
<<
|
||||||
|
|
||||||
|
* TEST_BREAKPOINT//=MethodMainChildNested
|
||||||
|
<< procedure MethodMainChildNested;
|
||||||
|
|
||||||
|
* TEST_BREAKPOINT//=MethodMainChild
|
||||||
|
<< procedure TClassMainChild.MethodMainChild;
|
||||||
|
<<<< class TClassMainChild
|
||||||
|
|
||||||
|
* TEST_BREAKPOINT//=MethodMain
|
||||||
|
<< procedure TClassMain.MethodMain;
|
||||||
|
|
||||||
|
* TEST_BREAKPOINT//=MethodMainBase
|
||||||
|
<< procedure TClassMainBase.MethodMainBase;
|
||||||
|
|
||||||
|
* TEST_BREAKPOINT//=MethodMainBaseBase
|
||||||
|
<< procedure TClassMainBaseBase.MethodMainBaseBase;
|
||||||
|
|
||||||
|
*)
|
||||||
|
|
||||||
program WatchesPrg;
|
program WatchesPrg;
|
||||||
{$H-}
|
{$H-}
|
||||||
|
|
||||||
@ -17,6 +83,9 @@ type
|
|||||||
Int_TClassMain: Integer;
|
Int_TClassMain: Integer;
|
||||||
procedure MethodMain; override;
|
procedure MethodMain; override;
|
||||||
procedure MethodMainChild; virtual;
|
procedure MethodMainChild; virtual;
|
||||||
|
public
|
||||||
|
type
|
||||||
|
TMainEnum = (mm1, mm2);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TClassMainChild }
|
{ TClassMainChild }
|
||||||
@ -34,6 +103,9 @@ type
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
type
|
||||||
|
TMainGlobEnum = (mmG1, mmG2);
|
||||||
|
THideMainEnum = (hmG1, hmG2);
|
||||||
var
|
var
|
||||||
BreakDummy: Integer;
|
BreakDummy: Integer;
|
||||||
Int_GlobalPrg: Integer;
|
Int_GlobalPrg: Integer;
|
||||||
@ -43,24 +115,17 @@ var
|
|||||||
TestClassMainChild: TClassMainChild;
|
TestClassMainChild: TClassMainChild;
|
||||||
|
|
||||||
Int_Hide_Foo: Integer;
|
Int_Hide_Foo: Integer;
|
||||||
|
e1: TMainGlobEnum;
|
||||||
|
e2: THideMainEnum;
|
||||||
|
|
||||||
{ TClassMain }
|
{ TClassMain }
|
||||||
|
|
||||||
procedure TClassMain.MethodMain;
|
procedure TClassMain.MethodMain;
|
||||||
|
var
|
||||||
procedure MethodMainNested;
|
e1: TMainEnum;
|
||||||
var
|
|
||||||
IntMain: Integer;
|
|
||||||
|
|
||||||
procedure MethodMainNestedTwice;
|
|
||||||
var
|
|
||||||
IntMain: integer;
|
|
||||||
begin
|
|
||||||
end;
|
|
||||||
begin
|
|
||||||
end;
|
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
e1 := mm1;
|
||||||
|
|
||||||
MethodMainChild; // call inherited class
|
MethodMainChild; // call inherited class
|
||||||
BreakDummy := 1; // TEST_BREAKPOINT=MethodMain
|
BreakDummy := 1; // TEST_BREAKPOINT=MethodMain
|
||||||
end;
|
end;
|
||||||
@ -70,26 +135,42 @@ begin
|
|||||||
//
|
//
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
{ TClassMainChild }
|
{ TClassMainChild }
|
||||||
|
|
||||||
procedure TClassMainChild.MethodMainChild;
|
procedure TClassMainChild.MethodMainChild;
|
||||||
|
type
|
||||||
|
TMethodMainChildEnum = (mmC1, mmC2);
|
||||||
|
THideMainEnum = (hmC1, hmC2);
|
||||||
var
|
var
|
||||||
Int_MethodMainChild: Integer;
|
Int_MethodMainChild: Integer;
|
||||||
|
|
||||||
procedure MethodMainChildNested;
|
procedure MethodMainChildNested;
|
||||||
|
type
|
||||||
|
TMethodMainChildNestedEnum = (mmCN1, mmCN2);
|
||||||
|
THideMainEnum = (hmCN1, hmCN2);
|
||||||
var
|
var
|
||||||
Int_MethodMainChildNested: Integer;
|
Int_MethodMainChildNested: Integer;
|
||||||
|
e1: TMethodMainChildNestedEnum;
|
||||||
|
e2: THideMainEnum;
|
||||||
|
|
||||||
procedure MethodMainChildNestedTwice;
|
procedure MethodMainChildNestedTwice;
|
||||||
|
type
|
||||||
|
TMethodMainChildNestedTwiceEnum = (mmCNT1, mmCNT2);
|
||||||
|
THideMainEnum = (hmCNT1, hmCNT2);
|
||||||
var
|
var
|
||||||
Int_MethodMainChildNestedTwice: integer;
|
Int_MethodMainChildNestedTwice: integer;
|
||||||
|
e1: TMethodMainChildNestedTwiceEnum;
|
||||||
|
e2: THideMainEnum;
|
||||||
begin
|
begin
|
||||||
|
e1 := mmCNT1;
|
||||||
|
e2 := hmCNT1;
|
||||||
Int_MethodMainChildNestedTwice := 30;
|
Int_MethodMainChildNestedTwice := 30;
|
||||||
BreakDummy := 1; // TEST_BREAKPOINT=MethodMainChildNestedTwice
|
BreakDummy := 1; // TEST_BREAKPOINT=MethodMainChildNestedTwice
|
||||||
end;
|
end;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
e1 := mmCN1;
|
||||||
|
e2 := hmCN1;
|
||||||
Int_MethodMainChildNested := 40;
|
Int_MethodMainChildNested := 40;
|
||||||
MethodMainChildNestedTwice;
|
MethodMainChildNestedTwice;
|
||||||
BreakDummy := 1; // TEST_BREAKPOINT=MethodMainChildNested
|
BreakDummy := 1; // TEST_BREAKPOINT=MethodMainChildNested
|
||||||
@ -97,7 +178,11 @@ var
|
|||||||
|
|
||||||
var
|
var
|
||||||
Int_MethodMainChild_Late: integer;
|
Int_MethodMainChild_Late: integer;
|
||||||
|
e1: TMethodMainChildEnum;
|
||||||
|
e2: THideMainEnum;
|
||||||
begin
|
begin
|
||||||
|
e1 := mmC1;
|
||||||
|
e2 := hmC1;
|
||||||
Int_MethodMainChild := 50;
|
Int_MethodMainChild := 50;
|
||||||
Int_MethodMainChild_Late := 52;
|
Int_MethodMainChild_Late := 52;
|
||||||
Int_TClassMainChild := 70;
|
Int_TClassMainChild := 70;
|
||||||
@ -159,9 +244,12 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Unit1Init;
|
Unit1Init;
|
||||||
Unit2Init;
|
Unit2Init;
|
||||||
|
e1 := mmG1;
|
||||||
|
e2 := hmG1;
|
||||||
Int_GlobalUnit1 := 201;
|
Int_GlobalUnit1 := 201;
|
||||||
Int_GlobalUnit2 := 202;
|
Int_GlobalUnit2 := 202;
|
||||||
Int_GlobalPrg := 101;
|
Int_GlobalPrg := 101;
|
||||||
@ -173,6 +261,7 @@ begin
|
|||||||
FuncFoo;
|
FuncFoo;
|
||||||
|
|
||||||
TestClassMainChild := TClassMainChild.Create;
|
TestClassMainChild := TClassMainChild.Create;
|
||||||
|
|
||||||
// Call the deepest class first, and make the way up to each inherited class
|
// Call the deepest class first, and make the way up to each inherited class
|
||||||
TestClassMainChild.MethodMainBaseBase();
|
TestClassMainChild.MethodMainBaseBase();
|
||||||
|
|
||||||
|
@ -19,6 +19,10 @@ type
|
|||||||
Int_TClassMainBase: Integer;
|
Int_TClassMainBase: Integer;
|
||||||
procedure MethodMainBase; override;
|
procedure MethodMainBase; override;
|
||||||
procedure MethodMain; virtual;
|
procedure MethodMain; virtual;
|
||||||
|
private
|
||||||
|
type
|
||||||
|
TMainBaseEnum = (mmB1, mmB2);
|
||||||
|
THideMainEnum = (hmB1, hmB2);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure Unit1Init;
|
procedure Unit1Init;
|
||||||
@ -40,7 +44,13 @@ end;
|
|||||||
{ TClassMainBase }
|
{ TClassMainBase }
|
||||||
|
|
||||||
procedure TClassMainBase.MethodMainBase;
|
procedure TClassMainBase.MethodMainBase;
|
||||||
|
var
|
||||||
|
e1: TMainBaseEnum;
|
||||||
|
e2: THideMainEnum;
|
||||||
begin
|
begin
|
||||||
|
e1 := mmB1;
|
||||||
|
e2 := hmB1;
|
||||||
|
|
||||||
Int_TClassMainBase := 170;
|
Int_TClassMainBase := 170;
|
||||||
Int_TClassMainBase_Prot := 171;
|
Int_TClassMainBase_Prot := 171;
|
||||||
Int_TClassMainBase_Priv := 172;
|
Int_TClassMainBase_Priv := 172;
|
||||||
|
@ -78,7 +78,7 @@ var
|
|||||||
begin
|
begin
|
||||||
i := FBreakPoints.IndexOf(AName);
|
i := FBreakPoints.IndexOf(AName);
|
||||||
if (i < 0) or (FBreakPoints.Objects[i] = nil) then
|
if (i < 0) or (FBreakPoints.Objects[i] = nil) then
|
||||||
raise Exception.Create('Break unknown');
|
raise Exception.Create('Break unknown '+AName);
|
||||||
Result := Integer(PtrInt(FBreakPoints.Objects[i]));
|
Result := Integer(PtrInt(FBreakPoints.Objects[i]));
|
||||||
TestLogger.DebugLn(['Break: ',AName, ' ',Result]);
|
TestLogger.DebugLn(['Break: ',AName, ' ',Result]);
|
||||||
end;
|
end;
|
||||||
@ -172,7 +172,7 @@ begin
|
|||||||
if i > 0 then begin
|
if i > 0 then begin
|
||||||
i := i + 16;
|
i := i + 16;
|
||||||
if FBreakPoints.IndexOf(copy(FData[Line], i, MaxInt)) >= 0 then
|
if FBreakPoints.IndexOf(copy(FData[Line], i, MaxInt)) >= 0 then
|
||||||
raise Exception.Create('dup brkpoint name');
|
raise Exception.Create('dup brkpoint name in: '+FFileName+' '+IntToStr(Line));
|
||||||
FBreakPoints.AddObject(copy(FData[Line], i, MaxInt), TObject(Line + 1));
|
FBreakPoints.AddObject(copy(FData[Line], i, MaxInt), TObject(Line + 1));
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
@ -33,7 +33,10 @@ type
|
|||||||
ehExpectNotFound,
|
ehExpectNotFound,
|
||||||
ehExpectError, // watch is invalid (less specific, than not found / maybe invalid expression ?)
|
ehExpectError, // watch is invalid (less specific, than not found / maybe invalid expression ?)
|
||||||
|
|
||||||
ehNotImplemented // The debugger is known to fail this test // same as ehIgnAll
|
ehNotImplemented, // The debugger is known to fail this test // same as ehIgnAll
|
||||||
|
ehNotImplementedKind, // skSimple...
|
||||||
|
ehNotImplementedType, // typename
|
||||||
|
ehNotImplementedData
|
||||||
);
|
);
|
||||||
TWatchExpErrorHandlingFlags = set of TWatchExpErrorHandlingFlag;
|
TWatchExpErrorHandlingFlags = set of TWatchExpErrorHandlingFlag;
|
||||||
|
|
||||||
@ -450,6 +453,8 @@ begin
|
|||||||
|
|
||||||
if ehIgnData in ehf then
|
if ehIgnData in ehf then
|
||||||
AnIgnoreRsn := AnIgnoreRsn + 'Test ignored (Data)';
|
AnIgnoreRsn := AnIgnoreRsn + 'Test ignored (Data)';
|
||||||
|
if ehNotImplementedData in ehf then
|
||||||
|
AnIgnoreRsn := AnIgnoreRsn + 'Not implemented (Data)';
|
||||||
case TstExpected.ExpResultKind of
|
case TstExpected.ExpResultKind of
|
||||||
rkMatch: Result := CheckResultMatch(Context, AnIgnoreRsn);
|
rkMatch: Result := CheckResultMatch(Context, AnIgnoreRsn);
|
||||||
rkInteger: Result := CheckResultNum(Context, False, AnIgnoreRsn);
|
rkInteger: Result := CheckResultNum(Context, False, AnIgnoreRsn);
|
||||||
@ -502,6 +507,8 @@ begin
|
|||||||
else
|
else
|
||||||
if (ehIgnKindPtr in ehf) and (t = skPointer) then
|
if (ehIgnKindPtr in ehf) and (t = skPointer) then
|
||||||
AnIgnoreRsn := 'Ignored by flag (Kind may be Ptr)';
|
AnIgnoreRsn := 'Ignored by flag (Kind may be Ptr)';
|
||||||
|
if ehNotImplementedKind in ehf then
|
||||||
|
AnIgnoreRsn := AnIgnoreRsn + 'Not implemented (symkind)';
|
||||||
|
|
||||||
n := '';
|
n := '';
|
||||||
if (t = skSimple) and (Expect.ExpSymKind in AcceptSkSimple) then begin
|
if (t = skSimple) and (Expect.ExpSymKind in AcceptSkSimple) then begin
|
||||||
@ -533,6 +540,8 @@ begin
|
|||||||
ehf := Expect.ExpErrorHandlingFlags[Compiler.SymbolType];
|
ehf := Expect.ExpErrorHandlingFlags[Compiler.SymbolType];
|
||||||
if ehIgnTypeName in ehf then
|
if ehIgnTypeName in ehf then
|
||||||
AnIgnoreRsn := AnIgnoreRsn + 'Test ignored';
|
AnIgnoreRsn := AnIgnoreRsn + 'Test ignored';
|
||||||
|
if ehNotImplementedType in ehf then
|
||||||
|
AnIgnoreRsn := AnIgnoreRsn + 'Not implemented (typename)';
|
||||||
|
|
||||||
WtchTpName := AContext.WatchVal.TypeInfo.TypeName;
|
WtchTpName := AContext.WatchVal.TypeInfo.TypeName;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user