* tests clarified

This commit is contained in:
pierre 2003-01-20 14:13:28 +00:00
parent 04ca39e630
commit 6055372c98
2 changed files with 11 additions and 1 deletions

View File

@ -180,6 +180,8 @@ begin
has_error:=true;
reset_booleans;
Writeln('Szeof(cc)=',sizeof(cc));
if has_error then
begin
Writeln('Error with class methods');

View File

@ -82,7 +82,7 @@ end;
class procedure tbaseclass.call_virtual_class_method;
begin
virtual_class_method;
if getsize<>sizeof(self) then
if get_type<>typeof(self) then
begin
Writeln('Compiler creates garbage');
has_error:=true;
@ -111,11 +111,18 @@ var
c1,cb : tbaseclass;
cd : tderivedclass;
cc : class of tbaseclass;
pb,pd : pointer;
begin
cb:=tbaseclass.create;
cd:=tderivedclass.create;
c1:=tbaseclass.create;
pb:=typeof(tbaseclass);
pd:=typeof(tderivedclass);
if pb<>typeof(cb) then
has_error:=true;
if pd<>typeof(cd) then
has_error:=true;
basesize:=sizeof(cb);
Writeln('Sizeof(cb)=',basesize);
@ -195,6 +202,7 @@ begin
cc:=tderivedclass;
cc.class_check_type;
cc.virtual_class_method;