Browse Source

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

git-svn-id: trunk@34860 -
michael 8 years ago
parent
commit
d2ebb94fa3

+ 1 - 1
packages/fcl-json/tests/testcomps.pp

@@ -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

+ 1 - 1
packages/fcl-json/tests/testjson.lpi

@@ -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>

+ 2 - 2
packages/fcl-json/tests/testjsondata.pp

@@ -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

+ 3 - 12
packages/fcl-json/tests/testjsonrtti.pp

@@ -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;