utest.h
utest.h copied to clipboard
Add *_PRED_* tests: A predicate test that uses a provided function for comparing values
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
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
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...
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.
Yeah PRED
is fine now I've bikeshedded for a while. I think its as descriptive as we can hope for.