Browse Source

* more type redefining tests

peter 24 years ago
parent
commit
1b28fe0e03

+ 1 - 1
tests/test/tunit1.pp

@@ -1,5 +1,5 @@
 uses
-   erroru,tunit2;
+   erroru,uunit1;
 
 begin
    if testvar<>1234567 then

+ 9 - 12
tests/test/tunit2.pp

@@ -1,20 +1,17 @@
+{ %RECOMPILE }
 unit tunit2;
 
   interface
 
-    var
-       testvar : longint;
+    uses
+       uunit2a;
 
-  implementation
+    const
+       l = tpl(10);
 
-    uses
-       erroru;
+    type
+       pr = ^tr;
+
+  implementation
 
-initialization
-  testvar:=1234567;
-finalization
-  if testvar<>1234567 then
-    do_error(1001)
-  else
-    halt(0);
 end.

+ 4 - 9
tests/test/tunit3.pp

@@ -1,11 +1,6 @@
-unit tunit3;
-
-  interface
-
-    type
-       tr = record
-       end;
-
-  implementation
+{ %RECOMPILE }
+uses
+  uunit3a;
 
+begin
 end.

+ 0 - 13
tests/test/tunit5.pp

@@ -1,13 +0,0 @@
-unit tunit5;
-
-  interface
-
-    uses
-       tunit4;
-
-    type
-       pr = ^tr;
-
-  implementation
-
-end.

+ 20 - 0
tests/test/uunit1.pp

@@ -0,0 +1,20 @@
+unit uunit1;
+
+  interface
+
+    var
+       testvar : longint;
+
+  implementation
+
+    uses
+       erroru;
+
+initialization
+  testvar:=1234567;
+finalization
+  if testvar<>1234567 then
+    do_error(1001)
+  else
+    halt(0);
+end.

+ 14 - 0
tests/test/uunit2a.pp

@@ -0,0 +1,14 @@
+unit uunit2a;
+
+  interface
+
+    uses
+       uunit2b;
+
+    type
+       tr = uunit2b.tr;
+       tpl = uunit2b.tpl;
+
+  implementation
+
+end.

+ 13 - 0
tests/test/uunit2b.pp

@@ -0,0 +1,13 @@
+unit uunit2b;
+
+  interface
+
+    type
+       tr = record
+       end;
+
+       tpl = ^longint;
+
+  implementation
+
+end.

+ 19 - 0
tests/test/uunit3a.pp

@@ -0,0 +1,19 @@
+unit uunit3a;
+
+  interface
+
+    uses
+       uunit3b;
+
+procedure p1(para:tpl);
+
+  implementation
+
+uses
+  uunit3c;
+
+procedure p1(para:tpl);
+begin
+end;
+
+end.

+ 3 - 3
tests/test/tunit4.pp → tests/test/uunit3b.pp

@@ -1,12 +1,12 @@
-unit tunit4;
+unit uunit3b;
 
   interface
 
     uses
-       tunit3;
+       uunit3c;
 
     type
-       tr = tunit3.tr;
+       tpl = uunit3c.tpl;
 
   implementation
 

+ 10 - 0
tests/test/uunit3c.pp

@@ -0,0 +1,10 @@
+unit uunit3c;
+
+  interface
+
+    type
+       tpl = ^longint;
+
+  implementation
+
+end.