Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grammar wrong in GroovyInAction/listings/appD/Listing_D_02_Lists.groovy #5

Open
gengjiawen opened this issue Jul 23, 2016 · 2 comments

Comments

@gengjiawen
Copy link

Grammar wrong in GroovyInAction/listings/appD/Listing_D_02_Lists.groovy

Caught: Assertion failed: 

assert [1,2,3].permutations().toList() == [ [1, 2, 3], [2, 3, 1], [3, 2, 1], [3, 1, 2], [2, 1, 3], [1, 3, 2] ]
               |              |        |
               |              |        false
               |              [[1, 2, 3], [3, 2, 1], [2, 1, 3], [3, 1, 2], [1, 3, 2], [2, 3, 1]]
               [[1, 2, 3], [3, 2, 1], [2, 1, 3], [3, 1, 2], [1, 3, 2], [2, 3, 1]]

Assertion failed: 

assert [1,2,3].permutations().toList() == [ [1, 2, 3], [2, 3, 1], [3, 2, 1], [3, 1, 2], [2, 1, 3], [1, 3, 2] ]
               |              |        |
               |              |        false
               |              [[1, 2, 3], [3, 2, 1], [2, 1, 3], [3, 1, 2], [1, 3, 2], [2, 3, 1]]
               [[1, 2, 3], [3, 2, 1], [2, 1, 3], [3, 1, 2], [1, 3, 2], [2, 3, 1]]

    at Lists.run(Lists.groovy:38)
@Dierk
Copy link
Owner

Dierk commented Jul 23, 2016

Ok, thanks. I will investigate. What Groovy/Java version did you run it with?

Dierk

sent from:mobile

Am 23.07.2016 um 05:49 schrieb Jiawen Geng [email protected]:

Grammar wrong in GroovyInAction/listings/appD/Listing_D_02_Lists.groovy

Caught: Assertion failed:

assert [1,2,3].permutations().toList() == [ [1, 2, 3], [2, 3, 1], [3, 2, 1], [3, 1, 2], [2, 1, 3], [1, 3, 2] ]
| | |
| | false
| [[1, 2, 3], [3, 2, 1], [2, 1, 3], [3, 1, 2], [1, 3, 2], [2, 3, 1]]
[[1, 2, 3], [3, 2, 1], [2, 1, 3], [3, 1, 2], [1, 3, 2], [2, 3, 1]]

Assertion failed:

assert [1,2,3].permutations().toList() == [ [1, 2, 3], [2, 3, 1], [3, 2, 1], [3, 1, 2], [2, 1, 3], [1, 3, 2] ]
| | |
| | false
| [[1, 2, 3], [3, 2, 1], [2, 1, 3], [3, 1, 2], [1, 3, 2], [2, 3, 1]]
[[1, 2, 3], [3, 2, 1], [2, 1, 3], [3, 1, 2], [1, 3, 2], [2, 3, 1]]

at Lists.run(Lists.groovy:38)


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

@gengjiawen
Copy link
Author

Java 8
Groovy 2.4.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants