CPArray insertObjects:atIndexes: fix
-
Francisco Tolmasky
- Milestone set to 0.6
It starts at CPNotFound because indexGreaterThanOrEqualToIndex: returns the first index if you pass in CPNotFound. Similarly we update the index in the access (objects[index++]), but this fixes the indexes vs anIndexSet mismatch so looks good to me. Could you possibly create a few test cases for this?
-
cacaodev
According to cocoa doc, Apple is using a for loop for this. So maybe it's better to follow to same pattern. I also added exceptions matching cocoa behavior.
We can also wait and make a patch later for all exceptions needed for similar methods (remove, replace ...).
-
Francisco Tolmasky
- Assigned user set to Francisco Tolmasky
OK, I went ahead and added a few test cases for this which required fixing isEqual: in CPArray. I also made a few minor stylistic changes, but it now looks ready to go, thanks!
-
admin (at 280north)
- State changed from new to resolved
(from [e1d57aac3b65c7b2b3614d0b0ac3b335b6b6536f]) Fix for broken insertObjects:atIndexes: and tests and isEqual.
[#136 CPArray insertObjects:atIndexes: fix state:resolved]
Reviewed by me. http://github.com/280north/cappu...
-
Francisco Tolmasky
I wasn't able to --author you since your patch didn't have a correct author field, could you look into that so we can start giving you credit?
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
