mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-08-25 21:17:03 +00:00
Merge branch 'master' of https://github.com/cappuccino/cappuccino into objj_compiler2
This commit is contained in:
@@ -1,3 +1,24 @@
|
||||
/*
|
||||
* CPTreeNode.j
|
||||
* AppKit
|
||||
*
|
||||
* Created by Francisco Tolmasky.
|
||||
* Copyright 2009, 280 North, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
@import <Foundation/CPObject.j>
|
||||
@import <Foundation/CPIndexPath.j>
|
||||
|
||||
@@ -91,7 +91,6 @@ var globalResults = [];
|
||||
|
||||
- (void)testRunModalForWindow
|
||||
{
|
||||
var aWindow = [[CPWindow alloc] init];
|
||||
[app runModalForWindow:aWindow];
|
||||
|
||||
[self assertTrue:[aWindow isKeyWindow] message:@"A window must be made key when it's run modally"];
|
||||
|
||||
@@ -181,7 +181,7 @@
|
||||
|
||||
- (void)testTypeMasks
|
||||
{
|
||||
var button = [[CPButton alloc] initWithFrame:CGRectMakeZero()];
|
||||
button = [[CPButton alloc] initWithFrame:CGRectMakeZero()];
|
||||
|
||||
// The default mask should be that of CPMomentaryPushInButton.
|
||||
[self assert:CPPushInButtonMask | CPGrayButtonMask | CPBackgroundButtonMask equals:[button highlightsBy]];
|
||||
|
||||
@@ -154,8 +154,9 @@
|
||||
- (void)testTableColumn
|
||||
{
|
||||
var tableView = [CPTableView new],
|
||||
tableColumn = [[CPTableColumn alloc] initWithIdentifier:"A Column"],
|
||||
arrayController = [CPArrayController new];
|
||||
tableColumn = [[CPTableColumn alloc] initWithIdentifier:"A Column"];
|
||||
|
||||
arrayController = [CPArrayController new];
|
||||
|
||||
[tableView addTableColumn:tableColumn];
|
||||
|
||||
@@ -401,4 +402,4 @@
|
||||
return valueB;
|
||||
}
|
||||
|
||||
@end
|
||||
@end
|
||||
|
||||
@@ -243,9 +243,10 @@
|
||||
- (void)testContentBinding
|
||||
{
|
||||
var contentBindingTable = [[CPTableView alloc] initWithFrame:CGRectMake(0, 0, 100, 100)],
|
||||
tableColumn = [[CPTableColumn alloc] initWithIdentifier:@"A"],
|
||||
delegate = [ContentBindingTableDelegate new];
|
||||
|
||||
tableColumn = [[CPTableColumn alloc] initWithIdentifier:@"A"];
|
||||
|
||||
[contentBindingTable addTableColumn:tableColumn];
|
||||
[delegate setTester:self];
|
||||
[contentBindingTable setDelegate:delegate];
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
|
||||
- (void)testDirectIVarObservation
|
||||
{
|
||||
var bob = [[PersonTester alloc] init];
|
||||
bob = [[PersonTester alloc] init];
|
||||
|
||||
[bob addObserver:self forKeyPath:@"phoneNumber" options:nil context:@"testDirectIVarObservation"];
|
||||
|
||||
@@ -446,8 +446,9 @@
|
||||
|
||||
- (void)testSettersReplacedOnce
|
||||
{
|
||||
var bob = [[PersonTester alloc] init],
|
||||
betty = [CPObject new];
|
||||
var betty = [CPObject new];
|
||||
|
||||
bob = [[PersonTester alloc] init];
|
||||
|
||||
[bob addObserver:self forKeyPath:@"name" options:nil context:@"testSettersReplacedOnce"];
|
||||
|
||||
@@ -470,7 +471,7 @@
|
||||
|
||||
- (void)testNestedNotifications
|
||||
{
|
||||
var bob = [[PersonTester alloc] init];
|
||||
bob = [[PersonTester alloc] init];
|
||||
|
||||
[bob willChangeValueForKey:@"name"];
|
||||
[self assertTrue:bob._willChangeMessageCounter[@"name"] === 1];
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
|
||||
@implementation CPSetTest : OJTestCase
|
||||
{
|
||||
CPSet set;
|
||||
}
|
||||
|
||||
- (void)assertSet:(CPSet)aSet onlyHasObjects:(CPArray)objects
|
||||
|
||||
@@ -22,13 +22,13 @@ function cleanup() {
|
||||
var status;
|
||||
|
||||
status = OS.system(["capp", "gen", "ToolsTestApp"].map(OS.enquote).join(" ") + " > /dev/null");
|
||||
[self assert:status equals:0 message:"capp gen failed"];
|
||||
[self assert:0 equals:status message:"capp gen failed"];
|
||||
|
||||
status = OS.system(["press", "-f", "ToolsTestApp", "PressTestApp"].map(OS.enquote).join(" ") + " > /dev/null");
|
||||
[self assert:status equals:0 message:"press failed"];
|
||||
[self assert:0 equals:status message:"press failed"];
|
||||
|
||||
status = OS.system(["flatten", "-f", "ToolsTestApp", "FlattenTestApp"].map(OS.enquote).join(" ") + " > /dev/null");
|
||||
[self assert:status equals:0 message:"flatten failed"];
|
||||
[self assert:0 equals:status message:"flatten failed"];
|
||||
}
|
||||
|
||||
- (void)tearDown
|
||||
|
||||
Reference in New Issue
Block a user