mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 06:06:17 +02:00
*** empty log message ***
This commit is contained in:
parent
1dac75340e
commit
140563c927
@ -28,4 +28,5 @@ Units ................. testu1.pp tests init. & finalization and halt
|
|||||||
testu5.pp
|
testu5.pp
|
||||||
case .................. testcase.pp tests case statements with byte and word
|
case .................. testcase.pp tests case statements with byte and word
|
||||||
sized decision variables
|
sized decision variables
|
||||||
|
testcas2.pp tests case with sub enum types
|
||||||
Arrays ................ testarr1.pp small test for open arrays with classes
|
Arrays ................ testarr1.pp small test for open arrays with classes
|
||||||
|
21
tests/test/testcas2.pp
Normal file
21
tests/test/testcas2.pp
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
type
|
||||||
|
days = (sun,mon,tue,wed,thu,fri,sat);
|
||||||
|
workdays = mon..fri;
|
||||||
|
|
||||||
|
procedure t(d: workdays);
|
||||||
|
begin
|
||||||
|
case d of
|
||||||
|
mon: writeln('monday');
|
||||||
|
thu: writeln('thursday');
|
||||||
|
else
|
||||||
|
writeln('error');
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
d: workdays;
|
||||||
|
|
||||||
|
begin
|
||||||
|
d := thu;
|
||||||
|
t(d);
|
||||||
|
end.
|
@ -803,6 +803,8 @@ procedure testmodqword;
|
|||||||
do_error(2302);
|
do_error(2302);
|
||||||
if (q1 mod q3) mod q2<>q5 then
|
if (q1 mod q3) mod q2<>q5 then
|
||||||
do_error(2303);
|
do_error(2303);
|
||||||
|
if q1 mod q2<>q1 then
|
||||||
|
do_error(2308);
|
||||||
|
|
||||||
{ a more complex expression }
|
{ a more complex expression }
|
||||||
if (q2 mod q4) mod (q1 mod q3)<>(q1 mod q3) mod (q2 mod q4) then
|
if (q2 mod q4) mod (q1 mod q3)<>(q1 mod q3) mod (q2 mod q4) then
|
||||||
@ -1029,7 +1031,7 @@ procedure testcritical;
|
|||||||
var
|
var
|
||||||
a : array[0..10,0..10,0..10] of qword;
|
a : array[0..10,0..10,0..10] of qword;
|
||||||
i,j,k : longint;
|
i,j,k : longint;
|
||||||
d1,d2 : double;
|
d1,d2 : extended;
|
||||||
q1,q2 : qword;
|
q1,q2 : qword;
|
||||||
i1,i2 : int64;
|
i1,i2 : int64;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user