mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-15 01:29:19 +02:00
* test for -<qword>
This commit is contained in:
parent
40e19412ed
commit
25d1a349f0
@ -365,6 +365,22 @@ procedure testnotqword;
|
|||||||
do_error(1702);
|
do_error(1702);
|
||||||
end;
|
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;
|
procedure testmulqword;
|
||||||
|
|
||||||
var
|
var
|
||||||
@ -1061,6 +1077,11 @@ begin
|
|||||||
writeln('Testing QWord logical not operator was successful');
|
writeln('Testing QWord logical not operator was successful');
|
||||||
writeln;
|
writeln;
|
||||||
|
|
||||||
|
writeln('Testing QWord logical - operator');
|
||||||
|
testnegqword;
|
||||||
|
writeln('Testing QWord logical - operator was successful');
|
||||||
|
writeln;
|
||||||
|
|
||||||
writeln('Testing QWord logical shift operators (shr,shr)');
|
writeln('Testing QWord logical shift operators (shr,shr)');
|
||||||
testshlshrqword;
|
testshlshrqword;
|
||||||
writeln('Testing QWord logical shift operators (shr,shr) was successful');
|
writeln('Testing QWord logical shift operators (shr,shr) was successful');
|
||||||
|
Loading…
Reference in New Issue
Block a user