[ https://issues.apache.org/jira/browse/GROOVY-7569?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14984456#comment-14984456 ]
Thibault Kruse commented on GROOVY-7569: ---------------------------------------- So one use-case is simply to be quicker when modifying expected test outputs. Examples: {code} def id(it) {it} assert 'abc d"e' == id('abc d\'\'e') // BEFORE assert 'abc d"e' == id('abc d\'\'e') | | | abc d''e false // AFTER assert 'abc d"e' == id('abc d\'\'e') | | | 'abc d\'\'e' false {code} Assuming the right-hand side is correct (after a code change), the developer needs to adapt the left hand side. In the current state of affairs, this means the developer has the burden of figuring out where escaping signs need to go and such. In the new state, the developer can just copy/paste from the test failure. And for this there are many, many examples (Basically whenever any collection has any string). Reporting the Object class and hash is an extra feature with different benefits. If that is too problematic I can create a separate JIRA issue about it. > PowerAsserts should print results more verbosely and safer > ---------------------------------------------------------- > > Key: GROOVY-7569 > URL: https://issues.apache.org/jira/browse/GROOVY-7569 > Project: Groovy > Issue Type: Improvement > Reporter: Thibault Kruse > > The output of buffer evaluation results in PowerAsserts hides a lot of useful > information from the user. > This is similar to https://issues.apache.org/jira/browse/GROOVY-7568, but > independent. > Discussed here: > http://groovy.329449.n5.nabble.com/Should-PowerAsserts-be-more-verbose-td5727255.html > https://groups.google.com/d/msg/spockframework/XbR-McgaAss/-wtkD1X1BAAJ > In particular Strings are printed without surrounding hyphens, collections > are printed without telling whether they are Lists, Maps, Sets, or Ranges. > Ranges are printed fully as lists (which can be unnecessarily long). > An implementation is almost done at > https://github.com/tkruse/incubator-groovy/tree/pretty > The downside or more information is that this output could be regarded as > "too noisy". -- This message was sent by Atlassian JIRA (v6.3.4#6332)