Skip to content

all combined with other asserters has issues #314

Description

@toddobryan

I found an error that is really similar to #253 but seems a little different.

        assertThat(listOf("abc", "def")).all {
            hasSize(2)
            exactly(2) {
                it.hasLength(3)
            }
        }

does pass in v22, but you can change the exactly(2) to exactly(1) or even exactly(3), and it still passes.

Splitting hasSize(2) and exactly(x) into two assertions fixes the problem. Only exactly(2) passes--1 and 3 fail.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions