mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-15 10:51:08 +02:00
+ testcritical added
This commit is contained in:
parent
c6a47280b9
commit
ee7ff843ae
@ -1024,6 +1024,30 @@ procedure testintqword;
|
|||||||
do_error(2606);
|
do_error(2606);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure testcritical;
|
||||||
|
|
||||||
|
var
|
||||||
|
a : array[0..10,0..10,0..10] of qword;
|
||||||
|
i,j,k : longint;
|
||||||
|
|
||||||
|
begin
|
||||||
|
i:=1;
|
||||||
|
j:=3;
|
||||||
|
k:=5;
|
||||||
|
{ check if it is handled correct if a register is used }
|
||||||
|
{ in a reference as well as temp. reg }
|
||||||
|
a[i,j,k]:=1234;
|
||||||
|
a[i,j,k]:=a[i,j,k]+a[i,j,k];
|
||||||
|
if a[i,j,k]<>2468 then
|
||||||
|
do_error(2700);
|
||||||
|
if not(not(a[i,j,k]))<>a[i,j,k] then
|
||||||
|
do_error(2701);
|
||||||
|
if -(-(a[i,j,k]))<>a[i,j,k] then
|
||||||
|
do_error(2702);
|
||||||
|
if (a[i,j,k] shl (i-i))<>a[i,j,k] then
|
||||||
|
do_error(2703);
|
||||||
|
end;
|
||||||
|
|
||||||
var
|
var
|
||||||
q : qword;
|
q : qword;
|
||||||
|
|
||||||
@ -1132,6 +1156,10 @@ begin
|
|||||||
writeln('Testing QWord input/output was successful');
|
writeln('Testing QWord input/output was successful');
|
||||||
writeln;
|
writeln;
|
||||||
|
|
||||||
|
writeln('Some extra tests for critical things');
|
||||||
|
testcritical;
|
||||||
|
writeln('Extra tests for critical things were successful');
|
||||||
|
|
||||||
writeln('------------------------------------------------------');
|
writeln('------------------------------------------------------');
|
||||||
writeln(' QWord test successful');
|
writeln(' QWord test successful');
|
||||||
writeln('------------------------------------------------------');
|
writeln('------------------------------------------------------');
|
||||||
|
Loading…
Reference in New Issue
Block a user