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

all combined with other asserters has issues #314

Closed
toddobryan opened this issue Aug 22, 2020 · 0 comments · Fixed by #315
Closed

all combined with other asserters has issues #314

toddobryan opened this issue Aug 22, 2020 · 0 comments · Fixed by #315
Labels

Comments

@toddobryan
Copy link

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.

@evant evant added the bug label Aug 22, 2020
evant added a commit that referenced this issue Aug 23, 2020
In a nested context this was causing failures to be dropped since it was
mapping to an empty list.

Fixes #314
evant added a commit that referenced this issue Aug 23, 2020
In a nested context this was causing failures to be dropped since it was
mapping to an empty list.

Fixes #314
evant added a commit that referenced this issue Aug 23, 2020
In a nested context this was causing failures to be dropped since it was
mapping to an empty list.

Fixes #314
evant added a commit that referenced this issue Aug 24, 2020
In a nested context this was causing failures to be dropped since it was
mapping to an empty list.

Fixes #314
evant added a commit that referenced this issue Aug 24, 2020
In a nested context this was causing failures to be dropped since it was
mapping to an empty list.

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

Successfully merging a pull request may close this issue.

2 participants