groovy-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michał Gazda (JIRA) <j...@apache.org>
Subject [jira] [Updated] (GROOVY-8151) Unreadable assert output
Date Thu, 01 Feb 2018 11:49:00 GMT

     [ https://issues.apache.org/jira/browse/GROOVY-8151?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Michał Gazda updated GROOVY-8151:
---------------------------------
    Attachment: image-2018-02-01-12-48-52-359.png

> 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
>            Priority: Major
>         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
>
>
> {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
(v7.6.3#76005)

Mime
View raw message