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 matcher: Equals(std::vector) #466

Closed

Conversation

webmaster128
Copy link
Contributor

This matcher supports arbitrary std::vectors including custom allocators. It is tested using Botan's secure_vector type.

Note that this moves catch_tostring.h up in the single header, I hope this causes no trouble.

@webmaster128 webmaster128 force-pushed the std-vector-matcher branch 4 times, most recently from 311c89d to 6d98529 Compare July 18, 2015 15:45
@webmaster128 webmaster128 force-pushed the std-vector-matcher branch 3 times, most recently from c996fe8 to e937427 Compare August 12, 2015 08:54
@webmaster128 webmaster128 changed the title Add an Equals matcher for std::vector Add matcher: Equals(std::vector) Aug 12, 2015
@philsquared
Copy link
Collaborator

Apologies for the premature closure - I deleted the branch and it auto-closed all associated PRs - it wasn't intentional.
I also can't re-open it at this point - but I'll come back and review shortly.

@webmaster128
Copy link
Contributor Author

Hi @philsquared, could you please have a look at this again? This Equals matcher for std::vector was a non-trivial piece of work it would be unfortunate if it get's lost now. I don't know what your plans for matchers are and if you like this implementation but I you want matchers, I think this is a real basic one and a great example for a matcher that can handle template types.

@philsquared
Copy link
Collaborator

I'll definitely be looking at it. It's exactly the sort of thing I've been meaning to get around to adding for a while - so the work is very much appreciated.
I'm just trying to work through my backlog at the moment!
I should be able to cherry pick from your branch straight into master - so no need to retarget.

@webmaster128
Copy link
Contributor Author

Great, no need to hurry. I was just afraid it was overlooked.

@philsquared
Copy link
Collaborator

Sorry I never got back to this. I must have forgotten to make a note of it and- since it's closed with no way to reopen - it didn't even come up in review.

Anyway, if this is still an area of interest for you you might like to know that I've been reworking the Matchers implementation. It's now much simpler - with far less templates in particular (and no CRTP!).

That's the good news. The (slightly) bad news is that it will break existing custom Matchers (although its not a big job to update them). Since you've been using them in the past I thought I'd give you a heads up before this gets merged to master.

You can find them here:
https://github.com/philsquared/Catch/tree/new-matchers

(or just the single include:
https://github.com/philsquared/Catch/raw/new-matchers/single_include/catch.hpp)

Please let me know what your thoughts or - including if this is no longer relevant for you so I'll not wait for you.

@webmaster128
Copy link
Contributor Author

Thanks for the update. Even though I always loved Catch, I don't work on a project using it right now. Thus I cannot put any efford in rewriting this matcher. Please feel free to reuse whatever you find here if it helps.

@philsquared
Copy link
Collaborator

Thanks for getting back. No worries at all. My main concern was whether I'd be breaking you.

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.

2 participants