CB-7938 - Added XCTest unit tests project, with stubs (adapted from SplashScreen unit test setup) (closes #60)

This commit is contained in:
Shazron Abdullah
2014-12-16 16:45:01 -05:00
committed by Shazron Abdullah
parent 35c653d24d
commit 482f2ac2cc
15 changed files with 1472 additions and 2 deletions
+1
View File
@@ -23,6 +23,7 @@
- (UIImage*)imageByScalingAndCroppingForSize:(CGSize)targetSize;
- (UIImage*)imageCorrectedForCaptureOrientation;
- (UIImage*)imageCorrectedForCaptureOrientation:(UIImageOrientation)imageOrientation;
- (UIImage*)imageByScalingNotCroppingForSize:(CGSize)targetSize;
@end
+7 -2
View File
@@ -74,12 +74,12 @@
return newImage;
}
- (UIImage*)imageCorrectedForCaptureOrientation
- (UIImage*)imageCorrectedForCaptureOrientation:(UIImageOrientation)imageOrientation
{
float rotation_radians = 0;
bool perpendicular = false;
switch ([self imageOrientation]) {
switch (imageOrientation) {
case UIImageOrientationUp :
rotation_radians = 0.0;
break;
@@ -124,6 +124,11 @@
return newImage;
}
- (UIImage*)imageCorrectedForCaptureOrientation
{
return [self imageCorrectedForCaptureOrientation:[self imageOrientation]];
}
- (UIImage*)imageByScalingNotCroppingForSize:(CGSize)targetSize
{
UIImage* sourceImage = self;