Skip to content

[core] Add essential unit tests for TObjArray - #23680

Open
ravindra-RKB wants to merge 3 commits into
root-project:masterfrom
ravindra-RKB:feature-tobjarray-tests
Open

ravindra-RKB wants to merge 3 commits into
root-project:masterfrom
ravindra-RKB:feature-tobjarray-tests

Conversation

@ravindra-RKB

Copy link
Copy Markdown
Contributor

This PR introduces essential unit tests for the TObjArray collection class to the core/cont module. It verifies common operations like appending, inserting, removing, and iterating over objects within the array, ensuring long-term stability and correctness for this fundamental container against the ROOT test framework.

Checklist

  • tested changes locally
  • updated the docs (if necessary)

Comment thread core/cont/test/TObjArrayTest.cxx
Comment thread core/cont/test/TObjArrayTest.cxx Outdated

@pcanal pcanal left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is good start. Thanks.

@ravindra-RKB

Copy link
Copy Markdown
Contributor Author

Thanks for the review @pcanal! I've updated the tests with:

  • Checks for removing middle and last elements with RemoveAt, along with Compress().
  • A TrackObject class to verify allocation/deallocation behavior between Clear() and Delete().

@github-actions

Copy link
Copy Markdown

Test Results

    24 files      24 suites   4d 6h 32m 12s ⏱️
 3 887 tests  3 846 ✅ 0 💤 41 ❌
83 204 runs  83 141 ✅ 2 💤 61 ❌

For more details on these failures, see this check.

Results for commit f71dd8c.

@ravindra-RKB

Copy link
Copy Markdown
Contributor Author

Hi @pcanal, just a gentle ping on this. The requested test enhancements have been added and all TObjArray unit tests are passing cleanly across platforms. Whenever you have a moment, please let me know if anything else is needed or if this is ready to merge.

@pcanal pcanal closed this Oct 15, 2026
@pcanal pcanal reopened this Oct 15, 2026
@pcanal

pcanal commented Oct 15, 2026

Copy link
Copy Markdown
Member

Closing and Reopening to rebase the CI tests

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants