Browse Source

+ new test

git-svn-id: trunk@7138 -
florian 18 years ago
parent
commit
5f18807044
2 changed files with 21 additions and 0 deletions
  1. 1 0
      .gitattributes
  2. 20 0
      tests/webtbs/tw8465.pp

+ 1 - 0
.gitattributes

@@ -8150,6 +8150,7 @@ tests/webtbs/tw8371.pp svneol=native#text/plain
 tests/webtbs/tw8391.pp svneol=native#text/plain
 tests/webtbs/tw8391.pp svneol=native#text/plain
 tests/webtbs/tw8434.pp svneol=native#text/plain
 tests/webtbs/tw8434.pp svneol=native#text/plain
 tests/webtbs/tw8462.pp svneol=native#text/plain
 tests/webtbs/tw8462.pp svneol=native#text/plain
+tests/webtbs/tw8465.pp svneol=native#text/plain
 tests/webtbs/tw8513.pp svneol=native#text/plain
 tests/webtbs/tw8513.pp svneol=native#text/plain
 tests/webtbs/tw8525.pp svneol=native#text/plain
 tests/webtbs/tw8525.pp svneol=native#text/plain
 tests/webtbs/tw8573.pp svneol=native#text/plain
 tests/webtbs/tw8573.pp svneol=native#text/plain

+ 20 - 0
tests/webtbs/tw8465.pp

@@ -0,0 +1,20 @@
+program EnumPtrConvTest;
+
+{$APPTYPE CONSOLE}
+
+{$IFDEF FPC}
+  {$MODE DELPHI}
+{$ENDIF}
+
+type
+  TEnum = (a, b);
+
+var
+  e: TEnum;
+  p: Pointer;
+
+begin
+  e := b;
+  p := Pointer(e);
+  WriteLn(Integer(p)); // produces "1" in Delphi
+end.