Fixed: Removed compiler warnings from test cases

This commit is contained in:
Martin Carlberg
2021-09-21 10:58:03 +02:00
parent 5b99757a0d
commit 6b1cdbd19c
8 changed files with 14 additions and 21 deletions
@@ -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];
+2
View File
@@ -4,6 +4,8 @@
@import <Foundation/CPKeyedArchiver.j>
@import <Foundation/CPNumber.j>
@global require;
@implementation CPDataTest : OJTestCase
{
}
-1
View File
@@ -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"];
+1 -1
View File
@@ -88,7 +88,7 @@
- (void)testDictionaryWithJSObjectNonRecursive
{
var non_recursive_dict = [CPDictionary dictionaryWithJSObject:json recursively:NO];
[CPDictionary dictionaryWithJSObject:json recursively:NO];
}
- (void)testCopy
-1
View File
@@ -307,7 +307,6 @@
- (void)testCPPointMakeZero
{
var point = CGPointMake(10, 20);
[self assertTrue:CGPointEqualToPoint(CGPointMake(0, 0), CPPointMakeZero(0, 0))];
}
+5 -10
View File
@@ -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];
+1 -2
View File
@@ -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)
+2 -4
View File
@@ -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];