Skip to content

Commit

Permalink
clarification
Browse files Browse the repository at this point in the history
  • Loading branch information
mikekavouras committed Jun 28, 2015
1 parent 3cd7e99 commit aa53ff7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
10 changes: 2 additions & 8 deletions TestAssessment/TestViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -14,28 +14,24 @@ @implementation TestViewController


/*
This method should return a positive int (cannot be 0)
This method should return a positive NSInteger (cannot be 0)
*/
- (void)shouldReturnAPositiveInt {
// your code
}

/*
This method should return negative float (cannot be 0)
This method should return negative CGFloat (cannot be 0)
*/
- (void)shouldReturnANegativeFloat {
// your code
}

/*
This method should return a negative boolean
*/
- (void)shouldReturnANegativeBool {
// your code
}

- (void)shouldReturnACharAtoZ {
// your code
}

/*
Expand All @@ -52,7 +48,6 @@ - (NSInteger)shouldReturnSumOf0To100 {
*/

- (NSInteger)sumOfAnInteger:(NSInteger)aNumber andAnotherInteger:(NSInteger)bNumber {
// your code
return 0;
}

Expand Down Expand Up @@ -86,7 +81,6 @@ - (NSString *)shouldReturnPersonsName:(Person *)person {
This method should change the person name to "Ada Lovelace"
*/
- (void)changePersonsNameToAdaLovelace:(Person *)person {

}

@end
7 changes: 5 additions & 2 deletions TestAssessmentTests/TestAssessmentTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ - (void)testShouldReturnANegativeFloat {
NSString *rt = [self returnTypeForMethod:method];

BOOL isCorrectReturnType = [rt isEqualToString:RT_FLOAT] || [rt isEqualToString:RT_CGFLOAT];
BOOL isCorrectReturnValue = [self.tvc shouldReturnANegativeFloat] && [self.tvc shouldReturnANegativeFloat] < 0;
BOOL isCorrectReturnValue = [self.tvc shouldReturnANegativeFloat] < 0;
NSLog(@"%f", [self.tvc shouldReturnANegativeFloat]);
NSLog(@"%d, %d", isCorrectReturnType, isCorrectReturnValue);
XCTAssert(isCorrectReturnType && isCorrectReturnValue);
}

Expand Down Expand Up @@ -103,7 +105,8 @@ - (void)testIsOdd {
- (void)testIsMultipleOf5 {
XCTAssertEqual([self.tvc isMultipleOfFive:10], YES);
XCTAssertEqual([self.tvc isMultipleOfFive:2015], YES);
XCTAssertEqual([self.tvc isOdd:88], NO);
XCTAssertEqual([self.tvc isMultipleOfFive:215], YES);
XCTAssertEqual([self.tvc isMultipleOfFive:1111], NO);
}

- (void)testShouldReturnPersonsName {
Expand Down

0 comments on commit aa53ff7

Please sign in to comment.