Repository navigation
[core] Add essential unit tests for TMap - #23703
ravindra-RKB wants to merge 5 commits into
Conversation
Is this PR meant to be comprehensive? |
The “collision behavior” test could be enhanced to deliberately create a collision; it currently only checks Collisions() for ordinary keys. Also the ownership tests could cover both SetOwner() and SetOwnerValue() independently, or removal behavior when ownership is enabled. |
|
Thanks for the feedback @pcanal!
|
Test Results0 tests 0 ✅ 0s ⏱️ Results for commit 564e1bb. ♻️ This comment has been updated with latest results. |
|
Side note (if you did not already read it), check https://github.com/root-project/root/blob/master/CONTRIBUTING.md |
|
Thanks for pointing that out @pcanal. I've re-read CONTRIBUTING.md, particularly the guidelines on AI disclosure and testing standards. Regarding the previous test failure, my previous attempt tried forcing a small capacity ( I have updated the test with a helper class that returns a fixed hash value and overrides |
This Pull request:
Introduces essential unit tests for the
TMapassociative container incore/cont.Changes or fixes:
core/cont/test/TMapTest.cxxcovering:GetValue,operator(),FindObject)Remove(returning key) andRemoveEntry(returningTPair*)SetOwnervsSetOwnerValue), removal cleanup, andDeleteEntryRehashClear(),DeleteKeys(),DeleteValues(),DeleteAll(), and ownerClear()TIterTMapTestincore/cont/test/CMakeLists.txtChecklist: