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

Add new range Matchers using the new generic matcher support #2087

Open
horenmar opened this issue Nov 2, 2020 · 1 comment
Open

Add new range Matchers using the new generic matcher support #2087

horenmar opened this issue Nov 2, 2020 · 1 comment
Milestone

Comments

@horenmar
Copy link
Member

horenmar commented Nov 2, 2020

Description
v3 contain facilities for type-generic matchers, so that a matcher can be used on an arbitrary input type, as long as it fulfills the correct concept.

Catch2 already provides some generic matchers, but it should provide more of them. The most obvious missing ones are

  • ElementsAre, which would perform check that the input arg is exactly equal to the elements
  • UnorderedElementsAre, which would perform check that the input arg is equal to the elements, in some permutation.

Additional context
Both of the matchers should allow providing either an exact value, or a matcher, as any of the construction arguments.

@horenmar horenmar added this to the 3.0 milestone Nov 2, 2020
@urielgarciarivas
Copy link
Contributor

urielgarciarivas commented Dec 14, 2020

I will be working on this issue! I see that there is a similar implementation in catch_matchers_vector.hpp.

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

No branches or pull requests

2 participants