Achieve 100% test coverage for src/utils.cpp (libddwaf)#481
Merged
Anilm3 merged 1 commit intoNov 6, 2025
Merged
Conversation
Co-authored-by: Anilm3 <[email protected]>
|
Bits AI Dev Agent Status: ✅ Done [Fix CI Errors] You can ask for changes by mentioning @DataDog in a comment. |
Anilm3
temporarily deployed
to
dd-protected-coverage
November 6, 2025 18:27 — with
GitHub Actions
Inactive
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## anilm3/attempt-fmt-binary-size-reduction #481 +/- ##
=========================================================================
Coverage 84.64% 84.64%
=========================================================================
Files 191 191
Lines 9266 9266
Branches 4219 4219
=========================================================================
Hits 7843 7843
Misses 527 527
Partials 896 896
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
🎯 Code Coverage 🔗 Commit SHA: c0e5340 | Docs | Datadog PR Page | Was this helpful? Give us feedback! |
Dynamic Artifact Size Comparison 📦
Static Artifact Size Comparison 📦
|
Anilm3
merged commit Nov 6, 2025
e88d389
into
anilm3/attempt-fmt-binary-size-reduction
64 of 65 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
for chat 620b3383-2fe5-4001-9c2c-ee8e9c73b277
You can ask for changes by mentioning @DataDog in a comment.
Feedback (especially what can be better) welcome in #code-gen-feedback!
Summary
This PR adds missing unit tests to achieve 100% patch coverage for
src/utils.cpp.Changes
Added two new test cases to
tests/unit/utils_test.cpp:SplitEmpty- Tests thesplit()function with an empty string input to ensure it returns an empty vectorConvertKeyPathEmpty- Tests theconvert_key_path()function with an empty vector input to ensure it returns an empty resultRationale
These edge case tests cover code paths that were previously untested, improving overall test coverage and ensuring the utility functions behave correctly with empty inputs.