fix test error in macos
This commit is contained in:
parent
8c0753c4a5
commit
3d108c86a1
|
@ -105,6 +105,7 @@
|
|||
43828A451DA67F9900000E62 /* TestImageLarge.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 43828A441DA67F9900000E62 /* TestImageLarge.jpg */; };
|
||||
5F7F38AD1AE2A77A00B0E330 /* TestImage.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 5F7F38AC1AE2A77A00B0E330 /* TestImage.jpg */; };
|
||||
6B181A1B265757ED00BD06B3 /* TestAnimatedImageMemory.webp in Resources */ = {isa = PBXBuildFile; fileRef = 6B181A1A265757ED00BD06B3 /* TestAnimatedImageMemory.webp */; };
|
||||
6BC1C20F270F0193003FFAB1 /* TestAnimatedImageMemory.webp in Resources */ = {isa = PBXBuildFile; fileRef = 6B181A1A265757ED00BD06B3 /* TestAnimatedImageMemory.webp */; };
|
||||
770D3B9C7914D53EBA0524DB /* Pods_Tests_TV.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B73996BC299E8E0174661628 /* Pods_Tests_TV.framework */; };
|
||||
AFDBD4044E95252B70FB85CE /* Pods_Tests_iOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AD1BD830DA7388EB6C110B3B /* Pods_Tests_iOS.framework */; };
|
||||
DA248D57195472AA00390AB0 /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DA248D56195472AA00390AB0 /* XCTest.framework */; };
|
||||
|
@ -490,6 +491,7 @@
|
|||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
6BC1C20F270F0193003FFAB1 /* TestAnimatedImageMemory.webp in Resources */,
|
||||
327054E3206CEFF3006EA328 /* TestImageAnimated.apng in Resources */,
|
||||
32B99EA3203B31360017FD66 /* TestImage.gif in Resources */,
|
||||
324047452271956F007C53E1 /* TestEXIF.png in Resources */,
|
||||
|
|
|
@ -347,7 +347,7 @@ static BOOL _isCalled;
|
|||
expect(cacheType).equal(SDImageCacheTypeNone);
|
||||
[expectation fulfill];
|
||||
}];
|
||||
[self waitForExpectationsWithCommonTimeout];
|
||||
[self waitForExpectationsWithTimeout:kAsyncTestTimeout * 2 handler:nil];
|
||||
}
|
||||
|
||||
- (void)test24AnimatedImageViewCategoryDiskCache {
|
||||
|
@ -775,7 +775,12 @@ static BOOL _isCalled;
|
|||
#endif
|
||||
expect(image.sd_imageFrameCount).equal(16);
|
||||
expect(image.scale).equal(1);
|
||||
#if SD_MAC
|
||||
/// Frame count is 1 in mac.
|
||||
expect(cost).equal(image.size.width * image.size.height * 4);
|
||||
#else
|
||||
expect(cost).equal(16 * image.size.width * image.size.height * 4);
|
||||
#endif
|
||||
[[SDImageCodersManager sharedManager] removeCoder:[SDImageAWebPCoder sharedCoder]];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -757,7 +757,7 @@
|
|||
token2 = [downloader2 downloadImageWithURL:[NSURL URLWithString:kTestJPEGURL] completed:^(UIImage * _Nullable image, NSData * _Nullable data, NSError * _Nullable error, BOOL finished) {
|
||||
expect(error).notTo.beNil();
|
||||
expect(error.code).equal(SDWebImageErrorInvalidDownloadContentType);
|
||||
NSString *contentType = ((NSHTTPURLResponse *)token1.response).MIMEType;
|
||||
NSString *contentType = ((NSHTTPURLResponse *)token2.response).MIMEType;
|
||||
expect(contentType).equal(@"image/jpeg");
|
||||
[expectation2 fulfill];
|
||||
}];
|
||||
|
|
Loading…
Reference in New Issue