mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-11-09 08:28:45 +00:00
Merge remote branch 'refs/remotes/280north/master'
This commit is contained in:
commit
a74267e937
5 files changed
+37
-5
No files matched your search
@@ -397,6 +397,17 @@
|
||||
|
||||
@end
|
||||
|
||||
@implementation CPArray (CPMutableCopying)
|
||||
|
||||
- (id)mutableCopy
|
||||
{
|
||||
var r = [CPMutableArray new];
|
||||
[r addObjectsFromArray:self];
|
||||
return r;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
var selectorCompare = function selectorCompare(object1, object2, selector)
|
||||
{
|
||||
return [object1 performSelector:selector withObject:object2];
|
||||
|
||||
@@ -8,12 +8,18 @@
|
||||
/*
|
||||
Ensure that we have no canvas nor vml support.
|
||||
*/
|
||||
[self assert:YES equals:!CPFeatureIsCompatible(CPHTMLCanvasFeature)];
|
||||
if (system.engine !== "jsc")
|
||||
{
|
||||
[self assert:YES equals:!CPFeatureIsCompatible(CPHTMLCanvasFeature)];
|
||||
}
|
||||
[self assert:YES equals:!CPFeatureIsCompatible(CPVMLFeature)];
|
||||
}
|
||||
|
||||
- (void)testGStateCreate
|
||||
{
|
||||
if (CPFeatureIsCompatible(CPHTMLCanvasFeature))
|
||||
return;
|
||||
|
||||
var gstate = CGGStateCreate(),
|
||||
testdata = { alpha: 1.0,
|
||||
strokeStyle: "#000",
|
||||
@@ -41,6 +47,9 @@
|
||||
|
||||
- (void)testGStateCreateCopy
|
||||
{
|
||||
if (CPFeatureIsCompatible(CPHTMLCanvasFeature))
|
||||
return;
|
||||
|
||||
var gstate = CGGStateCreate(),
|
||||
gstatecopy = CGGStateCreateCopy(gstate),
|
||||
testdata = { alpha: 1.0,
|
||||
|
||||
@@ -43,7 +43,7 @@ var CPMenuValidatedUserInterfaceItemTestValidatedItems = [];
|
||||
var parentItem = [[self menu] itemWithTitle:@"parent"];
|
||||
|
||||
[self assertTrue:[parentItem isEnabled] message:@"Parent items should never be disabled"];
|
||||
[self assertFalse:[[[self menuTarget] validatedItems] containsObject:parent] message:@"Parent items should never be validated"];
|
||||
[self assertFalse:[[[self menuTarget] validatedItems] containsObject:parentItem] message:@"Parent items should never be validated"];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
@import <Foundation/Foundation.j>
|
||||
@import "CPArrayTest.j"
|
||||
|
||||
|
||||
@implementation CPMutableArrayTest : CPArrayTest
|
||||
|
||||
+ (Class)arrayClass
|
||||
@@ -448,6 +447,19 @@
|
||||
[self assert:[5, 4, 4, 3, 2, 2, 1, 1, 1, 1] equals:target];
|
||||
}
|
||||
|
||||
- (void)testMutableCopy
|
||||
{
|
||||
var normalArray = [CPArray array];
|
||||
|
||||
[self assertThrows:function () { [array addObject:[CPNull null]] }];
|
||||
|
||||
var mutableArray = [normalArray mutableCopy];
|
||||
|
||||
[mutableArray addObject:[CPNull null]];
|
||||
|
||||
[self assert:1 equals:[mutableArray count] message:"mutable copy should have content"];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation CPPrettyObject : CPObject
|
||||
|
||||
+2
-2
@@ -7,7 +7,7 @@ export PATH="$HOME/narwhal/bin:$PATH"
|
||||
export CAPP_AUTO_UPGRADE="yes"
|
||||
|
||||
export CAPP_BUILD="$project_home/build_incremental"
|
||||
time jake test
|
||||
time jake CommonJS test-only
|
||||
code=$?
|
||||
if [ $code -ne 0 ]; then
|
||||
echo "INCREMENTAL BUILD FAILED ($code)"
|
||||
@@ -19,7 +19,7 @@ fi
|
||||
export CAPP_BUILD="$project_home/build_clean"
|
||||
rm -rf "$CAPP_BUILD"
|
||||
|
||||
time jake CommonJS test
|
||||
time jake CommonJS test-only
|
||||
code=$?
|
||||
if [ $code -ne 0 ]; then
|
||||
echo "CLEAN BUILD FAILED ($code)"
|
||||
|
||||
Reference in new issue
Block a user