// // TestNSAdditions.m // Exercise 20 // // Created by Jonathan Saggau on 9/22/06. // Copyright 2006 Jonathan Saggau. All rights reserved. // #import #import #define cr() NSLog(@"\n") @interface TestNSAdditions : SenTestCase { NSMutableArray *countTo; } @end @implementation TestNSAdditions - (void)setUp { cr(); countTo = [[NSMutableArray alloc] initWithCapacity:10]; for (int i = 0; i < 20; i++) { [countTo addObject:[NSNumber numberWithInt:i]]; } NSLog(@"Count to = %@", countTo); cr(); } - (void)testNSArrayDataSmoothing { cr(); NSLog(@"Testing NSArrayDataSmoothing"); NSLog(@"%@", countTo); NSLog(@"%@", [countTo movingAverageWithWidth:5]); NSLog(@"%@", [countTo paddedMovingAverageWithWidth:5]); cr(); } - (void)testNSArrayAdditions { cr(); } - (void)tearDown { [countTo release]; } @end /* #define STAssertNil(a1, description, ...) #define STAssertNotNil(a1, description, ...) #define STAssertTrue(expression, description, ...) #define STAssertFalse(expression, description, ...) #define STAssertEqualObjects(a1, a2, description, ...) #define STAssertEquals(a1, a2, description, ...) #define STAssertEqualsWithAccuracy(left, right, accuracy, description, ...) #define STAssertThrows(expression, description, ...) #define STAssertThrowsSpecific(expression, specificException, description, ...) #define STAssertThrowsSpecificNamed(expr, specificException, aName, description, ...) #define STAssertNoThrow(expression, description, ...) #define STAssertNoThrowSpecific(expression, specificException, description, ...) #define STAssertNoThrowSpecificNamed(expr, specificException, aName, description, ...) #define STFail(description, ...) #define STAssertTrueNoThrow(expression, description, ...) #define STAssertFalseNoThrow(expression, description, ...) */