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

show only the first 5 additional elements for inOrderOnly and inAnyOrderOnly #1100

Open
robstoll opened this issue Mar 2, 2022 · 0 comments
Assignees
Milestone

Comments

@robstoll
Copy link
Owner

robstoll commented Mar 2, 2022

Platform (all, jvm, js): all
Extension (none, kotlin 1.3): none

Code related feature

expect((1..100).toList()).toContainExactly(1,2,3)

The output will show all additional elements from 4 to 100 which is way too verbose. Similar to the showOnlyFailing option which controls reporting of the expected elements we should introduce a setMaxNumberOfAdditionalElements for inOrder.only and setMaxNumberOfMismatchesAndAdditionalElements for inAnyOrder.only which both default to 5

In the end I expect something like:

I expected subject: [1,2,3,....]
◆ ▶ size: 100        (kotlin.Int <1967062238>)
    ◾ to equal: 3        (kotlin.Int <1807366782>)
◆ to contain only, in any order: 
  ✔ an element which equals: 1
  ✔ an element which equals: 2
  ✘ an element which equals: 3
  ❗❗ mismatches and additional elements detected: 
     ⚬ 0
     ⚬ 4
     ⚬ 5
     ⚬ 6
     ⚬ 7
     ⚬ ... (92 elements not shown)
@robstoll robstoll added this to the 0.18.0 milestone Mar 2, 2022
@robstoll robstoll self-assigned this Mar 2, 2022
@robstoll robstoll changed the title show only the first 10 additional elements for inOrderOnly and inAnyOrderOnly show only the first 5 additional elements for inOrderOnly and inAnyOrderOnly Mar 2, 2022
@robstoll robstoll modified the milestones: 0.18.0, 0.19.0 Apr 9, 2022
@robstoll robstoll modified the milestones: 0.19.0, 0.20.0 Dec 29, 2022
@robstoll robstoll modified the milestones: 1.1.0, 1.2.0 Oct 14, 2023
@robstoll robstoll modified the milestones: 1.2.0, 1.3.0 Feb 6, 2024
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

1 participant