leerho opened a new pull request, #577: URL: https://github.com/apache/datasketches-cpp/pull/577
The reported coverage has dropped to about 82%. Most of the drop is in how coverage is measured, not in the library. ## Stop counting Catch2 Since commit 94cf8a15 (July 2022), the tests fetch Catch2 into `build/_deps/`. The `coverage_report` target excludes only `*/test/*` and system headers, so `catch.hpp` has been counted as library code ever since. In the latest master report (98c6b742), it has 4,857 relevant lines, 3,163 of them missed. That is most of the 3,784 missed lines in the whole report. This PR adds `--exclude '*/_deps/*'` to the `lcov --capture` command. Without Catch2, the same report is 16,098 of 16,719 lines covered: **96.3% instead of 82.5%**, with no other change. ## Tests for the low spots in shared code | File | Before | What was missed | New test | |---|---|---|---| | `common/include/MurmurHash3.h` | 73% | The 16-byte block loop and the longer tails: no C++ test hashed an input of 16 bytes or more | `hash_test.cpp`: values from the Java `MurmurHash3` for 13 lengths from 1 to 63 bytes, covering every tail length | | `common/include/xxhash64.h` | 59% | The 32-byte block path, and input buffered across `add()` calls | `hash_test.cpp`: values from the Java `XxHash64` for 13 lengths from 0 to 100 bytes, the xxHash specification's vectors, and split inputs that must give the same hash as one call | | `cpc/include/cpc_confidence.hpp` | 50% | `get_icon_confidence_lb/ub`: the bounds of a union result, which come from the ICON estimate | `cpc_union_test.cpp`: estimate and bounds for kappa 1 to 3 against the Java `CpcUnion`, for lg_k 10 (measured error table) and 16 (constant) | | `common/include/serde.hpp` | 88% | The error paths for a failed stream | `serde_test.cpp`: failed writes and reads, with and without stream exceptions enabled, including a string read that fails after the first string was built | The Java values were computed with the DataSketches Java library (main), so these tests also check that C++ and Java agree on both hashes, including for inputs longer than one block, and on the CPC union bounds. With these tests, a local coverage build reports 100% of the lines in all four files. That adds about 86 covered lines, for roughly 96.8% overall once Catch2 is excluded. The remaining gaps are spread thin: about 535 lines over 100 files, no more than 59 in any one file. They are mostly error branches and rarely taken paths in the sketch implementations. The tests pass under ASan and UBSan. The PR merges cleanly with all open PRs. 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
