Browse Source

+ another test which currently fails (Delphi 7 supports converting
variant('true') to an integer, Delphi 6/Kylix doesn't)

git-svn-id: trunk@8249 -

Jonas Maebe 18 years ago
parent
commit
399598a15b
2 changed files with 23 additions and 0 deletions
  1. 1 0
      .gitattributes
  2. 22 0
      tests/webtbs/tw9347b.pp

+ 1 - 0
.gitattributes

@@ -8371,6 +8371,7 @@ tests/webtbs/tw9306b.pp -text
 tests/webtbs/tw9309.pp -text
 tests/webtbs/tw9309.pp -text
 tests/webtbs/tw9347.pp svneol=native#text/plain
 tests/webtbs/tw9347.pp svneol=native#text/plain
 tests/webtbs/tw9347a.pp svneol=native#text/plain
 tests/webtbs/tw9347a.pp svneol=native#text/plain
+tests/webtbs/tw9347b.pp svneol=native#text/plain
 tests/webtbs/tw9384.pp svneol=native#text/plain
 tests/webtbs/tw9384.pp svneol=native#text/plain
 tests/webtbs/ub1873.pp svneol=native#text/plain
 tests/webtbs/ub1873.pp svneol=native#text/plain
 tests/webtbs/ub1883.pp svneol=native#text/plain
 tests/webtbs/ub1883.pp svneol=native#text/plain

+ 22 - 0
tests/webtbs/tw9347b.pp

@@ -0,0 +1,22 @@
+{$ifdef fpc}
+{$mode delphi}
+{$endif}
+
+{$r-}
+uses
+  SysUtils, Classes, TypInfo, Variants;
+
+type
+  TBla = class(TPersistent)
+  private
+    fBool: Boolean;
+    fint: integer;
+  published
+    property Bool: Boolean read fBool write fBool;
+    property int: integer read fint write fint;
+  end;
+
+begin
+  { fails in Delphi 6, succeeds in Delphi 7 }
+  SetPropValue(TBla.Create, 'int', 'true');
+end.