[fpc-devel] TJSONDeStreamer can't handle such date format 'yyyy-MM-dd"T"hh:nn:ss"Z"'

Michael Van Canneyt michael at freepascal.org
Tue Jul 19 11:13:01 CEST 2016



On Tue, 19 Jul 2016, Sven Barth wrote:

> value" expected: <4,56> but was: <5>
>>>     Exception class:   EAssertionFailedError
>>>     Exception message: "Correct value" expected: <4,56> but was: <5>
>>>         at   $00434358  TTESTJSONSTREAMER__ASSERTPROP,  line 761 of
> testjsonrtti.pp
>>>   Failure:
>>>     Message:           TTestJSONDeStreamer.TestFloat4: "Correct extended
> value" expected: <5,67> but was: <6>
>>>     Exception class:   EAssertionFailedError
>>>     Exception message: "Correct extended value" expected: <5,67> but
> was: <6>
>>>         at   $0043241F  TTESTJSONDESTREAMER__TESTFLOAT4,  line 374 of
> testjsonrtti.pp
>>
>>
>> I am aware of this.
>>
>> However, this is only on i386, on 64-bit the code runs fine.
>> I have no idea why, the code should be CPU agnostic.
>>
>> I have not yet had the opportunity to debug it on a i386 machine.
>
> Judging by the errors that is probably due to the compiler using Extended
> for some evaluations. You'd need to force them to Double or Single to avoid
> that.

Huh ? How can using a higher precision type lead to _less_ precision ???

Michael.



More information about the fpc-devel mailing list