Skip to content
This repository has been archived by the owner on Dec 2, 2019. It is now read-only.

Commit

Permalink
fixed warnings under llvm gcc
Browse files Browse the repository at this point in the history
  • Loading branch information
petejkim committed Jul 18, 2013
1 parent 75ed1fc commit 0447a34
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 6 deletions.
21 changes: 21 additions & 0 deletions src/SPTDefaultReporter.m
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,27 @@
#import "SpectaUtility.h"
#import <objc/runtime.h>

@interface SPTDefaultReporter ()

+ (NSString *)conciseRunInfoWithNumberOfTests:(NSUInteger)numberOfTests
numberOfSkippedTests:(NSUInteger)numberOfSkippedTests
numberOfFailures:(NSUInteger)numberOfFailures
numberOfExceptions:(NSUInteger)numberOfExceptions
numberOfPendingTests:(NSUInteger)numberOfPendingTests;
+ (NSString *)pluralizeString:(NSString *)singularString
pluralString:(NSString *)pluralString
count:(NSInteger)count;

- (void)printSectionHeader:(NSString *)header;
- (void)printSessionSections:(SenTestSuiteRun *)suiteRun;
- (void)printSessionDetails:(SenTestSuiteRun *)suiteRun;
- (void)printSessionResults:(SenTestSuiteRun *)suiteRn;
- (void)printSummaryForTestCaseClass:(Class)testCaseClass
testCaseRuns:(NSArray *)testCaseRuns;
- (void)printXCodeIntegrationOutputForSession:(SenTestRun *)sessionRun;

@end

@implementation SPTDefaultReporter

// ===== SPTReporter ===================================================================================================
Expand Down
2 changes: 1 addition & 1 deletion src/SPTReporter.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// ===== RUN STACK =====================================================================================================
#pragma mark - Run Stack

@property (readonly, strong, NS_NONATOMIC_IOSONLY) NSArray * runStack;
@property (nonatomic, retain) NSArray *runStack;

// ===== TEST SUITE ====================================================================================================
#pragma mark - Test Suite
Expand Down
10 changes: 8 additions & 2 deletions src/SPTReporter.m
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
#import "SPTReporter.h"
#import "SPTDefaultReporter.h"

@interface SPTReporter ()

+ (SPTReporter *)loadSharedReporter;

@end

@implementation SPTReporter

@synthesize
Expand Down Expand Up @@ -31,14 +37,14 @@ - (id)init
self = [super init];
if (self != nil)
{
_runStack = [[NSMutableArray alloc] init];
self.runStack = [NSMutableArray array];
}
return self;
}

- (void)dealloc
{
[_runStack release];
self.runStack = nil;
[super dealloc];
}

Expand Down
6 changes: 3 additions & 3 deletions test/SenTestCaseSpectaTest.m
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ - (void)test_SPT_title_when_test_case_is_a_sen_test_case

NSString * thisTestCaseName = NSStringFromSelector(_cmd);
NSUInteger thisTestCaseIndex =
[testCases indexOfObjectPassingTest:^BOOL(SenTestCase * testCase, NSUInteger idx, BOOL *stop) {
return [NSStringFromSelector(testCase.selector) isEqualToString:thisTestCaseName];
[testCases indexOfObjectPassingTest:^BOOL(id testCase, NSUInteger idx, BOOL *stop) {
return [NSStringFromSelector([(SenTestCase *)testCase selector]) isEqualToString:thisTestCaseName];
}];

SenTestCase * thisTestCase = [testCases objectAtIndex:thisTestCaseIndex];

STAssertEqualObjects([thisTestCase SPT_title],
Expand Down

0 comments on commit 0447a34

Please sign in to comment.