You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Pascal Schumacher (JIRA)" <ji...@apache.org> on 2015/10/15 10:05:05 UTC
[jira] [Closed] (GROOVY-6439) Incorrect output of power assert when
using spread operator + unique()
[ https://issues.apache.org/jira/browse/GROOVY-6439?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Pascal Schumacher closed GROOVY-6439.
-------------------------------------
Resolution: Duplicate
> Incorrect output of power assert when using spread operator + unique()
> ----------------------------------------------------------------------
>
> Key: GROOVY-6439
> URL: https://issues.apache.org/jira/browse/GROOVY-6439
> Project: Groovy
> Issue Type: Bug
> Components: groovy-runtime
> Affects Versions: 2.1.9
> Reporter: Rene Scheibe
> Priority: Minor
>
> The output of power assert is incorrect when using the spread operator in combination with {{unique()}}:
> *incorrect output*
> {noformat}
> assert [[a:1], [a:1]]*.a.unique() == [0]
> | | |
> | [1] false
> [1]
> {noformat}
> *expected output*
> {noformat}
> assert [[a:1], [a:1]]*.a.unique() == [0]
> | | |
> | [1] false
> [1, 1]
> {noformat}
> The output is correct when using a method other than {{unique()}} or no method at all.
> (NOTE: I have tried many but not all possible methods.)
> {noformat}
> assert [[a:1], [a:1]]*.a == [0]
> | |
> | false
> [1, 1]
> assert [[a:1], [a:1]]*.a.size() == 0
> | | |
> | 2 false
> [1, 1]
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)