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

Doc: How are generic range matchers used? #2790

Open
PaulFocus opened this issue Jan 7, 2024 · 1 comment
Open

Doc: How are generic range matchers used? #2790

PaulFocus opened this issue Jan 7, 2024 · 1 comment

Comments

@PaulFocus
Copy link

Hello,

using Catch2 v3.4.0.

I'm struggling to get the generic range matchers (defined in matchers/catch_matchers_range_equals.hpp) to work (as in: compile). I wasn't even able to find an example on the internet. Is there some documentation explaining them?

Best regards,
Paul

@PaulFocus
Copy link
Author

Got confused by a false-positive IDE warning ... but it is as easy as that:

std::vector<int>   tableContent{1,2,3,5};
std::vector<int>   values{3,5,2,1};

REQUIRE_THAT(tableContent, Catch::Matchers::UnorderedRangeEquals(values));

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