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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

`equal` for `Set`s #93

Merged
merged 4 commits into from Feb 15, 2015

Conversation

Projects
None yet
2 participants
@narfdotpl
Contributor

narfdotpl commented Feb 15, 2015

Hello, 馃憢

I'm comparing Sets in my tests. When there are more than 5 elements, it is hard to read failure messages, because order of elements in the message is non-deterministic.

I wrote a version of equal that tells which elements are missing and which are extra. It also sorts elements if they are Comparable.

Example:

expected to equal <[1, 2, 3]>, got <[2, 3, 4]>, missing <[1]>, extra <[4]>

@jeffh jeffh merged commit 5faec98 into Quick:master Feb 15, 2015

@jeffh

This comment has been minimized.

Show comment
Hide comment
@jeffh

jeffh Feb 15, 2015

Member

Looks good to me, thanks @narfdotpl. I added a few tests for happy-path cases, but other than that merged! 馃憤

Member

jeffh commented Feb 15, 2015

Looks good to me, thanks @narfdotpl. I added a few tests for happy-path cases, but other than that merged! 馃憤

@narfdotpl

This comment has been minimized.

Show comment
Hide comment
@narfdotpl

narfdotpl Feb 16, 2015

Contributor

Awesome! 馃槃

Contributor

narfdotpl commented Feb 16, 2015

Awesome! 馃槃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment