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

additional elements detected wrong for inAnyOrder.only #1103

Closed
robstoll opened this issue Mar 3, 2022 · 0 comments · Fixed by #1119
Closed

additional elements detected wrong for inAnyOrder.only #1103

robstoll opened this issue Mar 3, 2022 · 0 comments · Fixed by #1119
Assignees
Labels
Milestone

Comments

@robstoll
Copy link
Owner

robstoll commented Mar 3, 2022

Affected Version

0.18.0

API

fluent-en_GB

Platform

jvm

Kotlin Version

No response

How to reproduce the problem?

expect(listOf(1, 2)).toContain.inAnyOrder.only.values(1, 3, 4)

Describe the bug

Results in the following report:

I expected subject: [1, 2]        (java.util.Arrays.ArrayList <746663439>)
◆ ▶ size: 2        (kotlin.Int <2138554380>)
    ◾ to equal: 3        (kotlin.Int <1807366782>)
◆ to contain only, in any order: 
  ✔ an element which equals: 1        (kotlin.Int <1735468246>)
  ✘ an element which equals: 3        (kotlin.Int <1807366782>)
  ✘ an element which equals: 4        (kotlin.Int <461847788>)
  ❗❗ mismatches and additional elements detected: 
     ⚬ 2        (kotlin.Int <2138554380>)

Expected behaviour

The hint should only mention mismatches detected as we specified more expected elements than there are in the list

@robstoll robstoll added the bug label Mar 3, 2022
@robstoll robstoll added this to the 0.18.0 milestone Mar 3, 2022
@robstoll robstoll self-assigned this Mar 3, 2022
@robstoll robstoll linked a pull request Apr 9, 2022 that will close this issue
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.

1 participant