Fixed compiler warnings.

This commit is contained in:
Stefan van den Oord 2013-05-31 20:39:28 +02:00
parent 248c53b445
commit a1af505230
2 changed files with 7 additions and 6 deletions

View File

@ -19,11 +19,11 @@
NSString *p2N; NSString *p2N;
} }
- (id)initWithPlayer1:(NSString *)p1N player2:(NSString *)p2N { - (id)initWithPlayer1:(NSString *)ap1N player2:(NSString *)ap2N {
self = [super initWithPlayer1:p1N player2:p2N]; self = [super initWithPlayer1:ap1N player2:ap2N];
if (self) { if (self) {
self->p1N = p1N; p1N = ap1N;
self->p2N = p2N; p2N = ap2N;
p1 = 0; p1 = 0;
p2 = 0; p2 = 0;
} }

View File

@ -12,9 +12,10 @@
#import "TennisGame2.h" #import "TennisGame2.h"
#import "TennisGame3.h" #import "TennisGame3.h"
@interface TennisTests (Parametrized) @interface TennisTests()
+ (NSArray*)parameters; + (NSArray*)parameters;
@end @end
@implementation TennisTests (Parametrized) @implementation TennisTests (Parametrized)
+ (id)defaultTestSuite { + (id)defaultTestSuite {
SenTestSuite *testSuite = [[SenTestSuite alloc] initWithName:NSStringFromClass(self)]; SenTestSuite *testSuite = [[SenTestSuite alloc] initWithName:NSStringFromClass(self)];
@ -100,7 +101,7 @@
} }
- (NSString *)name { - (NSString *)name {
return [NSString stringWithFormat:@"%@ (%d,%d,%@)", [super name], player1Score, player2Score, expectedScore]; return [[super name] stringByReplacingOccurrencesOfString:@"]" withString:[NSString stringWithFormat:@" (%d,%d,%@)]", player1Score, player2Score, expectedScore]];
} }
- (void)checkAllScoresForGame:(TennisGame *)game { - (void)checkAllScoresForGame:(TennisGame *)game {