diff --git a/Tests/AppKit/CGColorTest.j b/Tests/AppKit/CGColorTest.j index 0f0ed706d..40b4957a9 100644 --- a/Tests/AppKit/CGColorTest.j +++ b/Tests/AppKit/CGColorTest.j @@ -32,8 +32,8 @@ - (void)testColorCreate { var colorspace = CGColorSpaceCreateDeviceRGB(), - components = [2,3,4,5], - clruid = CFHashCode(colorspace) + components.join(""); + components = [2,3,4,5]/*, + clruid = CFHashCode(colorspace) + components.join("")*/; // Can't access the colormap cache, but it would be nice to // [self assert:NULL equals:_CGColorMap[clruid]]; diff --git a/Tests/AppKit/CGContextTest.j b/Tests/AppKit/CGContextTest.j index 1601430f7..b07987a17 100644 --- a/Tests/AppKit/CGContextTest.j +++ b/Tests/AppKit/CGContextTest.j @@ -12,11 +12,13 @@ { /* Ensure that we have no canvas nor vml support. + Now when we are moving to Node we don't need to do this check anymore. + Before Node we had to check what engine we where running on to test correctly */ - if (system.engine !== "jsc") - { + //if (system.engine !== "jsc") + //{ [self assert:YES equals:!CPFeatureIsCompatible(CPHTMLCanvasFeature)]; - } + //} [self assert:YES equals:!CPFeatureIsCompatible(CPVMLFeature)]; } diff --git a/Tests/AppKit/CPArrayControllerTest.j b/Tests/AppKit/CPArrayControllerTest.j index 902863dfd..8d7f91302 100644 --- a/Tests/AppKit/CPArrayControllerTest.j +++ b/Tests/AppKit/CPArrayControllerTest.j @@ -875,8 +875,9 @@ - (void)testObservationDuringSetSelectionIndexes { - var arrayController = [self arrayController], - newContent = [self setupObservationFixture]; + var arrayController = [self arrayController]; + + [self setupObservationFixture]; var newSelection = [CPIndexSet indexSetWithIndex:2]; [arrayController setSelectionIndexes:newSelection]; diff --git a/Tests/AppKit/CPColorWellTest.j b/Tests/AppKit/CPColorWellTest.j index b870ce4ff..ba8c83c03 100644 --- a/Tests/AppKit/CPColorWellTest.j +++ b/Tests/AppKit/CPColorWellTest.j @@ -26,6 +26,7 @@ var archived = [CPKeyedArchiver archivedDataWithRootObject:colorWell], unarchived = [CPKeyedUnarchiver unarchiveObjectWithData:archived]; + [self assertNotNull:unarchived]; [self assertFalse:[colorWell isBordered] message:"color well archived bordered state"]; [self assert:[CPColor greenColor] equals:[colorWell color] message:"color well archived color"]; } diff --git a/Tests/AppKit/CPKeyValueBindingSimpleBindingsTest.j b/Tests/AppKit/CPKeyValueBindingSimpleBindingsTest.j index 4b282d83a..67cc534b8 100644 --- a/Tests/AppKit/CPKeyValueBindingSimpleBindingsTest.j +++ b/Tests/AppKit/CPKeyValueBindingSimpleBindingsTest.j @@ -109,6 +109,8 @@ // this code should run with or without that connection. var cib = [CPBundle loadCibFile:[[CPBundle bundleForClass:CPKeyValueBindingSimpleBindingsTest] pathForResource:"SimpleBindingsAdoption_03.cib"] externalNameTable:@{ CPCibOwner: self }]; + [self assertNotNull:cib]; + // Test the interaction. [textField setStringValue:@"0.7"]; // Simulate user interaction. By default bindings update on action only. diff --git a/Tests/AppKit/CPKeyValueBindingTest.j b/Tests/AppKit/CPKeyValueBindingTest.j index 373f696a3..37039f530 100644 --- a/Tests/AppKit/CPKeyValueBindingTest.j +++ b/Tests/AppKit/CPKeyValueBindingTest.j @@ -1,4 +1,5 @@ +@import @import @import @@ -13,6 +14,7 @@ @import @import @import +@import @implementation CPKeyValueBindingTest : OJTestCase { @@ -358,7 +360,11 @@ [segmented bind:CPSelectedIndexBinding toObject:model withKeyPath:@"cheese" options:nil]; // Try to bind another binding (mutually exclusive) to the same value. + // Turn off logging so we don't get the warning about this + var saveCPLogDisable = CPLogDisable; + CPLogDisable = YES; [segmented bind:CPSelectedTagBinding toObject:model withKeyPath:@"cheese" options:nil]; + CPLogDisable = saveCPLogDisable; [self assertNotNull:[segmented infoForBinding:CPSelectedIndexBinding]]; diff --git a/Tests/AppKit/CPOutlineViewTest.j b/Tests/AppKit/CPOutlineViewTest.j index 881be24e1..98845897b 100644 --- a/Tests/AppKit/CPOutlineViewTest.j +++ b/Tests/AppKit/CPOutlineViewTest.j @@ -286,6 +286,8 @@ outlineView = decoded; // Expansion state does not archive. [outlineView expandItem:nil expandChildren:YES]; + // Set the datasource or we will get warnings about this. + [outlineView setDataSource:dataSource]; // While not exhaustive, if this test works nothing is majorly broken with the unarchived outline view. [self testCollapse]; } diff --git a/Tests/AppKit/CPScrollViewTest.j b/Tests/AppKit/CPScrollViewTest.j index 81c3c7a91..be937a1c9 100644 --- a/Tests/AppKit/CPScrollViewTest.j +++ b/Tests/AppKit/CPScrollViewTest.j @@ -229,7 +229,6 @@ documentView = [[CPView alloc] initWithFrame:CGRectMake(0, 0, 1000, 1000)], textField1 = [CPTextField textFieldWithStringValue:@"Martin" placeholder:@"" width:10], textField2 = [CPTextField textFieldWithStringValue:@"Malte" placeholder:@"" width:10], - textField1Size = CGSizeMakeCopy([textField1 bounds].size), textField2Size = CGSizeMakeCopy([textField2 bounds].size); [scrollView setDocumentView:documentView]; @@ -277,9 +276,7 @@ var scrollView = [[CPScrollView alloc] initWithFrame:CGRectMake(0, 0, 100, 100)], documentView = [[CPView alloc] initWithFrame:CGRectMake(0, 0, 1000, 1000)], view1 = [[CPView alloc] initWithFrame:CGRectMake(0, 0, 200, 200)], - view2 = [[CPView alloc] initWithFrame:CGRectMake(500, 500, 200, 200)], - view1Size = CGSizeMakeCopy([view1 bounds].size), - view2Size = CGSizeMakeCopy([view2 bounds].size); + view2 = [[CPView alloc] initWithFrame:CGRectMake(500, 500, 200, 200)]; [scrollView setDocumentView:documentView]; @@ -289,8 +286,7 @@ [documentView addSubview:view1]; [documentView addSubview:view2]; - var visibleRect = [documentView visibleRect], - originalVisibleSize = CGSizeMakeCopy(visibleRect.size); + var visibleRect = [documentView visibleRect]; // Make sure we are at the top left corner [self assertPoint:CGPointMake(0, 0) equals:visibleRect.origin message:@"VisibleRect origin not at top left corner"]; diff --git a/Tests/AppKit/CPTableViewTest.j b/Tests/AppKit/CPTableViewTest.j index 42f82084a..171a248a3 100644 --- a/Tests/AppKit/CPTableViewTest.j +++ b/Tests/AppKit/CPTableViewTest.j @@ -194,7 +194,6 @@ for (var row = 0; row < 50; row++) { - var column = row * 2; contentArray.push([CPDictionary dictionaryWithObjects:["R" + row + "C0", "R" + row + "C1"] forKeys:["c1", "c2"]]); } [arrayController setContent:contentArray]; diff --git a/Tests/AppKit/CPTextViewTest.j b/Tests/AppKit/CPTextViewTest.j index aa5534442..f198a5ed9 100644 --- a/Tests/AppKit/CPTextViewTest.j +++ b/Tests/AppKit/CPTextViewTest.j @@ -1,3 +1,4 @@ +@import @import @import