You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "stephen mallette (JIRA)" <ji...@apache.org> on 2018/07/13 10:29:00 UTC
[jira] [Closed] (TINKERPOP-1997) Tests allow Integer - Double
equivalences
[ https://issues.apache.org/jira/browse/TINKERPOP-1997?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
stephen mallette closed TINKERPOP-1997.
---------------------------------------
Resolution: Won't Do
Hopefully we can be smarter about numbers in TinkerPop 4.x
> Tests allow Integer - Double equivalences
> ------------------------------------------
>
> Key: TINKERPOP-1997
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1997
> Project: TinkerPop
> Issue Type: Improvement
> Components: io
> Affects Versions: 3.3.3
> Reporter: Horacio Hoyos Rodriguez
> Priority: Minor
>
> In ArangoDB doubles with 0 decimals are serialised and later deserialised as Intengers, e.g. a weight of 1.0 will be stored as 1 and deserialised as Integer(1).
> In the TestSuite (I think mostly the IO tests), there is an assertion for validating that the weight of the edges are Doubles. In this case, the test fails because Integer != Double.
> Shouldn't it be enough to compare values? In Java the Integer will be promoted to Double.
> The same issue happens when the assert compares representations:
> x=1.0 != x=1
> Can these be relaxed further to allow this discrepancies, but equivalent values, to be used?
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)