Browse Source

* test for -<qword>

florian 25 years ago
parent
commit
25d1a349f0
1 changed files with 21 additions and 0 deletions
  1. 21 0
      tests/test/testi642.pp

+ 21 - 0
tests/test/testi642.pp

@@ -365,6 +365,22 @@ procedure testnotqword;
        do_error(1702);
   end;
 
+procedure testnegqword;
+
+  var
+     q0,q1,q2,q3,q4 : qword;
+
+  begin
+     assignqword($1,$0,q1);
+     assignqword($0,1234,q2);
+     if -q1<>(0-q1) then
+       do_error(2700);
+     if -q2<>(0-q2) then
+       do_error(2701);
+     if -(q1+q2)<>(0-(q1+q2)) then
+       do_error(2702);
+  end;
+
 procedure testmulqword;
 
   var
@@ -1061,6 +1077,11 @@ begin
    writeln('Testing QWord logical not operator was successful');
    writeln;
 
+   writeln('Testing QWord logical - operator');
+   testnegqword;
+   writeln('Testing QWord logical - operator was successful');
+   writeln;
+
    writeln('Testing QWord logical shift operators (shr,shr)');
    testshlshrqword;
    writeln('Testing QWord logical shift operators (shr,shr) was successful');