diff --git a/PowerEditor/Test/FunctionList/pascal/unitTest b/PowerEditor/Test/FunctionList/pascal/unitTest index af90bbae7..fcd5d9330 100644 --- a/PowerEditor/Test/FunctionList/pascal/unitTest +++ b/PowerEditor/Test/FunctionList/pascal/unitTest @@ -7,11 +7,6 @@ uses System.SysUtils, System.Types, System.Classes; -// ATTENTION!!! This is a known issue! -// The following function should NOT be part of the function list tree. -// However, it is still included because of the TYPE keyword after its declaration. -// Global functions or procedures should therefor be declared immediately before -// the keyword IMPLEMENTATION. function FreeFunc(const Param: integer): integer; @@ -131,13 +126,25 @@ type class function FromString(const AString: string): TStdClass; static; end; - + // ----------------------------------------------------------------------------- // Free routines // ----------------------------------------------------------------------------- -function FreeFunc2(const Param: integer): integer; +function FreeFunc2(const Param: integer): integer; + +procedure Foo(AParam: integer); +function Bar(const AParam: string): integer; + +{function Unused1(ANum: double): cardinal;} + +procedure Boo(AParam: integer); + +(* +function Unused2(ANum: double): cardinal; +function Unused3(ANum: double): cardinal; +*) @@ -165,6 +172,46 @@ end; +{ Free function Foo } + +procedure Foo(AParam: integer); +begin + // Do something +end; + + + +{ Free function Bar } + +function Bar(const AParam: string): integer; +begin + // Do something + + Result := 0; +end; + + + +{ Free function Test } +function Test(Tnum: Double): DWord; +begin + // Do something + + Result := 0; +end; + + + +{ Free function Boo } +procedure Boo(AParam: integer); +begin + // Do something + + Result := 0; +end; + + + { Free function 4 } procedure FreeFunc4(const Param: integer); forward; @@ -416,10 +463,10 @@ class function TEnumHelper.FromString(const AString: string): TEnum; begin if SameText(AString, 'Member 2') then Result := enMember2 - + if SameText(AString, 'Member 3') then Result := enMember3 - + else Result := enMember1; end; diff --git a/PowerEditor/Test/FunctionList/pascal/unitTest.expected.result b/PowerEditor/Test/FunctionList/pascal/unitTest.expected.result index 74202abc3..be0c6f38d 100644 --- a/PowerEditor/Test/FunctionList/pascal/unitTest.expected.result +++ b/PowerEditor/Test/FunctionList/pascal/unitTest.expected.result @@ -1 +1 @@ -{"leaves":["FreeFunc","FreeFunc","FreeFunc2","FreeFunc2Internal","FreeFunc3","FreeFunc3Internal","FreeFunc4","FreeFunc4Internal","FreeFunc5","FreeFunc5Internal","InitStdInternalClass","ReInitStdInternalClass"],"nodes":[{"leaves":["Create","Destroy","Init","DeInit","SetValue","Convert"],"name":"TStdClass"},{"leaves":["Create","Destroy","CopyTo"],"name":"TStdClass.TStdInternalClass"},{"leaves":["Create","Destroy","Init","DeInit","SetValue"],"name":"TGenericClass"},{"leaves":["Create","Destroy","CopyTo"],"name":"TGenericClass.TGenericInternalClass"},{"leaves":["ToString","FromString"],"name":"TEnumHelper"},{"leaves":["AsString","FromString"],"name":"TStdClassHelper"}],"root":"unitTest"} \ No newline at end of file +{"leaves":["FreeFunc","Foo","Bar","Test","Boo","FreeFunc2","FreeFunc2Internal","FreeFunc3","FreeFunc3Internal","FreeFunc4","FreeFunc4Internal","FreeFunc5","FreeFunc5Internal","InitStdInternalClass","ReInitStdInternalClass"],"nodes":[{"leaves":["Create","Destroy","Init","DeInit","SetValue","Convert"],"name":"TStdClass"},{"leaves":["Create","Destroy","CopyTo"],"name":"TStdClass.TStdInternalClass"},{"leaves":["Create","Destroy","Init","DeInit","SetValue"],"name":"TGenericClass"},{"leaves":["Create","Destroy","CopyTo"],"name":"TGenericClass.TGenericInternalClass"},{"leaves":["ToString","FromString"],"name":"TEnumHelper"},{"leaves":["AsString","FromString"],"name":"TStdClassHelper"}],"root":"unitTest"} diff --git a/PowerEditor/installer/functionList/pascal.xml b/PowerEditor/installer/functionList/pascal.xml index e2719c132..9314c0251 100644 --- a/PowerEditor/installer/functionList/pascal.xml +++ b/PowerEditor/installer/functionList/pascal.xml @@ -10,6 +10,8 @@ + + @@ -158,4 +154,4 @@ - \ No newline at end of file +