@@ -49,6 +49,7 @@ TTestRttiAccess = class
49
49
ObjectField: TObject;
50
50
RecordField: TTestRecord;
51
51
InterfaceField: ITestInterface;
52
+ ClassRef: TClass;
52
53
function GetData : TObject;
53
54
procedure BuyFruits (AFruits: TFruits);
54
55
procedure SellFruits (const AFruits: TFruitDynArray);
@@ -61,6 +62,7 @@ TTestRttiAccess = class
61
62
function SetStringField (const Value : string): string; overload;
62
63
procedure PassVariantArray (const Value : Variant);
63
64
function ClassRefParam (ClassRef: TPersistentClass): string;
65
+ class var ClassField: string;
64
66
class function DoubleString (S: string): string;
65
67
class function Square (I: Integer): Integer; static;
66
68
end ;
@@ -133,6 +135,8 @@ TTestWrapDelphi = class(TObject)
133
135
[Test]
134
136
procedure TestClassRefParam ;
135
137
[Test]
138
+ procedure TestClassRefField ;
139
+ [Test]
136
140
procedure TestInheritance ;
137
141
[Test]
138
142
procedure TestClassMethods ;
@@ -248,6 +252,12 @@ procedure TTestWrapDelphi.TestClassMethods;
248
252
Assert.AreEqual<string>(MainModule.TestSubclass.DoubleString(' B' ), ' BB' );
249
253
end ;
250
254
255
+ procedure TTestWrapDelphi.TestClassRefField ;
256
+ begin
257
+ Rtti_Var.ClassRef := MainModule.TestRttiAccess;
258
+ Assert.AreEqual(TestRttiAccess.ClassRef, TTestRttiAccess);
259
+ end ;
260
+
251
261
procedure TTestWrapDelphi.TestClassRefParam ;
252
262
begin
253
263
Assert.AreEqual<string>(Rtti_Var.ClassRefParam(MainModule.Collection), ' TCollection' );
0 commit comments