Uploaded image for project: 'TinkerPop'
  1. TinkerPop
  2. TINKERPOP-1997

Tests allow Integer - Double equivalences

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Won't Do
    • Affects Version/s: 3.3.3
    • Fix Version/s: None
    • Component/s: io
    • Labels:
      None

      Description

      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?

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              arcanefoam Horacio Hoyos Rodriguez
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: