Browse Source

+ add checks with InstanceSize called by different methods

pierre 22 years ago
parent
commit
04ca39e630
1 changed files with 6 additions and 0 deletions
  1. 6 0
      tests/test/cg/tclasize.pp

+ 6 - 0
tests/test/cg/tclasize.pp

@@ -95,6 +95,12 @@ begin
  Writeln('Sizeof(cb)=',basesize);
  Writeln('Sizeof(cb)=',basesize);
  if basesize<>expected_size_for_tbaseclass then
  if basesize<>expected_size_for_tbaseclass then
    Writeln('not the expected size : ',expected_size_for_tbaseclass);
    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);
  derivedsize:=sizeof(cd);
  Writeln('Sizeof(ct)=',derivedsize);
  Writeln('Sizeof(ct)=',derivedsize);