Update test case `test27ThatEncodeWithFramesWorks`
This commit is contained in:
parent
1f4292ec82
commit
480f3b5158
|
@ -32,7 +32,7 @@
|
|||
#if SD_MAC
|
||||
NSRect imageRect = NSMakeRect(0, 0, self.size.width, self.size.height);
|
||||
NSImageRep *imageRep = [self bestRepresentationForRect:imageRect context:nil hints:nil];
|
||||
// Check weak assigned frames firstly
|
||||
// Check weak animated data firstly
|
||||
if ([imageRep isKindOfClass:[SDAnimatedImageRep class]]) {
|
||||
SDAnimatedImageRep *animatedImageRep = (SDAnimatedImageRep *)imageRep;
|
||||
NSData *imageData = [animatedImageRep animatedImageData];
|
||||
|
|
|
@ -446,6 +446,14 @@
|
|||
UIImage *animatedImage = [SDImageCoderHelper animatedImageWithFrames:frames];
|
||||
NSData *data = [SDImageGIFCoder.sharedCoder encodedDataWithImage:animatedImage format:SDImageFormatGIF options:nil];
|
||||
expect(data).notTo.beNil();
|
||||
|
||||
#if SD_MAC
|
||||
// Test implementation use SDAnimatedImageRep
|
||||
SDAnimatedImageRep *rep = (SDAnimatedImageRep *)animatedImage.representations.firstObject;
|
||||
expect([rep isKindOfClass:SDAnimatedImageRep.class]);
|
||||
expect(rep.animatedImageData).equal(data);
|
||||
expect(rep.animatedImageFormat).equal(SDImageFormatGIF);
|
||||
#endif
|
||||
|
||||
// Test new API
|
||||
NSData *data2 = [SDImageGIFCoder.sharedCoder encodedDataWithFrames:frames loopCount:0 format:SDImageFormatGIF options:nil];
|
||||
|
|
Loading…
Reference in New Issue