WIP: both the code and the following motivations will be updated with new information obtained during research and through feedback from reviewers.
Motivation
By migrating the unit tests from Boost to Google Test we can increase the chances of removing all dependencies from Boost in the future.
Benefits of Google Test
- Most used C++ testing framework with a large community
- Includes Google Mock for creating mock objects
- Similar syntax to Boost, making refactor simpler
- Google Test is thread-safe on systems where the pthread library is available, Boost.Test is not thread-safe.
- Outputs currently running tests (see #8670)
Disadvantages of Google Test
- Potential future dependency on Abseil, as stated in Google Test's main README
TODO
- Verify whether Google Test meets all or some of the required features discussed in PR #8670
- Check if the refactor can be done via scripted diffs: some replacement are trivial, but some changes are not. I don't know if we can create an hygienic commit using scripted-diffs.
- Evaluate alternative testing frameworks, such as Catch2
- Complete the code migration (currently only some tests have been refactored)