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

Power assert doesn't pretty-print empty String

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.7.3
    • Fix Version/s: 1.7.4, 1.8-beta-1
    • Component/s: None
    • Labels:
      None

      Description

      expected:

      $ groovy -e 'assert new String() == "xxx";'
      Caught: Assertion failed: 
      
      assert new String() == "xxx"
             |            |
             |            false
             ""
      

      but actual:

      $ groovy -e 'assert new String() == "xxx";'
      Caught: Assertion failed: 
      
      assert new String() == "xxx"
             |            |
             |            false
             java.lang.String@45c3987
      

        Attachments

        1. v17x_4250.patch
          1.0 kB
          Roshan Dawrani
        2. v17x_4250_v2.patch
          1 kB
          Roshan Dawrani

          Activity

            People

            • Assignee:
              roshandawrani Roshan Dawrani
              Reporter:
              nobeans Yasuharu Nakano
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: