mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 22:39:36 +02:00
+ added test LOC_REFERENCE/LOC_REFERENCE (thanks to Florian)
This commit is contained in:
parent
577030e45a
commit
119fbebc99
@ -32,12 +32,14 @@ type
|
|||||||
|
|
||||||
tclass3 = class
|
tclass3 = class
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var
|
var
|
||||||
myclass1 : tclass1;
|
myclass1 : tclass1;
|
||||||
myclass2 : tclass2;
|
myclass2 : tclass2;
|
||||||
myclass3 : tclass3;
|
myclass3 : tclass3;
|
||||||
|
class1 : class of tclass1;
|
||||||
|
|
||||||
|
|
||||||
procedure fail;
|
procedure fail;
|
||||||
@ -67,6 +69,7 @@ end;
|
|||||||
{ possible types : right : LOC_REFERENCE, LOC_REGISTER }
|
{ possible types : right : LOC_REFERENCE, LOC_REGISTER }
|
||||||
var
|
var
|
||||||
failed : boolean;
|
failed : boolean;
|
||||||
|
myclass4 : class of tclass1;
|
||||||
begin
|
begin
|
||||||
failed := false;
|
failed := false;
|
||||||
{ create class instance }
|
{ create class instance }
|
||||||
@ -107,18 +110,22 @@ begin
|
|||||||
|
|
||||||
|
|
||||||
failed := false;
|
failed := false;
|
||||||
{ Write('Testing left/right : LOC_REFERENCE/LOC_REFERENCE...');
|
Write('Testing left/right : LOC_REFERENCE/LOC_REFERENCE...');
|
||||||
|
if (myclass1 is class1) then
|
||||||
|
failed := true;
|
||||||
if failed then
|
if failed then
|
||||||
Fail
|
Fail
|
||||||
else
|
else
|
||||||
WriteLn('Passed!');
|
WriteLn('Passed!');
|
||||||
}
|
|
||||||
end.
|
end.
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.1 2002-03-21 20:16:23 carl
|
Revision 1.2 2002-03-22 21:32:23 carl
|
||||||
|
+ added test LOC_REFERENCE/LOC_REFERENCE (thanks to Florian)
|
||||||
|
|
||||||
|
Revision 1.1 2002/03/21 20:16:23 carl
|
||||||
+ is operator testing
|
+ is operator testing
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user