Files
cappuccino/Tests/AppKit/CPTreeNodeTest.j
T
David Richardson 7aebf371e9 Back out CPTreeNodeTest for addition under separate PR
GitHub CI uses existing CPTreeNodeTest and fails when new tests are included.

New tests must be added as a separate PR, independently of the changes in CPTreeNode.j
2026-08-19 10:31:15 -06:00

32 lines
776 B
Plaintext

@import <AppKit/CPTreeNode.j>
@implementation CPTreeNodeTest : OJTestCase
{
CPTreeNode treeNode;
CPTreeNode childNode;
}
- (void)setUp
{
// This will init the global var CPApp which are used internally in the AppKit
[[CPApplication alloc] init];
treeNode = [CPTreeNode treeNodeWithRepresentedObject:nil];
childNode = [CPTreeNode treeNodeWithRepresentedObject:nil];
[treeNode insertObject:childNode inChildNodesAtIndex:0];
}
- (void)testDescendantNodeAtIndexPath
{
var indexPath = [CPIndexPath indexPathWithIndex:0];
[self assert:childNode equals:[treeNode descendantNodeAtIndexPath:indexPath]];
indexPath = [CPIndexPath indexPathWithIndex:1];
[self assert:nil equals:[treeNode descendantNodeAtIndexPath:indexPath]];
}
@end