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 *_PRED_* tests: A predicate test that uses a provided function for comparing values #146

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

bluehazzard
Copy link

Uses a provided function that returns bool (or int in c) to compare provided test values

This is useful if you want compare some complex values, or for example a float in a range not only near a delta ecc...
See test case for examples

…r comparing values

Uses a provided function that returns bool to compare provided test values
@bluehazzard
Copy link
Author

This seems to be more complex than i thought... I can not test MS compiler locally, so it worked fine for me and i was thinking i can make a pull request.
Will try to fix the error tomorrow CET

Copy link
Owner

@sheredom sheredom left a comment

Choose a reason for hiding this comment

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

Seems generally useful! I wonder about the name of PRED, but can't think of anything better yet.

@bluehazzard
Copy link
Author

Ok, clang and gcc should now work. I can not test ms compilers and the automated test on appveyor seems to fail in places i did not modify?

'PRED' should be short for 'predicate'... the first thing went in my mind, it could probably also be called FUNC...

@sheredom
Copy link
Owner

MSVC on appveyor is failing because the oldest MSVCs I support (2008 & 2010) doesn't have support for lambdas I think. We'll need to gate those tests on newer MSVC versions.

@sheredom
Copy link
Owner

Yeah PRED is fine now I've bikeshedded for a while. I think its as descriptive as we can hope for.

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