-
Notifications
You must be signed in to change notification settings - Fork 14
Coverage #122
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
Coverage #122
Conversation
f7f3d20 to
40045f2
Compare
| @@ -0,0 +1,54 @@ | |||
| #include <gtest/gtest.h> | |||
| #include "../../source/coverage/coverage_wrappers.hpp" | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use absolute path instead
orange-cpp
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need fo fix some stuff
| @@ -0,0 +1,14 @@ | |||
| #include <gtest/gtest.h> | |||
| #include "../../source/coverage/coverage_wrappers.hpp" | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use absolute path instead
| @@ -0,0 +1,62 @@ | |||
| #include <gtest/gtest.h> | |||
| #include "../../source/coverage/coverage_wrappers.hpp" | |||
|
|
|||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use absolute path instead
| @@ -0,0 +1,12 @@ | |||
| #include <gtest/gtest.h> | |||
| #include "../../source/coverage/coverage_wrappers.hpp" | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use absolute path instead
095e2ff to
97b5d4c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds comprehensive code coverage infrastructure for the project, integrating Clang-based coverage reporting with CI/CD and introducing extensive test coverage improvements.
Key Changes:
- Implements Clang/LLVM coverage tooling with HTML and LCOV output generation
- Adds coverage coalescer tool to merge duplicate coverage entries from header-only code
- Introduces 50+ new test files covering linear algebra, collision detection, pattern scanning, and utility components
- Integrates coverage reporting into GitHub Actions CI for x64-linux builds
Reviewed changes
Copilot reviewed 53 out of 74 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/coverage_coalescer.cpp | New tool to merge duplicate coverage entries from header files |
| scripts/run_clang_coverage.sh | Shell script orchestrating Clang coverage build and report generation |
| cmake/Coverage.cmake | CMake module configuring coverage flags and targets |
| tests/general/*.cpp | 30+ new test files adding coverage for vectors, matrices, collision, pattern scanning |
| source/coverage/*.cpp | Helper files forcing template instantiation for coverage attribution |
| .github/workflows/cmake-multi-platform.yml | CI integration running coverage on x64-linux and uploading to Coveralls |
| include/omath/utility/pattern_scan.hpp | Fixed off-by-one error in pattern scanning loop |
| include/omath/utility/color.hpp | Fixed unreachable code in formatter |
| CMakeLists.txt | Added OMATH_ENABLE_COVERAGE option and coverage configuration |
Comments suppressed due to low confidence (2)
tools/coverage_coalescer.cpp:1
- Using
#include <bits/stdc++.h>is a non-standard GCC internal header that includes the entire C++ standard library. This is not portable and significantly increases compilation time. Replace with specific standard headers needed (e.g.,<iostream>,<fstream>,<vector>,<string>,<map>,<unordered_map>,<sstream>,<algorithm>).
tests/general/unit_test_color.cpp:1 - The test fixture class is named
unit_test_colorwhich does not follow typical naming conventions for test fixtures. Consider renaming toUnitTestColororColorTestto match standard C++ naming conventions for classes and align with other test fixtures in the codebase likeUnitTestColorGrouped.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Looking for somewhat coverage test on linux and to be integrated to CI further on.
To run coverage build
NO_AVX=1 ./scripts/run_clang_coverage.sh build/clang-coverage-lcovand go web-browser tofile:///home/admin/omath/build/clang-coverage-lcov/coverage/lcov-html/source/coverage/index.html