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

The assert statement could allow newline before message

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • None
    • None
    • syntax
    • None

    Description

      It's obvious that sometimes assert statements can become too long as in the following example:

      assert value == entries.last().value - entries[entries.size() - 2], "Bla bla bla bla bla bla bla bla bla bla bla bla bla bla."
      

      But it could become way more managable and readable if only the newline was allowed before message following the comma:

      assert value == entries.last().value - entries[entries.size() - 2].value, 
      	"Bla bla bla bla bla bla bla bla bla bla bla bla bla bla."
      

      Attachments

        Issue Links

          Activity

            People

              paulk Paul King
              mojojojo Nikita Y Volkov
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: