Uploaded image for project: 'Metron (Retired)'
  1. Metron (Retired)
  2. METRON-624

Comparison Operators Evaluate Incorrectly

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Done
    • Major
    • Resolution: Done
    • None
    • 0.3.1

    Description

      Currently there is an issue with the way Stellar interprets comparison expressions. Currently it only compares numbers when both sides are numbers otherwise it converts both sides of the expression to a value and then compares them. Also, when looking at numbers it always gets double values to compare.

      Below is an example of a failing test that should pass.

        @Test
        public void compareNumberAndStringWithSameValueShouldFail() throws Exception {
          final Map<String, String> variableMap = new HashMap<>();
          assertFalse(runPredicate("1 == '1'", variableMap::get));
        }
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jjmeyer0 Josh Meyer
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: