[
https://issues.apache.org/jira/browse/GROOVY-8151?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18149122#comment-18149122
]
Daniel Sun commented on GROOVY-8151:
------------------------------------
Fixed on master; added a regression test in
ac383927e43bdd0aa677445c373bada4fd2620d9
(https://github.com/apache/groovy/commit/ac383927e43bdd0aa677445c373bada4fd2620d9).
> Unreadable assert output
> ------------------------
>
> Key: GROOVY-8151
> URL: https://issues.apache.org/jira/browse/GROOVY-8151
> Project: Groovy
> Issue Type: Bug
> Affects Versions: 2.4.10
> Environment: Windows 7, JDK 1.8.0_66
> Reporter: Iurii
> Assignee: Daniel Sun
> Priority: Major
> Fix For: 7.0.0-alpha-1
>
> Attachments: image-2018-02-01-12-48-12-547.png,
> image-2018-02-01-12-48-26-783.png, image-2018-02-01-12-48-52-359.png,
> image-2018-02-01-12-49-09-656.png
>
>
> {code}
> class Test {
> static void main(String[] args) {
> assert 'test' == transform('test')
> }
> static String transform(String str) {
> str + 'aaa'
> }
> }
> {code}
> Output:
> {code}
> Exception in thread "main" Assertion failed:
> assert 'test' == transform('test')
> {code}
> It's unclear from the output what was the right hand value.
> E.g. the following code shows readable error message:
> {code}
> class Test {
> static void main(String[] args) {
> assert 'test' == transform('test').toString()
> }
> static String transform(String str) {
> str + 'aaa'
> }
> }
> {code}
> Output:
> {code}
> Exception in thread "main" Assertion failed:
> assert 'test' == transform('test').toString()
> |
> testaaa
> {code}
> Expected:
> the first code example should show the right hand value in the output
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)