From 6b45533e05368760733b8ebc5badf3bdf5b6a9c5 Mon Sep 17 00:00:00 2001 From: martin Date: Thu, 3 Oct 2019 18:38:14 +0000 Subject: [PATCH] FpDebug: tests (enum member) git-svn-id: trunk@61970 - --- .../lazdebuggers/lazdebuggerfp/test/testwatches.pas | 10 +++++++++- .../lazdebugtestbase/testapps/WatchesValuePrgIdent.inc | 4 ++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/components/lazdebuggers/lazdebuggerfp/test/testwatches.pas b/components/lazdebuggers/lazdebuggerfp/test/testwatches.pas index fe0939f679..4bd35c50e6 100644 --- a/components/lazdebuggers/lazdebuggerfp/test/testwatches.pas +++ b/components/lazdebuggers/lazdebuggerfp/test/testwatches.pas @@ -926,6 +926,8 @@ for i := StartIdx to t.Count-1 do t.Add(AName, p+'Enum2'+e, weEnum('EnVal21', 'TEnum2')); t.Add(AName, p+'Enum3'+e, weEnum('EnVal25', 'TEnum2')); +// t.Add(AName, 'EnVal2', weMatch('xxx', skEnumValue)); + t.Add(AName, p+'Set'+e, weSet(['EnVal2', 'EnVal4'], 'TSet')).Skip([stDwarf]); t.Add(AName, p+'IntfUnknown1'+e, weMatch('.?', skInterface)) //.Skip(); // only run eval / do not crash @@ -965,7 +967,7 @@ begin t := TWatchExpectationList.Create(Self); t.AcceptSkSimple := [skInteger, skCardinal, skBoolean, skChar, skFloat, skString, skAnsiString, skCurrency, skVariant, skWideString, - skInterface]; + skInterface, skEnumValue]; t.AddTypeNameAlias('integer', 'integer|longint'); t.AddTypeNameAlias('ShortStr255', 'ShortStr255|ShortString'); t.AddTypeNameAlias('TEnumSub', 'TEnum|TEnumSub'); @@ -1025,6 +1027,12 @@ begin t.Add('TMYSTRINGLIST(TMyClass(MyClass1).FMyStringList).FLIST^[0]', weMatch('FString', skRecord) ).IgnTypeName(); t.Add('TMYSTRINGLIST(TMyClass(MyClass2).FMyStringList).FLIST^[0]', weMatch('FString', skRecord) ).IgnTypeName(); + t.Add('EnVal1', 'EnVal1', weMatch('EnVal1 *:?= *0', skEnumValue)); + t.Add('EnVal2', 'EnVal2', weMatch('EnVal2 *:?= *1', skEnumValue)); + t.Add('EnVal3', 'EnVal3', weMatch('EnVal3 *:?= *2', skEnumValue)); + t.Add('EnVal21', 'EnVal21', weMatch('EnVal21 *:?= *3', skEnumValue)); + t.Add('EnVal23', 'EnVal23', weMatch('EnVal23 *:?= *7', skEnumValue)); + AddWatches(t, 'glob const', 'gc', 000, 'A', tlConst); AddWatches(t, 'glob var', 'gv', 001, 'B'); AddWatches(t, 'glob var (@)^', '(@gv', 001, 'B', tlAny, ')^'); diff --git a/components/lazdebuggers/lazdebugtestbase/testapps/WatchesValuePrgIdent.inc b/components/lazdebuggers/lazdebugtestbase/testapps/WatchesValuePrgIdent.inc index 54e4858a57..58e69895d5 100644 --- a/components/lazdebuggers/lazdebugtestbase/testapps/WatchesValuePrgIdent.inc +++ b/components/lazdebuggers/lazdebugtestbase/testapps/WatchesValuePrgIdent.inc @@ -464,9 +464,13 @@ // short bool .... // interface / object vs class / record // array dyn/stat / nested of record/class/char/num ... bitpacked +// array [ enum ] +// type = array [ enum ] // class of // class/record helper // type +// b = 1..5; c = set of b; // set of subrange + // pointer / deref for all above