Browse Source

+ extended test tfarptr2.pp with far pointers which are different, but point to
the same linear address

git-svn-id: trunk@28162 -

nickysn 11 years ago
parent
commit
fda9cfea12
1 changed files with 18 additions and 0 deletions
  1. 18 0
      tests/test/cpu16/i8086/tfarptr2.pp

+ 18 - 0
tests/test/cpu16/i8086/tfarptr2.pp

@@ -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;