|
@@ -109,6 +109,7 @@ type
|
|
Procedure TestProperties;
|
|
Procedure TestProperties;
|
|
Procedure TestDeclaredMethods;
|
|
Procedure TestDeclaredMethods;
|
|
Procedure TestMethods;
|
|
Procedure TestMethods;
|
|
|
|
+ Procedure TestMethodByAddress;
|
|
Procedure TestMethodsInherited;
|
|
Procedure TestMethodsInherited;
|
|
Procedure TestPrivateFieldAttributes;
|
|
Procedure TestPrivateFieldAttributes;
|
|
Procedure TestProtectedFieldAttributes;
|
|
Procedure TestProtectedFieldAttributes;
|
|
@@ -1822,6 +1823,20 @@ begin
|
|
CheckMethod('Full declared',1, A[0],'PublicAdditionalMethod',mvPublic);
|
|
CheckMethod('Full declared',1, A[0],'PublicAdditionalMethod',mvPublic);
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
+procedure TTestClassExtendedRTTI.TestMethodByAddress;
|
|
|
|
+
|
|
|
|
+var
|
|
|
|
+ Obj : TRttiObject;
|
|
|
|
+ RttiData : TRttiInstanceType absolute obj;
|
|
|
|
+ M1,M2 : TRttiMethod;
|
|
|
|
+begin
|
|
|
|
+ Obj:=FCtx.GetType(TAdditionalMethodClassRTTI.ClassInfo);
|
|
|
|
+ M1:=RttiData.GetMethod('PublicAdditionalMethod');
|
|
|
|
+ AssertNotNull('have method',m1);
|
|
|
|
+ M2:=RttiData.GetMethod(@TAdditionalMethodClassRTTI.PublicAdditionalMethod);
|
|
|
|
+ AssertSame('Correct method ',M1,M2);
|
|
|
|
+end;
|
|
|
|
+
|
|
procedure TTestClassExtendedRTTI.TestMethodsInherited;
|
|
procedure TTestClassExtendedRTTI.TestMethodsInherited;
|
|
Var
|
|
Var
|
|
A : TRttiMethodArray;
|
|
A : TRttiMethodArray;
|