-
Notifications
You must be signed in to change notification settings - Fork 0
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
Improve test and testutilities. #150
Conversation
ah this covers the commits from the other pull request? Can you close the other pull request if its obsolete then? |
most commit messages are too long, especially the first line. Try to hold 50 chars max! In some cases it might sense to go for up to 70 but only when theres no way to strip something off the line. |
other commits seem good on first glance except commit message ;) (trailing dot) |
Test utilities are a useful tool for every test, so automatically adding it to every test suite makes it easier for the user, so he need not to write everytime the test utilities dependency into the CMakeFiles.
testutilities.cpp itself points to the wrong header file.
Migrating from the old transformation_test functions to the new universal testutilities. The affected tests are: - Boost extensions test - Transformation::Translation test - Transformation::OrthogonalProjection test - Transformation::Custom test - Transformation::Identity test - Transformation::TransformationChain test
Because of the rebase of testimprove the whole tree get diverged and I must rebase it completely from ground up (also to apply your fixes). |
ac276de
to
d8ee524
Compare
Done. |
I hope I didn't forget something. I just realized that the discussions are also removed when force-pushing, before I thought to have seen that they will be kept. |
you forgot some trailing dots in commit shortlog here and there. would you mind correcting that before I continue review? |
So tested the BOOST_CHECK macros: make attempts an error (Error 2). |
sounds like it should. good then I'm in for this. |
Replace REQUIRE with CHECK, so tests do not abort and next features can be checked. Only construction tests remain REQUIRE because all other tests would fail if the tested object can't be constructed.
Saves writing boost::numeric::ublas::...
To check if two matrices/vectors are equal it's not neccessary to copy the content of it. Just check them in-place.
thats good looking commit messages! |
So everything settled for merge? |
Okay that should be all fixes. If you ack'ed them I'll rebase and merge some commits as you suggested. |
Move orthogonal depth projection class construction test to new test suite for this class. Orthogonal depth projection test has nothing lost in the test for orthogonal projection.
This function sets near zero values to absolute zero. Needed for testing and checking purposes.
The functions change to a generic version so that the functions are usable with different versions of the boost test assert macros. The BOOST_REQUIRE is not needed every time, sometimes BOOST_CHECK is the better alternative or even BOOST_WARN.
Add make_zero() function that makes near-zero values to absolute zero. This signature supports vector types.
Change test name because of multiple make_zero() function overloads.
Add @tparam for make_zero() functions for matrix and vector types.
This make_zero() function supports all numeric expressions and makes them to absolute zero if near zero.
Every index type can be accessed from the vector itself (via VectorType::size_type), so ModelIdxType is not needed anymore.
So you can see what changed (I will push more often the rebase-script when rebasing):
|
you can merge this after having squashed those commits I pointed out |
|
Ah damn... The optinal parameter should go away... |
Delete default parameter for function and create overload that passes seed from time in total seconds.
Use the new and more random RandomMatrix() function to have a more random and better test.
Improve the docs for `IsMatrixEqual()` and `IsVectorEqual()` + explain why used relative checking in function bodies and not absolute.
|
Also add make_zero() functions to make near zero values to absolute zero.
Needed for relative compares.