You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Michał Gazda (JIRA)" <ji...@apache.org> on 2018/02/01 11:51:00 UTC
[jira] [Commented] (GROOVY-8151) Unreadable assert output
[ https://issues.apache.org/jira/browse/GROOVY-8151?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16348475#comment-16348475 ]
Michał Gazda commented on GROOVY-8151:
--------------------------------------
Hello, any progress with this issue? Similar thing happens when I have some method and do static import:
!image-2018-02-01-12-48-52-359.png!
->
!image-2018-02-01-12-49-09-656.png!
Here we are missing what function actually returned.
When I add qualified reference:
!image-2018-02-01-12-48-12-547.png!
->
!image-2018-02-01-12-48-26-783.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, 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
(v7.6.3#76005)