Browse Source

+ implicit unt test

Jonas Maebe 25 years ago
parent
commit
17cae537f2
4 changed files with 42 additions and 0 deletions
  1. 16 0
      tests/test/implprog.pp
  2. 13 0
      tests/test/impluni1.pp
  3. 10 0
      tests/test/impluni2.pp
  4. 3 0
      tests/test/readme.txt

+ 16 - 0
tests/test/implprog.pp

@@ -0,0 +1,16 @@
+uses impluni1;
+
+    Type
+      BEC_Single_Error = record
+         E : integer;
+         M : string [80];
+      end;
+
+    Const
+      BEC_Err_Msgs: array [0..1] of BEC_Single_Error =
+       ((E : impluni1.ICanUseThis;  M : '[1] No Error'),
+        (E : impluni2.ICantUseThis; M : '[10000] A Bug?'));
+
+begin
+end.
+

+ 13 - 0
tests/test/impluni1.pp

@@ -0,0 +1,13 @@
+unit impluni1;
+
+interface
+
+uses impluni2;
+
+const
+  ICanUseThis = 1;
+
+implementation
+
+end.
+

+ 10 - 0
tests/test/impluni2.pp

@@ -0,0 +1,10 @@
+unit impluni2;
+
+interface
+
+const
+  ICantUseThis = 10000;
+
+implementation
+
+end.

+ 3 - 0
tests/test/readme.txt

@@ -44,3 +44,6 @@ Range checking ........ range.pp       range checking when converting int64/
                         range2.pp      range checking when converting
                         range2.pp      range checking when converting
                                        between longint and cardinal
                                        between longint and cardinal
                         range3.pp      range checking for arrays
                         range3.pp      range checking for arrays
+Implicit units ........ implprog.pp    compile the program twice, second time
+                        impluni1.pp    there's an error about not being able
+                        impluni2.pp    to use a constant