-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
Background
The current approach for testing C++ libraries installed through task (e.g., Boost in PR #42) uses custom C++ programs with manual validation logic and error handling.
For example, in taskfiles/boost/test_boost.cpp, the current implementation:
- Uses a custom main function with manual command-line argument parsing
- Implements individual test functions that return boolean success/failure
- Manually tracks and reports different error codes for various test failures
Proposal
Replace the current custom testing approach with Catch2, a modern C++ test framework that would provide:
- Simpler test declarations with REQUIRE/CHECK macros
- Automatic test registration and discovery
- Better test output with clear failure messages
- Test sections and fixtures for better organization
- Built-in command-line parser with test filtering options
- Seamless integration with CI systems and test report generation
- Reduced boilerplate code
Implementation Steps
- Add a task to download and install Catch2 (similar to how Boost is installed)
- Update the test C++ programs to use Catch2's test macros and framework
- Modify the task running the tests to capture and report Catch2 test results
- Consider adding this as a standard approach for all C++ library testing tasks
This would standardize testing across all C++ libraries and make it easier to add new tests in the future.
References
Metadata
Metadata
Assignees
Labels
No labels