-
Notifications
You must be signed in to change notification settings - Fork 32
add new tests #167
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
Merged
Merged
add new tests #167
Conversation
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
flouthoc
requested changes
Dec 14, 2025
Collaborator
flouthoc
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.
@giuseppe tests fail on s390x
c55fee6 to
21f8c34
Compare
Member
Author
|
@flouthoc finally they pass |
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
The clone code for map types (mapStringString, etc.) was not checking if the source map was NULL before calling clone_map_string_string(). Since clone_map_string_string() returns NULL for NULL input, this was incorrectly treated as an error, causing clone operations to fail when any optional map field was not set. Wrap the clone call in a NULL check to handle optional map fields correctly. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
The generated clone functions did not check if the source pointer was NULL before accessing its members, causing a segfault when cloning NULL. Add a NULL check at the start of each clone function to return NULL immediately if src is NULL, matching the behavior of the free functions. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Add two new test files: test-12: Tests clone functionality including: - Clone round-trip verification (parse -> clone -> generate -> parse) - Clone independence (modifying clone doesn't affect original) - Present flags verification for numeric and boolean fields - Array cloning verification test-13: Tests error handling and edge cases including: - Invalid JSON parsing - Empty JSON object - Nonexistent file - NULL input handling - Empty arrays - Strings with special characters (newlines, tabs, quotes) - Large numbers - Clone and free of NULL pointers 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
When make distcheck fails, print the test-suite.log file to help diagnose test failures on CI. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
21f8c34 to
c7ce09d
Compare
flouthoc
approved these changes
Dec 15, 2025
Collaborator
flouthoc
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.
LGTM
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.
@flouthoc PTAL