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

Power assert doesn't pretty-print empty String

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.7.3
    • 1.7.4, 1.8-beta-1
    • None
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: