* Fix for failing COMP tests from Luiz Americo (bug ID 30878)

git-svn-id: trunk@34860 -
This commit is contained in:
michael 2016-11-09 21:21:49 +00:00
parent 6bf0ec2de1
commit d2ebb94fa3
4 changed files with 7 additions and 16 deletions

View File

@ -191,7 +191,7 @@ Type
Public
Constructor Create(AOwner : TComponent); override;
Published
Property ExtendedProp : Comp Read F Write F;
Property CompProp : Comp Read F Write F;
end;
// Currency property

View File

@ -25,7 +25,7 @@
<RunParams>
<local>
<FormatVersion Value="1"/>
<CommandLineParams Value="--suite=TTestJSONDeStreamer.TestDateTimeFormat"/>
<CommandLineParams Value="--suite=TTestParser.TestObjectError"/>
<LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
</local>
</RunParams>

View File

@ -1584,7 +1584,7 @@ begin
TestAsBoolean(J,True,False);
TestAsInteger(J,-1,False);
TestAsInt64(J,-1,False);
TestAsQWord(J,-1,True);
TestAsQWord(J,QWord(-1),True);
TestAsString(J,S);
TestAsFloat(J,-1.0,False);
finally
@ -1629,7 +1629,7 @@ begin
TestAsBoolean(J,True,False);
TestAsInteger(J,-1,True);
TestAsInt64(J,-1,True);
TestAsQWord(J,-1,True);
TestAsQWord(J,QWord(-1),True);
TestAsString(J,S);
TestAsFloat(J,-1.0,True);
finally

View File

@ -366,12 +366,8 @@ Var
begin
B:=TCompComponent.Create(Nil);
DeStream('{ "ExtendedProp" : 5.67 }',B);
{$ifdef CPUX86_64}
AssertEquals('Correct comp value',round(5.67),B.ExtendedProp);
{$else}
AssertEquals('Correct extended value',5.67,B.ExtendedProp);
{$endif}
DeStream('{ "CompProp" : 5.67 }',B);
AssertEquals('Correct comp value',round(5.67),B.CompProp);
end;
procedure TTestJSONDeStreamer.TestFloat5;
@ -876,12 +872,7 @@ procedure TTestJSONStreamer.TestWriteFloat4;
begin
StreamObject(TCompComponent.Create(Nil));
AssertPropCount(1);
// Extended is correct, propname is wrong
{$ifdef CPUX86_64}
AssertProp('ExtendedProp',TJSONFloat(5));
{$else}
AssertProp('ExtendedProp',4.56);
{$endif}
AssertProp('CompProp',5);
end;
procedure TTestJSONStreamer.TestWriteFloat5;