mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-27 02:14:06 +02:00
* tests clarified
This commit is contained in:
parent
04ca39e630
commit
6055372c98
@ -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');
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user