fpc/tests/webtbs/tw9347a.pp
Jonas Maebe b43404964c * support 'true'/'false' for SetOrdProp on booleans (fixes )
+ test for that bug, plus another test based on it which doesn't work yet

git-svn-id: trunk@8247 -
2007-08-08 13:26:28 +00:00

28 lines
479 B
ObjectPascal

{$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
try
{ delphi gives a range error here, also if range checking is off }
SetPropValue(TBla.Create, 'Bool', 2);
except on ERangeError do
halt(0);
end;
halt(1);
end.