mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-10 20:30:23 +02:00
+ add checks with InstanceSize called by different methods
This commit is contained in:
parent
52e083a25d
commit
04ca39e630
@ -95,6 +95,12 @@ begin
|
||||
Writeln('Sizeof(cb)=',basesize);
|
||||
if basesize<>expected_size_for_tbaseclass then
|
||||
Writeln('not the expected size : ',expected_size_for_tbaseclass);
|
||||
Writeln('cb.InstanceSize=',Cb.InstanceSize);
|
||||
if cb.InstanceSize<>expected_size_for_tbaseclass then
|
||||
Writeln('not the expected size : ',expected_size_for_tbaseclass);
|
||||
Writeln('Tbaseclass.InstanceSize=',Tbaseclass.InstanceSize);
|
||||
if TBaseClass.InstanceSize<>expected_size_for_tbaseclass then
|
||||
Writeln('not the expected size : ',expected_size_for_tbaseclass);
|
||||
|
||||
derivedsize:=sizeof(cd);
|
||||
Writeln('Sizeof(ct)=',derivedsize);
|
||||
|
Loading…
Reference in New Issue
Block a user