Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-5634

When adding a message to an assert, power assert print out not used

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      When adding a message to an assert, power assert print out isn't used, it just prints out the message, and the expected, but without the full (normal) comparison of the expected vs the actual.

      e.g:

      assert result.toString() == """[e rrorMessage:For input string: "bad number", errorCode:1]""" // : "Correct error message is returned."
             |      |          |
             |      |          false
             |      {"errorMessage":"For input string: \"bad number\"","errorCode":1}
             [errorMessage:For input string: "bad number", errorCode:1]
      

      vs

      java.lang.AssertionError: Correct error message is returned.. Expression: (result.toString() == something that doesn't match
      

        Attachments

          Activity

            People

            • Assignee:
              guillaume Guillaume Sauthier
              Reporter:
              astubbs Antony Stubbs
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: