mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-21 20:09:25 +02:00
+ extended test tfarptr2.pp with far pointers which are different, but point to
the same linear address git-svn-id: trunk@28162 -
This commit is contained in:
parent
4e2cc365d1
commit
fda9cfea12
@ -57,6 +57,13 @@ begin
|
||||
if eq or not neq then
|
||||
Error(4);
|
||||
|
||||
FarPtr := Ptr($1234, $5678);
|
||||
FarPtr2 := Ptr($1235, $5668);
|
||||
eq := FarPtr = FarPtr2;
|
||||
neq := FarPtr <> FarPtr2;
|
||||
if eq or not neq then
|
||||
Error(5);
|
||||
|
||||
Writeln('var, ptr(const)');
|
||||
FarPtr := Ptr($1234, $5678);
|
||||
eq := FarPtr = Ptr($1234, $5678);
|
||||
@ -82,6 +89,12 @@ begin
|
||||
if eq or not neq then
|
||||
Error(4);
|
||||
|
||||
FarPtr := Ptr($1234, $5678);
|
||||
eq := FarPtr = Ptr($1235, $5668);
|
||||
neq := FarPtr <> Ptr($1235, $5668);
|
||||
if eq or not neq then
|
||||
Error(5);
|
||||
|
||||
Writeln('ptr(const), ptr(const)');
|
||||
eq := Ptr($1234, $5678) = Ptr($1234, $5678);
|
||||
neq := Ptr($1234, $5678) <> Ptr($1234, $5678);
|
||||
@ -103,6 +116,11 @@ begin
|
||||
if eq or not neq then
|
||||
Error(4);
|
||||
|
||||
eq := Ptr($1234, $5678) = Ptr($1235, $5668);
|
||||
neq := Ptr($1234, $5678) <> Ptr($1235, $5668);
|
||||
if eq or not neq then
|
||||
Error(5);
|
||||
|
||||
Writeln('var, nil');
|
||||
FarPtr := Ptr(0, 0);
|
||||
eq := FarPtr = nil;
|
||||
|
Loading…
Reference in New Issue
Block a user