Browse Source

*** empty log message ***

florian 25 years ago
parent
commit
140563c927
3 changed files with 25 additions and 1 deletions
  1. 1 0
      tests/test/readme.txt
  2. 21 0
      tests/test/testcas2.pp
  3. 3 1
      tests/test/testi642.pp

+ 1 - 0
tests/test/readme.txt

@@ -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 - 0
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.

+ 3 - 1
tests/test/testi642.pp

@@ -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;