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

expect_setequal #557

Closed
wants to merge 2 commits into from
Closed

expect_setequal #557

wants to merge 2 commits into from

Conversation

carlganz
Copy link

Apropos of #528

This is an attempt to implement expect_setequal. This version appears to work correctly, but I suspect there is still plenty of room for improvement so all feedback is appreciated.

I tried to mimic the code for the other expect_* functions, but I had to stray a little bit to make it work.

Kind Regards,
Carl

lab_act <- make_label(object, label)
lab_exp <- make_label(expected, expected.label)

steq <- compare_set(object, expected)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you could considerably simplify the implementation by just comparing sorted unique object and expected

@hadley hadley closed this in e3880d6 Oct 4, 2017
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

Successfully merging this pull request may close these issues.

None yet

2 participants