Skip to content

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

@gengjiawen

Description

@gengjiawen

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions