Skip to content

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

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

ravindra-RKB wants to merge 5 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

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Test Results

    24 files      24 suites   3d 13h 50m 49s ⏱️
 3 874 tests  3 845 ✅ 0 💤  29 ❌
76 401 runs  75 921 ✅ 0 💤 480 ❌

For more details on these failures, see this check.

Results for commit 5aa9bb6.

♻️ This comment has been updated with latest results.

@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

@ravindra-RKB

Copy link
Copy Markdown
Contributor Author

Hi @pcanal - just a gentle ping on this. The PR is approved and all TObjArray unit tests passed cleanly in CI. Could this be merged when you have a moment? Thank you!

@pcanal pcanal closed this Oct 21, 2026
@pcanal pcanal reopened this Oct 21, 2026
ravindra-RKB and others added 5 commits October 21, 2026 14:11
This has been adapted from root-project/roottest#686 by making
the test CMake based for platform independence.

Created with the help of AI: Claude Opus 5

Co-authored-by: Christian Tacke <58549698+ChristianTackeGSI@users.noreply.github.com>
The discrepancy was spotted by MAI-Code-1.1-Flash:

Skip logic is inconsistent between jobs
The build jobs check both the PR title and the skip ci label, but the event_file job
at root-ci.yml:692-708 only checks the title. That means a PR can be skipped in the
build jobs but still produce an event artifact, which is inconsistent and makes debugging harder.
@pcanal
pcanal force-pushed the feature-tobjarray-tests branch from 4cfbdaa to 5aa9bb6 Compare October 21, 2026 21:12
@ravindra-RKB

Copy link
Copy Markdown
Contributor Author

Hi @pcanal - I noticed the CI run after the recent update. Please let me know if there is anything needed from my end on TObjArray. Thank you!

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