Browse Source

*** empty log message ***

florian 25 years ago
parent
commit
ffa34b83d6
2 changed files with 16 additions and 0 deletions
  1. 2 0
      tests/test/readme.txt
  2. 14 0
      tests/test/testenm1.pp

+ 2 - 0
tests/test/readme.txt

@@ -30,3 +30,5 @@ 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
+Enumerations .......... testenm1.pp    tests assignments of subrange
+                                       enumerations

+ 14 - 0
tests/test/testenm1.pp

@@ -0,0 +1,14 @@
+type
+  days = (mon,tue,wed,thu,fri,sat,sun);
+  weekend = sat..sun;
+
+procedure t2(day: weekend);
+begin
+  if day = sat then
+    writeln('ok')
+  else writeln('error');
+end;
+
+begin
+  t2(sat);
+end.