mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-21 15:55:02 +00:00
CPTreeNode.j: * Correct index calculations in insertObject:inChildNodesAtIndex: and replaceObjectInChildNodesAtIndex:withObject:. Nodes no longer misplace during same-parent or cross-parent moves. * Update _removeChildNode: to call removeObjectFromChildNodesAtIndex:. This ensures detaches notify childNodes observers on the original parent. CPTreeNodeTest.j: * Add test coverage for same-parent replacement, cycle rejection on replace-path, KVO during cross-parent moves, mutableChildNodes proxy operations, insertion bounds, non-recursive sorting, isLeaf, and descendantNodeAtIndexPath: edge cases. * Disable same-parent childNodes KVO test. CPKeyValueObserving.j coalesces nested change notifications on the same key, which drops the inner removal event. * Disable parentNode KVO test. No setParentNode: method exists to instrument. * Add inline comments to both disabled tests explaining these mechanisms.
Requires objj be installed, as well as ojunit, located at http://github.com/cappuccino/ojunit
Run individual tests using a command similar to the following:
objj ojunit/OJTestRunnerText.j cappuccino/Tests/Foundation/CPDateTest.j