mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-12-05 04:05:34 +00:00
Fixed CPTableViewTest which was both broken and unfinished.
This commit is contained in:
1 parent
0067bd0d16
commit
22a185b52e
1 file changed
+26
-9
@@ -2,23 +2,40 @@
|
||||
|
||||
@implementation CPTableViewTest : OJTestCase
|
||||
{
|
||||
CPTableView tableView;
|
||||
CPTableColumn tableColumn;
|
||||
|
||||
BOOL doubleActionReceived;
|
||||
}
|
||||
|
||||
- (void)setUp
|
||||
{
|
||||
// setup a reasonable table
|
||||
_tableView = [[CPTableView alloc] initWithFrame:CGRectMakeZero()];
|
||||
_tableColumn = [[CPTableColumn alloc] initWithIdentifier:@"Foo"];
|
||||
[_tableView addTableColumn:_tableColumn];
|
||||
tableView = [[CPTableView alloc] initWithFrame:CGRectMake(0, 0, 100, 100)];
|
||||
tableColumn = [[CPTableColumn alloc] initWithIdentifier:@"Foo"];
|
||||
[tableView addTableColumn:tableColumn];
|
||||
}
|
||||
/*
|
||||
// Failing test for issue 112, See:http://github.com/280north/cappuccino/issues/#issue/112
|
||||
|
||||
- (void)testCPTableDoubleAction
|
||||
{
|
||||
doubleActionReceived = NO;
|
||||
|
||||
[tableView setTarget:self];
|
||||
[tableView setDoubleAction:@selector(doubleAction:)];
|
||||
|
||||
// CPEvent with 2 clickCount
|
||||
var dblClk = [CPEvent mouseEventWithType:CPLeftMouseUp location:CGPointMakeZero() modifierFlags:0
|
||||
var dblClk = [CPEvent mouseEventWithType:CPLeftMouseUp location:CGPointMake(50, 50) modifierFlags:0
|
||||
timestamp:0 windowNumber:0 context:nil eventNumber:0 clickCount:2 pressure:0];
|
||||
|
||||
[_tableView trackSelection:dblClk];
|
||||
|
||||
[[CPApplication sharedApplication] sendEvent:dblClk];
|
||||
[tableView trackMouse:dblClk];
|
||||
|
||||
[self assertTrue:doubleActionReceived];
|
||||
}
|
||||
*/
|
||||
|
||||
- (void)doubleAction:(id)sender
|
||||
{
|
||||
doubleActionReceived = YES;
|
||||
}
|
||||
|
||||
@end
|
||||
Reference in new issue
Block a user