-
Notifications
You must be signed in to change notification settings - Fork 194
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
Using Catch2 instead of our custom unit test system #1575
Comments
👍 |
If it is doable without much effort, I would try to use catch 1 to avoid embedding a copy of the library (~500 kb) in YARP, as we could (at least in Ubuntu) use the version provided by apt : |
I wonder if to take advantage of the features provided by catch we need to refactor the tests anyway, instead of porting "as is". |
Porting "as is" is just enough to get everything working, I don't think a full refactor is needed. Also setting up a coverage infrastructure would be really useful |
I like "porting as is is just enough" 👍 |
About catch1, I made a quick test, everything seems compatible with catch from Debian, except for adding command line options (I used it in order to support the --yarp-verbose argument (verbose was already taken by catch), see drdanz/yarp_test_catch2@4b49f69 Also a FindCatch.cmake is required, since there is not one. @lornat75 If you really want some refactor, one improvement could be not using "impl" in unit tests, or separate public libraries and impl unit tests. In this way we could actually filter out impl symbols from the ABI |
Not blocking this activity in any way, but it may be worth mentioning that catch is not currently supporting parametrized tests, see catchorg/Catch2#850 . |
That's one limit in the Catch library, but I'll add that |
Probably a silly question, Catch seems a nice testing framework, but why we do not migrate to our testing framework?? |
RTF is not an "unit testing framework", it is an "integration test framework" (I just made up the two definitions) |
🤔 I see, probably RTF is an overkill for what we need. |
@traversaro catch1 from system is now supported in master 🙈 I added a check on |
An additional reason for this: I recently added a new test for libYARP_dev, and the test was not added to CTest until I removed the build directory and started a fresh build. |
THis was fixed long time ago. Closing |
I made some tests porting YARP unit tests to Catch2, see https://github.com/drdanz/yarp_test_catch2
Porting seems to be really quick and easy, and the code is cleaner. The library is just one header file.
I think it is worth porting.
What do you think?
The text was updated successfully, but these errors were encountered: