You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Notice that the 0 before the 7 is missing, the issue is not just the 0000000000000064.
This inaccuracy is reproducible with any decimal float value I've tested with. Even if the test passes it seems to be because the assert and foo value have both been the same incorrect float.
I can see that the response body contains the correct value:
I can see in the UI of my app that the correct value (1.07) has indeed come through and is displayed, so from what I can tell the issue appears to be with hurl.
The text was updated successfully, but these errors were encountered:
The Float type in Hurl is now using directly the floating type f64.
The same float value can be defined from different textual values in both Hurl files and JSON HTTP responses.
Trailing zero can be added "naturally" to the value
For example, 0.07 and 0.070 have the same float value.
On the contrary, it is less intuitive, but values can be defined with a precision that the float can not encode.
For example, 0.3333333333333333333 (19 decimal digits) have 3 decimal digits too many, and be simply decoded as 0.3333333333333333 (16 decimal digits).
We could throw a parsing error when this occurs in a Hurl file. For values in JSON response, this might be more tricky to detect as we currently decode them using the serde_json API.
Hurl version = 1.4.0
I've come across an issue where hurl appears to not be interpreting decimal float values as it should.
For example, with a hurl file such as this simplified version below where
foo
is a float, the assert fails:The error returned by hurl is:
Notice that the
0
before the 7 is missing, the issue is not just the0000000000000064
.This inaccuracy is reproducible with any decimal float value I've tested with. Even if the test passes it seems to be because the assert and foo value have both been the same incorrect float.
I can see that the response body contains the correct value:
I can see in the UI of my app that the correct value (1.07) has indeed come through and is displayed, so from what I can tell the issue appears to be with hurl.
The text was updated successfully, but these errors were encountered: