mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-08-25 04:57:03 +00:00
Test: finally put the init of the CPApplication in the instance method setUp. See previous commit #6fe9dae3d62af995f2481bfebdd706aeb0b21365
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
{
|
||||
}
|
||||
|
||||
+ (void)setUp
|
||||
- (void)setUp
|
||||
{
|
||||
// This will init the global var CPApp which are used internally in the AppKit
|
||||
[[CPApplication alloc] init];
|
||||
|
||||
@@ -61,17 +61,11 @@ 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
|
||||
// if this is not done, because the framework internally uses CPApp.
|
||||
app = [CPApplication sharedApplication];
|
||||
app = [[CPApplication alloc] init];
|
||||
|
||||
// fake the window.location.hash
|
||||
window.location = {hash: "#var1=1/var2=2"};
|
||||
|
||||
@@ -10,7 +10,7 @@ var ELEMENTS = 200,
|
||||
|
||||
}
|
||||
|
||||
+ (void)setUp
|
||||
- (void)setUp
|
||||
{
|
||||
// This will init the global var CPApp which are used internally in the AppKit
|
||||
[[CPApplication alloc] init];
|
||||
|
||||
@@ -18,12 +18,6 @@
|
||||
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"]],
|
||||
@@ -62,6 +56,9 @@
|
||||
|
||||
- (void)setUp
|
||||
{
|
||||
// This will init the global var CPApp which are used internally in the AppKit
|
||||
[[CPApplication alloc] init];
|
||||
|
||||
_contentArray = [self makeTestArray];
|
||||
[self initControllerWithSimpleArray]
|
||||
}
|
||||
|
||||
@@ -7,14 +7,11 @@
|
||||
CPInteger RESIZES_COUNT;
|
||||
}
|
||||
|
||||
+ (void)setUp
|
||||
- (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;
|
||||
RESIZES_COUNT = 250;
|
||||
}
|
||||
|
||||
@@ -8,14 +8,11 @@
|
||||
CPBrowserDelegate delegate;
|
||||
}
|
||||
|
||||
+ (void)setUp
|
||||
- (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)];
|
||||
delegate = [CPBrowserDelegate new];
|
||||
[delegate setEntries:[".1", ".1.1", ".1.2", ".1.2.1", ".1.2.2", ".2", ".3", ".3.1"]];
|
||||
|
||||
@@ -8,14 +8,11 @@
|
||||
BOOL wasClicked;
|
||||
}
|
||||
|
||||
+ (void)setUp
|
||||
- (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"];
|
||||
wasClicked = NO;
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
{
|
||||
}
|
||||
|
||||
+ (void)setUp
|
||||
- (void)setUp
|
||||
{
|
||||
// This will init the global var CPApp which are used internally in the AppKit
|
||||
[[CPApplication alloc] init];
|
||||
|
||||
@@ -7,14 +7,11 @@
|
||||
id _globalResults;
|
||||
}
|
||||
|
||||
+ (void)setUp
|
||||
- (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()];
|
||||
_globalResults = nil;
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
{
|
||||
}
|
||||
|
||||
+ (void)setUp
|
||||
- (void)setUp
|
||||
{
|
||||
// This will init the global var CPApp which are used internally in the AppKit
|
||||
[[CPApplication alloc] init];
|
||||
|
||||
@@ -6,14 +6,11 @@
|
||||
CPColorWell colorWell;
|
||||
}
|
||||
|
||||
+ (void)setUp
|
||||
- (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()];
|
||||
}
|
||||
|
||||
|
||||
@@ -10,14 +10,11 @@
|
||||
BOOL wasClicked
|
||||
}
|
||||
|
||||
+ (void)setUp
|
||||
- (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,14 +8,11 @@
|
||||
BOOL aTransform;
|
||||
}
|
||||
|
||||
+ (void)setUp
|
||||
- (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.
|
||||
DOMElement = {
|
||||
style: {
|
||||
|
||||
@@ -10,14 +10,11 @@
|
||||
CPDatePicker datePicker;
|
||||
}
|
||||
|
||||
+ (void)setUp
|
||||
- (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,7 +5,7 @@
|
||||
{
|
||||
}
|
||||
|
||||
+ (void)setUp
|
||||
- (void)setUp
|
||||
{
|
||||
// This will init the global var CPApp which are used internally in the AppKit
|
||||
[[CPApplication alloc] init];
|
||||
|
||||
@@ -10,14 +10,11 @@
|
||||
int tag @accessors;
|
||||
}
|
||||
|
||||
+ (void)setUp
|
||||
- (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,14 +9,11 @@
|
||||
CPFont _boldCustomFont;
|
||||
}
|
||||
|
||||
+ (void)setUp
|
||||
- (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];
|
||||
_boldSystemFont = [CPFont boldSystemFontOfSize:15];
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
{
|
||||
}
|
||||
|
||||
+ (void)setUp
|
||||
- (void)setUp
|
||||
{
|
||||
// This will init the global var CPApp which are used internally in the AppKit
|
||||
[[CPApplication alloc] init];
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
}
|
||||
|
||||
+ (void)setUp
|
||||
- (void)setUp
|
||||
{
|
||||
// This will init the global var CPApp which are used internally in the AppKit
|
||||
[[CPApplication alloc] init];
|
||||
|
||||
@@ -18,14 +18,11 @@
|
||||
CPObjectController objectController @accessors;
|
||||
}
|
||||
|
||||
+ (void)setUp
|
||||
- (void)setUp
|
||||
{
|
||||
// This will init the global var CPApp which are used internally in the AppKit
|
||||
[[CPApplication alloc] init];
|
||||
}
|
||||
|
||||
- (void)setUp
|
||||
{
|
||||
track = [Track new];
|
||||
[track setVolume:5.0];
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
CPArrayController arrayController @accessors;
|
||||
}
|
||||
|
||||
+ (void)setUp
|
||||
- (void)setUp
|
||||
{
|
||||
// This will init the global var CPApp which are used internally in the AppKit
|
||||
[[CPApplication alloc] init];
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
{
|
||||
}
|
||||
|
||||
+ (void)setUp
|
||||
- (void)setUp
|
||||
{
|
||||
// This will init the global var CPApp which are used internally in the AppKit
|
||||
[[CPApplication alloc] init];
|
||||
|
||||
@@ -17,14 +17,11 @@
|
||||
CPMenuItem anInstantiatedMenuItem;
|
||||
}
|
||||
|
||||
+ (void)setUp
|
||||
- (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.
|
||||
menu = [[CPMenu alloc] initWithTitle:@"MainMenu"];
|
||||
|
||||
|
||||
@@ -9,14 +9,11 @@ var CPMenuValidatedUserInterfaceItemTestValidatedItems = [];
|
||||
MenuTarget _menuTarget @accessors(property=menuTarget);
|
||||
}
|
||||
|
||||
+ (void)setUp
|
||||
- (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];
|
||||
[[CPApplication sharedApplication] setDelegate:_menuTarget];
|
||||
|
||||
|
||||
@@ -9,14 +9,11 @@
|
||||
TestOutlineDataSource dataSource;
|
||||
}
|
||||
|
||||
+ (void)setUp
|
||||
- (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)];
|
||||
|
||||
tableColumn = [[CPTableColumn alloc] initWithIdentifier:@"Foo"];
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
{
|
||||
}
|
||||
|
||||
+ (void)setUp
|
||||
- (void)setUp
|
||||
{
|
||||
// This will init the global var CPApp which are used internally in the AppKit
|
||||
[[CPApplication alloc] init];
|
||||
|
||||
@@ -9,14 +9,11 @@
|
||||
id objects @accessors;
|
||||
}
|
||||
|
||||
+ (void)setUp
|
||||
- (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,14 +6,11 @@
|
||||
CPPredicateEditor _editor;
|
||||
}
|
||||
|
||||
+ (void)setUp
|
||||
- (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()];
|
||||
}
|
||||
|
||||
|
||||
@@ -10,14 +10,11 @@
|
||||
CPResponder responder;
|
||||
}
|
||||
|
||||
+ (void)setUp
|
||||
- (void)setUp
|
||||
{
|
||||
// This will init the global var CPApp which are used internally in the AppKit
|
||||
[[CPApplication alloc] init];
|
||||
}
|
||||
|
||||
- (void)setUp
|
||||
{
|
||||
responder = [TestResponder new];
|
||||
responder.doCommandCalls = [];
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
{
|
||||
}
|
||||
|
||||
+ (void)setUp
|
||||
- (void)setUp
|
||||
{
|
||||
// This will init the global var CPApp which are used internally in the AppKit
|
||||
[[CPApplication alloc] init];
|
||||
|
||||
@@ -5,14 +5,11 @@
|
||||
CPSearchField _searchField;
|
||||
}
|
||||
|
||||
+ (void)setUp
|
||||
- (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,14 +6,11 @@
|
||||
CPSegmentedControl _segmentedControl;
|
||||
}
|
||||
|
||||
+ (void)setUp
|
||||
- (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()];
|
||||
[_segmentedControl setSegmentCount:3];
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
{
|
||||
}
|
||||
|
||||
+ (void)setUp
|
||||
- (void)setUp
|
||||
{
|
||||
// This will init the global var CPApp which are used internally in the AppKit
|
||||
[[CPApplication alloc] init];
|
||||
|
||||
@@ -8,14 +8,11 @@
|
||||
CPView viewB;
|
||||
}
|
||||
|
||||
+ (void)setUp
|
||||
- (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)];
|
||||
viewA = [[CPView alloc] initWithFrame:CGRectMake(0, 0, 100, 50)];
|
||||
viewB = [[CPView alloc] initWithFrame:CGRectMake(0, 0, 100, 50)];
|
||||
|
||||
@@ -6,14 +6,11 @@
|
||||
CPStepper stepper;
|
||||
}
|
||||
|
||||
+ (void)setUp
|
||||
- (void)setUp
|
||||
{
|
||||
// This will init the global var CPApp which are used internally in the AppKit
|
||||
[[CPApplication alloc] init];
|
||||
}
|
||||
|
||||
- (void)setUp
|
||||
{
|
||||
stepper = [CPStepper stepper];
|
||||
[stepper setValueWraps:NO];
|
||||
}
|
||||
|
||||
@@ -23,14 +23,11 @@
|
||||
CPTabViewItem _tabItem2;
|
||||
}
|
||||
|
||||
+ (void)setUp
|
||||
- (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)];
|
||||
|
||||
_tabItem1 = [[CPTabViewItem alloc] initWithIdentifier:@"id1"];
|
||||
|
||||
@@ -7,14 +7,11 @@
|
||||
CPArray tableContent;
|
||||
}
|
||||
|
||||
+ (void)setUp
|
||||
- (void)setUp
|
||||
{
|
||||
// This will init the global var CPApp which are used internally in the AppKit
|
||||
[[CPApplication alloc] init];
|
||||
}
|
||||
|
||||
- (void)setUp
|
||||
{
|
||||
tableContent = [];
|
||||
// setup a reasonable table
|
||||
theWindow = [[CPWindow alloc] initWithContentRect:CGRectMake(0.0, 0.0, 1024.0, 768.0)
|
||||
|
||||
@@ -6,14 +6,11 @@
|
||||
CPTableView tableView;
|
||||
}
|
||||
|
||||
+ (void)setUp
|
||||
- (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
|
||||
theWindow = [[CPWindow alloc] initWithContentRect:CGRectMake(0.0, 0.0, 1024.0, 768.0)
|
||||
styleMask:CPWindowNotSizable];
|
||||
|
||||
@@ -13,14 +13,11 @@
|
||||
int selectionDidChangeNotificationsReceived;
|
||||
}
|
||||
|
||||
+ (void)setUp
|
||||
- (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
|
||||
theWindow = [[CPWindow alloc] initWithContentRect:CGRectMake(0.0, 0.0, 1024.0, 768.0) styleMask:CPWindowNotSizable];
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
{
|
||||
}
|
||||
|
||||
+ (void)setUp
|
||||
- (void)setUp
|
||||
{
|
||||
// This will init the global var CPApp which are used internally in the AppKit
|
||||
[[CPApplication alloc] init];
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
{
|
||||
}
|
||||
|
||||
+ (void)setUp
|
||||
- (void)setUp
|
||||
{
|
||||
// This will init the global var CPApp which are used internally in the AppKit
|
||||
[[CPApplication alloc] init];
|
||||
|
||||
@@ -10,14 +10,11 @@
|
||||
|
||||
}
|
||||
|
||||
+ (void)setUp
|
||||
- (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)
|
||||
styleMask:CPWindowNotSizable];
|
||||
|
||||
|
||||
@@ -6,14 +6,11 @@
|
||||
CPTreeNode childNode;
|
||||
}
|
||||
|
||||
+ (void)setUp
|
||||
- (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];
|
||||
|
||||
childNode = [CPTreeNode treeNodeWithRepresentedObject:nil];
|
||||
|
||||
@@ -13,14 +13,11 @@ var methodCalled;
|
||||
CPWindow window;
|
||||
}
|
||||
|
||||
+ (void)setUp
|
||||
- (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];
|
||||
|
||||
view = [[CPView alloc] initWithFrame:CGRectMakeZero()];
|
||||
|
||||
@@ -7,14 +7,11 @@
|
||||
CPWindow _window @accessors(property=window);
|
||||
}
|
||||
|
||||
+ (void)setUp
|
||||
- (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)
|
||||
styleMask:CPWindowNotSizable];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user