Browse Source

Added a test for a bug that was fixed in Delphi in (maybe XE4) to make sure that a similar bug will not be introduced in FPC.

Source: http://www.deltics.co.nz/blog/?p=1397

git-svn-id: trunk@24403 -
svenbarth 12 years ago
parent
commit
3ad0de732e
4 changed files with 35 additions and 0 deletions
  1. 3 0
      .gitattributes
  2. 12 0
      tests/tbf/tb0234.pp
  3. 10 0
      tests/tbf/ub0234.pp
  4. 10 0
      tests/tbf/ub0234.ub0234.pp

+ 3 - 0
.gitattributes

@@ -9344,10 +9344,13 @@ tests/tbf/tb0230.pp svneol=native#text/pascal
 tests/tbf/tb0231.pp svneol=native#text/pascal
 tests/tbf/tb0232.pp svneol=native#text/pascal
 tests/tbf/tb0233.pp svneol=native#text/pascal
+tests/tbf/tb0234.pp svneol=native#text/pascal
 tests/tbf/ub0115.pp svneol=native#text/plain
 tests/tbf/ub0149.pp svneol=native#text/plain
 tests/tbf/ub0158a.pp svneol=native#text/plain
 tests/tbf/ub0158b.pp svneol=native#text/plain
+tests/tbf/ub0234.pp svneol=native#text/pascal
+tests/tbf/ub0234.ub0234.pp svneol=native#text/pascal
 tests/tbs/tb0001.pp svneol=native#text/plain
 tests/tbs/tb0002.pp svneol=native#text/plain
 tests/tbs/tb0003.pp svneol=native#text/plain

+ 12 - 0
tests/tbf/tb0234.pp

@@ -0,0 +1,12 @@
+{ %FAIL }
+
+program tb0234;
+ 
+uses
+  ub0234.ub0234;
+ 
+var
+  c: Integer;
+begin
+  c := Ord(ub0234.enumBAR);
+end.

+ 10 - 0
tests/tbf/ub0234.pp

@@ -0,0 +1,10 @@
+unit ub0234;
+ 
+interface
+ 
+  type
+    TEnum = (enumBAR);
+ 
+implementation
+ 
+end.

+ 10 - 0
tests/tbf/ub0234.ub0234.pp

@@ -0,0 +1,10 @@
+unit ub0234.ub0234;
+ 
+interface
+ 
+  uses
+    ub0234;
+ 
+implementation
+ 
+end.