forked from SDWebImage/SDWebImage
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added test for the UIImage+MultiFormat crash
- Loading branch information
1 parent
681a7c4
commit c8df858
Showing
2 changed files
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
// | ||
// UIImageMultiFormatTests.m | ||
// SDWebImage Tests | ||
// | ||
// Created by Bogdan Poplauschi on 18/07/14. | ||
// | ||
// | ||
|
||
#define EXP_SHORTHAND // required by Expecta | ||
|
||
|
||
#import <XCTest/XCTest.h> | ||
#import <XCTestAsync/XCTestAsync.h> | ||
#import <Expecta.h> | ||
|
||
#import "UIImage+MultiFormat.h" | ||
|
||
|
||
@interface UIImageMultiFormatTests : XCTestCase | ||
|
||
@end | ||
|
||
|
||
@implementation UIImageMultiFormatTests | ||
|
||
- (void)setUp | ||
{ | ||
[super setUp]; | ||
// Put setup code here. This method is called before the invocation of each test method in the class. | ||
} | ||
|
||
- (void)tearDown | ||
{ | ||
// Put teardown code here. This method is called after the invocation of each test method in the class. | ||
[super tearDown]; | ||
} | ||
|
||
- (void)testImageOrientationFromImageDataWithInvalidData { | ||
// sync download image | ||
SEL selector = @selector(sd_imageOrientationFromImageData:); | ||
|
||
UIImageOrientation orientation = [[UIImage class] performSelector:selector withObject:nil]; | ||
expect(orientation).to.equal(UIImageOrientationUp); | ||
} | ||
|
||
@end |