mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-09 18:30:59 +00:00
Merge branch 'master' into NEW--CPTextView
This commit is contained in:
commit
88aafec6e3
47 files changed
+286
-69
No files matched your search
@@ -1,8 +1,6 @@
|
||||
@import <AppKit/CPApplication.j>
|
||||
@import <AppKit/CPAnimation.j>
|
||||
|
||||
[CPApplication sharedApplication];
|
||||
|
||||
@implementation CPAnimation (TestMethods)
|
||||
{
|
||||
}
|
||||
@@ -18,11 +16,17 @@
|
||||
{
|
||||
}
|
||||
|
||||
+ (void)setUp
|
||||
{
|
||||
// This will init the global var CPApp which are used internally in the AppKit
|
||||
[[CPApplication alloc] init];
|
||||
}
|
||||
|
||||
- (void)testScheduleTimerWithIntervalBasedOnDefaultFrameRate
|
||||
{
|
||||
var animation = [[CPAnimation alloc] initWithDuration:0.1 animationCurve:CPAnimationLinear];
|
||||
[animation startAnimation];
|
||||
|
||||
|
||||
[self assert:1.0/60.0 equals:[[animation timer] timeInterval]];
|
||||
}
|
||||
|
||||
@@ -31,7 +35,7 @@
|
||||
var animation = [[CPAnimation alloc] initWithDuration:0.1 animationCurve:CPAnimationLinear];
|
||||
[animation setFrameRate:30];
|
||||
[animation startAnimation];
|
||||
|
||||
|
||||
[self assert:1.0/30.0 equals:[[animation timer] timeInterval]];
|
||||
}
|
||||
|
||||
@@ -40,7 +44,7 @@
|
||||
var animation = [[CPAnimation alloc] initWithDuration:0.1 animationCurve:CPAnimationLinear];
|
||||
[animation setFrameRate:0];
|
||||
[animation startAnimation];
|
||||
|
||||
|
||||
[self assert:0.0001 equals:[[animation timer] timeInterval]];
|
||||
}
|
||||
|
||||
|
||||
@@ -61,6 +61,12 @@ var globalResults = [];
|
||||
CPWindow aWindow;
|
||||
}
|
||||
|
||||
+ (void)setUp
|
||||
{
|
||||
// This will init the global var CPApp which are used internally in the AppKit
|
||||
[[CPApplication alloc] init];
|
||||
}
|
||||
|
||||
- (void)setUp
|
||||
{
|
||||
// This sets up the CPApp convenience variable, the unit tests fails
|
||||
|
||||
@@ -6,6 +6,15 @@ var ELEMENTS = 200,
|
||||
REPEATS = 25;
|
||||
|
||||
@implementation CPArrayControllerPerformance : OJTestCase
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
+ (void)setUp
|
||||
{
|
||||
// This will init the global var CPApp which are used internally in the AppKit
|
||||
[[CPApplication alloc] init];
|
||||
}
|
||||
|
||||
- (CPArrayController)setupWithElements:(int)aCount
|
||||
{
|
||||
|
||||
@@ -18,6 +18,12 @@
|
||||
CPArray depValues @accessors;
|
||||
}
|
||||
|
||||
+ (void)setUp
|
||||
{
|
||||
// This will init the global var CPApp which are used internally in the AppKit
|
||||
[[CPApplication alloc] init];
|
||||
}
|
||||
|
||||
- (CPArray)makeTestArray
|
||||
{
|
||||
return [[Employee employeeWithName:@"Francisco" department:[Department departmentWithName:@"Cappuccino"]],
|
||||
|
||||
@@ -1,15 +1,18 @@
|
||||
@import <Foundation/Foundation.j>
|
||||
@import <AppKit/AppKit.j>
|
||||
|
||||
[CPApplication sharedApplication];
|
||||
|
||||
|
||||
@implementation CPAutosizePerformance : OJTestCase
|
||||
{
|
||||
CPInteger NUMBER_OF_VIEWS;
|
||||
CPInteger RESIZES_COUNT;
|
||||
}
|
||||
|
||||
+ (void)setUp
|
||||
{
|
||||
// This will init the global var CPApp which are used internally in the AppKit
|
||||
[[CPApplication alloc] init];
|
||||
}
|
||||
|
||||
- (void)setUp
|
||||
{
|
||||
NUMBER_OF_VIEWS = 50;
|
||||
|
||||
@@ -2,13 +2,18 @@
|
||||
|
||||
@class CPBrowserDelegate
|
||||
|
||||
|
||||
@implementation CPBrowserTest : OJTestCase
|
||||
{
|
||||
CPBrowser browser;
|
||||
CPBrowserDelegate delegate;
|
||||
}
|
||||
|
||||
+ (void)setUp
|
||||
{
|
||||
// This will init the global var CPApp which are used internally in the AppKit
|
||||
[[CPApplication alloc] init];
|
||||
}
|
||||
|
||||
- (void)setUp
|
||||
{
|
||||
browser = [[CPBrowser alloc] initWithFrame:CGRectMake(0, 0, 500, 300)];
|
||||
|
||||
@@ -1,16 +1,19 @@
|
||||
|
||||
@import <AppKit/CPButton.j>
|
||||
@import <AppKit/CPApplication.j>
|
||||
@import <AppKit/CPText.j>
|
||||
|
||||
[CPApplication sharedApplication];
|
||||
|
||||
@implementation CPButtonTest : OJTestCase
|
||||
{
|
||||
CPButton button;
|
||||
BOOL wasClicked;
|
||||
}
|
||||
|
||||
+ (void)setUp
|
||||
{
|
||||
// This will init the global var CPApp which are used internally in the AppKit
|
||||
[[CPApplication alloc] init];
|
||||
}
|
||||
|
||||
- (void)setUp
|
||||
{
|
||||
button = [CPButton buttonWithTitle:"hello world"];
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
@import <AppKit/CPCheckBox.j>
|
||||
|
||||
[CPApplication sharedApplication]
|
||||
|
||||
@implementation CPCheckBoxTest : OJTestCase
|
||||
{
|
||||
}
|
||||
|
||||
+ (void)setUp
|
||||
{
|
||||
// This will init the global var CPApp which are used internally in the AppKit
|
||||
[[CPApplication alloc] init];
|
||||
}
|
||||
|
||||
/*!
|
||||
Verify that CPCheckBox placeholders work, both explicit and default ones.
|
||||
*/
|
||||
|
||||
@@ -7,6 +7,12 @@
|
||||
id _globalResults;
|
||||
}
|
||||
|
||||
+ (void)setUp
|
||||
{
|
||||
// This will init the global var CPApp which are used internally in the AppKit
|
||||
[[CPApplication alloc] init];
|
||||
}
|
||||
|
||||
- (void)setUp
|
||||
{
|
||||
_collectionView = [[CPCollectionView alloc] initWithFrame:CGRectMakeZero()];
|
||||
|
||||
@@ -4,6 +4,12 @@
|
||||
{
|
||||
}
|
||||
|
||||
+ (void)setUp
|
||||
{
|
||||
// This will init the global var CPApp which are used internally in the AppKit
|
||||
[[CPApplication alloc] init];
|
||||
}
|
||||
|
||||
- (void)testHexStringConversion
|
||||
{
|
||||
var colors = ['000000', '0099CC', '7E8EAB', 'FFFFFF'];
|
||||
|
||||
@@ -1,13 +1,17 @@
|
||||
@import <AppKit/CPColorWell.j>
|
||||
@import <AppKit/CPApplication.j>
|
||||
|
||||
[CPApplication sharedApplication];
|
||||
|
||||
@implementation CPColorWellTest : OJTestCase
|
||||
{
|
||||
CPColorWell colorWell;
|
||||
}
|
||||
|
||||
+ (void)setUp
|
||||
{
|
||||
// This will init the global var CPApp which are used internally in the AppKit
|
||||
[[CPApplication alloc] init];
|
||||
}
|
||||
|
||||
- (void)setUp
|
||||
{
|
||||
colorWell = [[CPColorWell alloc] initWithFrame:CGRectMakeZero()];
|
||||
|
||||
@@ -4,14 +4,18 @@
|
||||
|
||||
@import "CPNotificationCenterHelper.j"
|
||||
|
||||
[CPApplication sharedApplication];
|
||||
|
||||
@implementation CPComboBoxTest : OJTestCase
|
||||
{
|
||||
CPComboBox comboBox;
|
||||
BOOL wasClicked
|
||||
}
|
||||
|
||||
+ (void)setUp
|
||||
{
|
||||
// This will init the global var CPApp which are used internally in the AppKit
|
||||
[[CPApplication alloc] init];
|
||||
}
|
||||
|
||||
- (void)setUp
|
||||
{
|
||||
comboBox = [[CPComboBox alloc] initWithFrame:CGRectMake(0, 0, 200, 30)];
|
||||
|
||||
@@ -8,6 +8,12 @@
|
||||
BOOL aTransform;
|
||||
}
|
||||
|
||||
+ (void)setUp
|
||||
{
|
||||
// This will init the global var CPApp which are used internally in the AppKit
|
||||
[[CPApplication alloc] init];
|
||||
}
|
||||
|
||||
- (void)setUp
|
||||
{
|
||||
// set up a dummy DOM element.
|
||||
|
||||
@@ -4,13 +4,18 @@
|
||||
@import <AppKit/CPApplication.j>
|
||||
@import <Foundation/Foundation.j>
|
||||
|
||||
[CPApplication sharedApplication];
|
||||
|
||||
@implementation CPDatePickerTest : OJTestCase
|
||||
{
|
||||
CPDatePicker datePicker;
|
||||
}
|
||||
|
||||
+ (void)setUp
|
||||
{
|
||||
// This will init the global var CPApp which are used internally in the AppKit
|
||||
[[CPApplication alloc] init];
|
||||
}
|
||||
|
||||
- (void)setUp
|
||||
{
|
||||
datePicker = [[CPDatePicker alloc] initWithFrame:CGRectMake(200, 28, 0, 0)];
|
||||
|
||||
@@ -5,10 +5,10 @@
|
||||
{
|
||||
}
|
||||
|
||||
- (void)setUp
|
||||
+ (void)setUp
|
||||
{
|
||||
// CPApplication must be initialised for some event handling to work.
|
||||
[CPApplication sharedApplication];
|
||||
// This will init the global var CPApp which are used internally in the AppKit
|
||||
[[CPApplication alloc] init];
|
||||
}
|
||||
|
||||
/*!
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
@import <AppKit/AppKit.j>
|
||||
|
||||
[CPApplication sharedApplication];
|
||||
|
||||
@implementation CPFontManagerTest : OJTestCase
|
||||
{
|
||||
CPFont fontA;
|
||||
@@ -12,6 +10,12 @@
|
||||
int tag @accessors;
|
||||
}
|
||||
|
||||
+ (void)setUp
|
||||
{
|
||||
// This will init the global var CPApp which are used internally in the AppKit
|
||||
[[CPApplication alloc] init];
|
||||
}
|
||||
|
||||
- (void)setUp
|
||||
{
|
||||
fontA = [CPFont systemFontOfSize:8.0];
|
||||
|
||||
@@ -9,6 +9,12 @@
|
||||
CPFont _boldCustomFont;
|
||||
}
|
||||
|
||||
+ (void)setUp
|
||||
{
|
||||
// This will init the global var CPApp which are used internally in the AppKit
|
||||
[[CPApplication alloc] init];
|
||||
}
|
||||
|
||||
- (void)setUp
|
||||
{
|
||||
_systemFont = [CPFont systemFontOfSize:15];
|
||||
|
||||
@@ -4,6 +4,12 @@
|
||||
{
|
||||
}
|
||||
|
||||
+ (void)setUp
|
||||
{
|
||||
// This will init the global var CPApp which are used internally in the AppKit
|
||||
[[CPApplication alloc] init];
|
||||
}
|
||||
|
||||
- (void)testInitWithContentsOfFile_nil
|
||||
{
|
||||
var image = [[CPImage alloc] initWithContentsOfFile:nil];
|
||||
|
||||
@@ -3,9 +3,16 @@
|
||||
@import <AppKit/CPEvent.j>
|
||||
@import <AppKit/CPButton.j>
|
||||
|
||||
[CPApplication sharedApplication];
|
||||
|
||||
@implementation CPKeyEquivalentPerformance : OJTestCase
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
+ (void)setUp
|
||||
{
|
||||
// This will init the global var CPApp which are used internally in the AppKit
|
||||
[[CPApplication alloc] init];
|
||||
}
|
||||
|
||||
- (void)testKeyEquivalentSpeed
|
||||
{
|
||||
|
||||
@@ -18,11 +18,14 @@
|
||||
CPObjectController objectController @accessors;
|
||||
}
|
||||
|
||||
+ (void)setUp
|
||||
{
|
||||
// This will init the global var CPApp which are used internally in the AppKit
|
||||
[[CPApplication alloc] init];
|
||||
}
|
||||
|
||||
- (void)setUp
|
||||
{
|
||||
// CPApp must be initialised or action sending will not work.
|
||||
[CPApplication sharedApplication];
|
||||
|
||||
track = [Track new];
|
||||
[track setVolume:5.0];
|
||||
}
|
||||
|
||||
@@ -21,6 +21,12 @@
|
||||
CPArrayController arrayController @accessors;
|
||||
}
|
||||
|
||||
+ (void)setUp
|
||||
{
|
||||
// This will init the global var CPApp which are used internally in the AppKit
|
||||
[[CPApplication alloc] init];
|
||||
}
|
||||
|
||||
- (void)testExposingBindings
|
||||
{
|
||||
[BindingTester exposeBinding:@"foo"];
|
||||
|
||||
@@ -7,6 +7,12 @@
|
||||
{
|
||||
}
|
||||
|
||||
+ (void)setUp
|
||||
{
|
||||
// This will init the global var CPApp which are used internally in the AppKit
|
||||
[[CPApplication alloc] init];
|
||||
}
|
||||
|
||||
+ (CPLevelIndicator)indicatorWithLowWarning
|
||||
{
|
||||
var levelIndicator = [[CPLevelIndicator alloc] initWithFrame:CGRectMake(0, 0, 100, 100)];
|
||||
@@ -44,7 +50,7 @@
|
||||
|
||||
[levelIndicator setObjectValue:4];
|
||||
[[CPRunLoop currentRunLoop] limitDateForMode:CPDefaultRunLoopMode];
|
||||
|
||||
|
||||
[self assert:[CPColor yellowColor] equals:[GET_LEVEL_INDICATOR_SEGMENT(levelIndicator, 0) backgroundColor]];
|
||||
}
|
||||
|
||||
@@ -54,7 +60,7 @@
|
||||
|
||||
[levelIndicator setObjectValue:2];
|
||||
[[CPRunLoop currentRunLoop] limitDateForMode:CPDefaultRunLoopMode];
|
||||
|
||||
|
||||
[self assert:[CPColor redColor] equals:[GET_LEVEL_INDICATOR_SEGMENT(levelIndicator, 0) backgroundColor]];
|
||||
}
|
||||
|
||||
@@ -74,7 +80,7 @@
|
||||
|
||||
[levelIndicator setObjectValue:6];
|
||||
[[CPRunLoop currentRunLoop] limitDateForMode:CPDefaultRunLoopMode];
|
||||
|
||||
|
||||
[self assert:[CPColor yellowColor] equals:[GET_LEVEL_INDICATOR_SEGMENT(levelIndicator, 0) backgroundColor]];
|
||||
}
|
||||
|
||||
@@ -84,7 +90,7 @@
|
||||
|
||||
[levelIndicator setObjectValue:8];
|
||||
[[CPRunLoop currentRunLoop] limitDateForMode:CPDefaultRunLoopMode];
|
||||
|
||||
|
||||
[self assert:[CPColor redColor] equals:[GET_LEVEL_INDICATOR_SEGMENT(levelIndicator, 0) backgroundColor]];
|
||||
}
|
||||
@end
|
||||
@@ -1,10 +1,8 @@
|
||||
|
||||
@import <AppKit/CPMenu.j>
|
||||
@import <AppKit/CPMenuItem.j>
|
||||
@import <AppKit/CPApplication.j>
|
||||
@import <AppKit/CPText.j>
|
||||
|
||||
[CPApplication sharedApplication]
|
||||
|
||||
@implementation CPMenuTest : OJTestCase
|
||||
{
|
||||
@@ -19,6 +17,12 @@
|
||||
CPMenuItem anInstantiatedMenuItem;
|
||||
}
|
||||
|
||||
+ (void)setUp
|
||||
{
|
||||
// This will init the global var CPApp which are used internally in the AppKit
|
||||
[[CPApplication alloc] init];
|
||||
}
|
||||
|
||||
- (void)setUp
|
||||
{
|
||||
// Set up a fairly complete menu to have something to work with.
|
||||
|
||||
@@ -9,6 +9,12 @@ var CPMenuValidatedUserInterfaceItemTestValidatedItems = [];
|
||||
MenuTarget _menuTarget @accessors(property=menuTarget);
|
||||
}
|
||||
|
||||
+ (void)setUp
|
||||
{
|
||||
// This will init the global var CPApp which are used internally in the AppKit
|
||||
[[CPApplication alloc] init];
|
||||
}
|
||||
|
||||
- (void)setUp
|
||||
{
|
||||
_menuTarget = [[MenuTarget alloc] init];
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
@class TestOutlineDataSource
|
||||
|
||||
|
||||
@implementation CPOutlineViewTest : OJTestCase
|
||||
{
|
||||
CPOutlineView outlineView;
|
||||
@@ -10,6 +9,12 @@
|
||||
TestOutlineDataSource dataSource;
|
||||
}
|
||||
|
||||
+ (void)setUp
|
||||
{
|
||||
// This will init the global var CPApp which are used internally in the AppKit
|
||||
[[CPApplication alloc] init];
|
||||
}
|
||||
|
||||
- (void)setUp
|
||||
{
|
||||
outlineView = [[CPOutlineView alloc] initWithFrame:CGRectMake(0, 0, 100, 100)];
|
||||
|
||||
@@ -6,6 +6,12 @@
|
||||
{
|
||||
}
|
||||
|
||||
+ (void)setUp
|
||||
{
|
||||
// This will init the global var CPApp which are used internally in the AppKit
|
||||
[[CPApplication alloc] init];
|
||||
}
|
||||
|
||||
- (void)testSetString_forType_
|
||||
{
|
||||
var pboard = [CPPasteboard generalPasteboard];
|
||||
|
||||
@@ -9,6 +9,12 @@
|
||||
id objects @accessors;
|
||||
}
|
||||
|
||||
+ (void)setUp
|
||||
{
|
||||
// This will init the global var CPApp which are used internally in the AppKit
|
||||
[[CPApplication alloc] init];
|
||||
}
|
||||
|
||||
- (void)setUp
|
||||
{
|
||||
button = [CPPopUpButton new];
|
||||
|
||||
@@ -6,6 +6,12 @@
|
||||
CPPredicateEditor _editor;
|
||||
}
|
||||
|
||||
+ (void)setUp
|
||||
{
|
||||
// This will init the global var CPApp which are used internally in the AppKit
|
||||
[[CPApplication alloc] init];
|
||||
}
|
||||
|
||||
- (void)setUp
|
||||
{
|
||||
_editor = [[CPPredicateEditor alloc] initWithFrame:CGRectMakeZero()];
|
||||
|
||||
@@ -4,14 +4,18 @@
|
||||
|
||||
@import <AppKit/CPPlatformWindow+DOMKeys.j>
|
||||
|
||||
[CPApplication sharedApplication]
|
||||
|
||||
@implementation CPResponderTest : OJTestCase
|
||||
{
|
||||
CPWindow theWindow;
|
||||
CPResponder responder;
|
||||
}
|
||||
|
||||
+ (void)setUp
|
||||
{
|
||||
// This will init the global var CPApp which are used internally in the AppKit
|
||||
[[CPApplication alloc] init];
|
||||
}
|
||||
|
||||
- (void)setUp
|
||||
{
|
||||
responder = [TestResponder new];
|
||||
|
||||
@@ -2,12 +2,17 @@
|
||||
|
||||
@import "CPNotificationCenterHelper.j"
|
||||
|
||||
[CPApplication sharedApplication];
|
||||
|
||||
@implementation CPScrollViewTest : OJTestCase
|
||||
{
|
||||
}
|
||||
|
||||
+ (void)setUp
|
||||
{
|
||||
// This will init the global var CPApp which are used internally in the AppKit
|
||||
[[CPApplication alloc] init];
|
||||
}
|
||||
|
||||
/*!
|
||||
Test that scroll views don't generate bad layouts when very small.
|
||||
*/
|
||||
|
||||
@@ -5,6 +5,12 @@
|
||||
CPSearchField _searchField;
|
||||
}
|
||||
|
||||
+ (void)setUp
|
||||
{
|
||||
// This will init the global var CPApp which are used internally in the AppKit
|
||||
[[CPApplication alloc] init];
|
||||
}
|
||||
|
||||
- (void)setUp
|
||||
{
|
||||
_searchField = [[CPSearchField alloc] initWithFrame:CGRectMakeZero()];
|
||||
|
||||
@@ -6,6 +6,12 @@
|
||||
CPSegmentedControl _segmentedControl;
|
||||
}
|
||||
|
||||
+ (void)setUp
|
||||
{
|
||||
// This will init the global var CPApp which are used internally in the AppKit
|
||||
[[CPApplication alloc] init];
|
||||
}
|
||||
|
||||
- (void)setUp
|
||||
{
|
||||
_segmentedControl = [[CPSegmentedControl alloc] initWithFrame:CGRectMakeZero()];
|
||||
|
||||
@@ -4,6 +4,12 @@
|
||||
{
|
||||
}
|
||||
|
||||
+ (void)setUp
|
||||
{
|
||||
// This will init the global var CPApp which are used internally in the AppKit
|
||||
[[CPApplication alloc] init];
|
||||
}
|
||||
|
||||
- (void)testIsContinuous
|
||||
{
|
||||
// While normally testing simple instance variables is a waste of time,
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
|
||||
@import <AppKit/CPApplication.j>
|
||||
@import <AppKit/CPSplitView.j>
|
||||
|
||||
[CPApplication sharedApplication];
|
||||
|
||||
@implementation CPSplitViewTest : OJTestCase
|
||||
{
|
||||
CPSplitView splitView;
|
||||
@@ -11,6 +8,12 @@
|
||||
CPView viewB;
|
||||
}
|
||||
|
||||
+ (void)setUp
|
||||
{
|
||||
// This will init the global var CPApp which are used internally in the AppKit
|
||||
[[CPApplication alloc] init];
|
||||
}
|
||||
|
||||
- (void)setUp
|
||||
{
|
||||
splitView = [[CPSplitView alloc] initWithFrame:CGRectMake(0, 0, 100, 100)];
|
||||
|
||||
@@ -1,13 +1,17 @@
|
||||
@import <AppKit/CPStepper.j>
|
||||
@import <AppKit/CPApplication.j>
|
||||
|
||||
[CPApplication sharedApplication]
|
||||
|
||||
@implementation CPStepperTest : OJTestCase
|
||||
{
|
||||
CPStepper stepper;
|
||||
}
|
||||
|
||||
+ (void)setUp
|
||||
{
|
||||
// This will init the global var CPApp which are used internally in the AppKit
|
||||
[[CPApplication alloc] init];
|
||||
}
|
||||
|
||||
- (void)setUp
|
||||
{
|
||||
stepper = [CPStepper stepper];
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
@import <Foundation/Foundation.j>
|
||||
@import <AppKit/AppKit.j>
|
||||
|
||||
|
||||
|
||||
@implementation CPTabView (TEST)
|
||||
|
||||
- (CPSegmentedControl)tabs
|
||||
@@ -25,6 +23,12 @@
|
||||
CPTabViewItem _tabItem2;
|
||||
}
|
||||
|
||||
+ (void)setUp
|
||||
{
|
||||
// This will init the global var CPApp which are used internally in the AppKit
|
||||
[[CPApplication alloc] init];
|
||||
}
|
||||
|
||||
- (void)setUp
|
||||
{
|
||||
_tabView = [[CPTabView alloc] initWithFrame:CGRectMake(0, 0, 800, 600)];
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
@import <AppKit/AppKit.j>
|
||||
|
||||
[CPApplication sharedApplication];
|
||||
|
||||
@implementation CPTableViewReloadDataTest : OJTestCase
|
||||
{
|
||||
CPWindow theWindow;
|
||||
@@ -9,6 +7,12 @@
|
||||
CPArray tableContent;
|
||||
}
|
||||
|
||||
+ (void)setUp
|
||||
{
|
||||
// This will init the global var CPApp which are used internally in the AppKit
|
||||
[[CPApplication alloc] init];
|
||||
}
|
||||
|
||||
- (void)setUp
|
||||
{
|
||||
tableContent = [];
|
||||
|
||||
@@ -1,13 +1,17 @@
|
||||
@import <AppKit/AppKit.j>
|
||||
|
||||
[CPApplication sharedApplication];
|
||||
|
||||
@implementation CPTableViewTableColumnTest : OJTestCase
|
||||
{
|
||||
CPWindow theWindow;
|
||||
CPTableView tableView;
|
||||
}
|
||||
|
||||
+ (void)setUp
|
||||
{
|
||||
// This will init the global var CPApp which are used internally in the AppKit
|
||||
[[CPApplication alloc] init];
|
||||
}
|
||||
|
||||
- (void)setUp
|
||||
{
|
||||
// setup a reasonable table
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
|
||||
@import "CPNotificationCenterHelper.j"
|
||||
|
||||
[CPApplication sharedApplication];
|
||||
|
||||
@implementation CPTableViewTest : OJTestCase
|
||||
{
|
||||
CPWindow theWindow;
|
||||
@@ -15,6 +13,12 @@
|
||||
int selectionDidChangeNotificationsReceived;
|
||||
}
|
||||
|
||||
+ (void)setUp
|
||||
{
|
||||
// This will init the global var CPApp which are used internally in the AppKit
|
||||
[[CPApplication alloc] init];
|
||||
}
|
||||
|
||||
- (void)setUp
|
||||
{
|
||||
// setup a reasonable table
|
||||
|
||||
@@ -1,11 +1,16 @@
|
||||
@import <AppKit/CPTextField.j>
|
||||
|
||||
[CPApplication sharedApplication]
|
||||
|
||||
@implementation CPTextFieldTest : OJTestCase
|
||||
{
|
||||
}
|
||||
|
||||
+ (void)setUp
|
||||
{
|
||||
// This will init the global var CPApp which are used internally in the AppKit
|
||||
[[CPApplication alloc] init];
|
||||
}
|
||||
|
||||
/*!
|
||||
Detect regressions with JS object theme attribute encoding in subclasses.
|
||||
|
||||
|
||||
@@ -4,6 +4,12 @@
|
||||
{
|
||||
}
|
||||
|
||||
+ (void)setUp
|
||||
{
|
||||
// This will init the global var CPApp which are used internally in the AppKit
|
||||
[[CPApplication alloc] init];
|
||||
}
|
||||
|
||||
- (void)testCreatingThemeState
|
||||
{
|
||||
var themeState = new ThemeState({'test': true, 'test1': true});
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
|
||||
@class TestDelegateTokenField
|
||||
|
||||
[CPApplication sharedApplication];
|
||||
|
||||
@implementation CPTokenFieldTest : OJTestCase
|
||||
{
|
||||
CPWindow _theWindow;
|
||||
@@ -12,6 +10,12 @@
|
||||
|
||||
}
|
||||
|
||||
+ (void)setUp
|
||||
{
|
||||
// This will init the global var CPApp which are used internally in the AppKit
|
||||
[[CPApplication alloc] init];
|
||||
}
|
||||
|
||||
- (void)setUp
|
||||
{
|
||||
_theWindow = [[CPWindow alloc] initWithContentRect:CGRectMake(0.0, 0.0, 1024.0, 768.0)
|
||||
|
||||
@@ -1,13 +1,17 @@
|
||||
|
||||
@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];
|
||||
}
|
||||
|
||||
- (void)setUp
|
||||
{
|
||||
treeNode = [CPTreeNode treeNodeWithRepresentedObject:nil];
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
|
||||
@import <AppKit/CPView.j>
|
||||
@import <AppKit/CPApplication.j>
|
||||
|
||||
[CPApplication sharedApplication]
|
||||
|
||||
var methodCalled;
|
||||
|
||||
@implementation CPViewTest : OJTestCase
|
||||
@@ -16,6 +13,12 @@ var methodCalled;
|
||||
CPWindow window;
|
||||
}
|
||||
|
||||
+ (void)setUp
|
||||
{
|
||||
// This will init the global var CPApp which are used internally in the AppKit
|
||||
[[CPApplication alloc] init];
|
||||
}
|
||||
|
||||
- (void)setUp
|
||||
{
|
||||
window = [[CPWindow alloc] initWithContentRect:CGRectMake(0.0, 0.0, 1000.0, 1000.0) styleMask:CPWindowNotSizable];
|
||||
|
||||
@@ -1,15 +1,18 @@
|
||||
|
||||
@import <AppKit/CPWindow.j>
|
||||
@import <AppKit/_CPBorderlessWindowView.j>
|
||||
@import <Foundation/CPURL.j>
|
||||
|
||||
[CPApplication sharedApplication];
|
||||
|
||||
@implementation CPWindowTest : OJTestCase
|
||||
{
|
||||
CPWindow _window @accessors(property=window);
|
||||
}
|
||||
|
||||
+ (void)setUp
|
||||
{
|
||||
// This will init the global var CPApp which are used internally in the AppKit
|
||||
[[CPApplication alloc] init];
|
||||
}
|
||||
|
||||
- (void)setUp
|
||||
{
|
||||
_window = [[CPWindow alloc] initWithContentRect:CGRectMake(0.0, 0.0, 1024.0, 768.0)
|
||||
|
||||
+3
-3
@@ -30,10 +30,10 @@
|
||||
{
|
||||
}
|
||||
|
||||
- (void)setUp
|
||||
+ (void)setUp
|
||||
{
|
||||
// CPApp must be initialised or action sending will not work.
|
||||
[CPApplication sharedApplication];
|
||||
// This will init the global var CPApp which are used internally in the AppKit
|
||||
[[CPApplication alloc] init];
|
||||
}
|
||||
|
||||
- (void)test
|
||||
|
||||
@@ -32,10 +32,10 @@
|
||||
{
|
||||
}
|
||||
|
||||
- (void)setUp
|
||||
+ (void)setUp
|
||||
{
|
||||
// CPApp must be initialised or action sending will not work.
|
||||
[CPApplication sharedApplication];
|
||||
// This will init the global var CPApp which are used internally in the AppKit
|
||||
[[CPApplication alloc] init];
|
||||
}
|
||||
|
||||
- (void)test
|
||||
|
||||
Reference in new issue
Block a user