diff --git a/tests/test/readme.txt b/tests/test/readme.txt index d5a89ab163..731855a3ef 100644 --- a/tests/test/readme.txt +++ b/tests/test/readme.txt @@ -28,4 +28,5 @@ Units ................. testu1.pp tests init. & finalization and halt testu5.pp case .................. testcase.pp tests case statements with byte and word sized decision variables + testcas2.pp tests case with sub enum types Arrays ................ testarr1.pp small test for open arrays with classes diff --git a/tests/test/testcas2.pp b/tests/test/testcas2.pp new file mode 100644 index 0000000000..34f014493b --- /dev/null +++ b/tests/test/testcas2.pp @@ -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. diff --git a/tests/test/testi642.pp b/tests/test/testi642.pp index 2540ea1abb..23c0252078 100644 --- a/tests/test/testi642.pp +++ b/tests/test/testi642.pp @@ -803,6 +803,8 @@ procedure testmodqword; do_error(2302); if (q1 mod q3) mod q2<>q5 then do_error(2303); + if q1 mod q2<>q1 then + do_error(2308); { a more complex expression } if (q2 mod q4) mod (q1 mod q3)<>(q1 mod q3) mod (q2 mod q4) then @@ -1029,7 +1031,7 @@ procedure testcritical; var a : array[0..10,0..10,0..10] of qword; i,j,k : longint; - d1,d2 : double; + d1,d2 : extended; q1,q2 : qword; i1,i2 : int64;