mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-08-25 04:57:03 +00:00
Fixed: Removed compiler warnings from test cases
This commit is contained in:
+3
-2
@@ -38,8 +38,9 @@
|
||||
|
||||
- (void)test
|
||||
{
|
||||
var theDocument = [MyDocument new],
|
||||
cib = [CPBundle loadCibFile:[[CPBundle bundleForClass:WithoutBindingsTest] pathForResource:"01_WithoutBindings.cib"] externalNameTable:[CPDictionary dictionaryWithObject:theDocument forKey:CPCibOwner]];
|
||||
var theDocument = [MyDocument new];
|
||||
|
||||
[CPBundle loadCibFile:[[CPBundle bundleForClass:WithoutBindingsTest] pathForResource:"01_WithoutBindings.cib"] externalNameTable:[CPDictionary dictionaryWithObject:theDocument forKey:CPCibOwner]];
|
||||
|
||||
[theDocument windowControllerDidLoadCib:self];
|
||||
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
@import <Foundation/CPKeyedArchiver.j>
|
||||
@import <Foundation/CPNumber.j>
|
||||
|
||||
@global require;
|
||||
|
||||
@implementation CPDataTest : OJTestCase
|
||||
{
|
||||
}
|
||||
|
||||
@@ -418,7 +418,6 @@
|
||||
// test addition of positives
|
||||
var d1 = CPDecimalMakeWithString(@"1"),
|
||||
d2 = CPDecimalMakeWithParts(1, 0),
|
||||
dcm = CPDecimalMakeZero(),
|
||||
i = 50;
|
||||
while (i--)
|
||||
[self assert:CPDecimalAdd(d1, d1, d2, CPRoundPlain) equals:CPCalculationNoError message:"CPDecimalAdd() Tap1: addition"];
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
|
||||
- (void)testDictionaryWithJSObjectNonRecursive
|
||||
{
|
||||
var non_recursive_dict = [CPDictionary dictionaryWithJSObject:json recursively:NO];
|
||||
[CPDictionary dictionaryWithJSObject:json recursively:NO];
|
||||
}
|
||||
|
||||
- (void)testCopy
|
||||
|
||||
@@ -307,7 +307,6 @@
|
||||
|
||||
- (void)testCPPointMakeZero
|
||||
{
|
||||
var point = CGPointMake(10, 20);
|
||||
[self assertTrue:CGPointEqualToPoint(CGPointMake(0, 0), CPPointMakeZero(0, 0))];
|
||||
}
|
||||
|
||||
|
||||
@@ -333,8 +333,7 @@ var COUNTER;
|
||||
|
||||
- (void)testKVCCountArrayOperators
|
||||
{
|
||||
var one = [1, 1, 1, 1, 1, 1, 1, 1],
|
||||
two = [1, 2, 3, 4, 8, 0];
|
||||
var one = [1, 1, 1, 1, 1, 1, 1, 1];
|
||||
|
||||
[self assert:[one valueForKey:"@count"] equals:8];
|
||||
|
||||
@@ -345,8 +344,7 @@ var COUNTER;
|
||||
|
||||
- (void)testKVCSumArrayOperators
|
||||
{
|
||||
var one = [1, 1, 1, 1, 1, 1, 1, 1],
|
||||
two = [1, 2, 3, 4, 8, 0];
|
||||
var one = [1, 1, 1, 1, 1, 1, 1, 1];
|
||||
|
||||
[self assert:[one valueForKeyPath:"@sum.intValue"] equals:8];
|
||||
|
||||
@@ -363,8 +361,7 @@ var COUNTER;
|
||||
|
||||
- (void)testKVCAvgArrayOperators
|
||||
{
|
||||
var one = [1, 1, 1, 1, 1, 1, 1, 1],
|
||||
two = [1, 2, 3, 4, 8, 0];
|
||||
var two = [1, 2, 3, 4, 8, 0];
|
||||
|
||||
[self assert:[two valueForKeyPath:"@avg.intValue"] equals:3];
|
||||
|
||||
@@ -377,8 +374,7 @@ var COUNTER;
|
||||
|
||||
- (void)testKVCMinArrayOperators
|
||||
{
|
||||
var one = [1, 1, 1, 1, 1, 1, 1, 1],
|
||||
two = [1, 2, 3, 4, 8, 0];
|
||||
var two = [1, 2, 3, 4, 8, 0];
|
||||
|
||||
[self assert:[two valueForKeyPath:"@min.intValue"] equals:0];
|
||||
|
||||
@@ -392,8 +388,7 @@ var COUNTER;
|
||||
|
||||
- (void)testKVCMaxArrayOperators
|
||||
{
|
||||
var one = [1, 1, 1, 1, 1, 1, 1, 1],
|
||||
two = [1, 2, 3, 4, 8, 0];
|
||||
var two = [1, 2, 3, 4, 8, 0];
|
||||
|
||||
[self assert:[two valueForKeyPath:"@max.intValue"] equals:8];
|
||||
|
||||
|
||||
@@ -284,8 +284,7 @@ var _getCheeseCounter;
|
||||
- (void)testOnlyInsertObject_AtKeyIndex_Implemented
|
||||
{
|
||||
var insertSelector = @selector(insertObject:inObjectsAtIndex:),
|
||||
object = [self objectWithMethods:insertSelector],
|
||||
methodTypes = class_getInstanceMethod(object.isa, insertSelector).method_types;
|
||||
object = [self objectWithMethods:insertSelector];
|
||||
|
||||
// Sanity check
|
||||
[self assert:class_getInstanceMethod(object.isa, insertSelector)
|
||||
|
||||
@@ -257,8 +257,7 @@
|
||||
|
||||
- (void)testKVCSumSetOperators
|
||||
{
|
||||
var one = [CPSet setWithArray:[@"one", @"two", @"three"]],
|
||||
two = [CPSet setWithArray:[1, 2, 3, 4, 8, 0]];
|
||||
var two = [CPSet setWithArray:[1, 2, 3, 4, 8, 0]];
|
||||
|
||||
[self assert:[two valueForKeyPath:"@sum.intValue"] equals:18];
|
||||
|
||||
@@ -271,8 +270,7 @@
|
||||
|
||||
- (void)testKVCAvgSetOperators
|
||||
{
|
||||
var one = [CPSet setWithArray:[@"one", @"two", @"three"]],
|
||||
two = [CPSet setWithArray:[1, 2, 3, 4, 8, 0]];
|
||||
var two = [CPSet setWithArray:[1, 2, 3, 4, 8, 0]];
|
||||
|
||||
[self assert:[two valueForKeyPath:"@avg.doubleValue"] equals:3.0];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user