Merge pull request #3728 from dreampiggy/test/heic_encoding
Try to re-enable the HEIC encoding test and visionOS xctest
This commit is contained in:
commit
02dde95720
|
@ -103,7 +103,7 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
platform: [iOS, macOS, tvOS]
|
platform: [iOS, macOS, tvOS, visionOS]
|
||||||
include:
|
include:
|
||||||
- platform: iOS
|
- platform: iOS
|
||||||
destination: platform=iOS Simulator,name=iPhone 15 Pro
|
destination: platform=iOS Simulator,name=iPhone 15 Pro
|
||||||
|
@ -117,10 +117,10 @@ jobs:
|
||||||
destination: platform=tvOS Simulator,name=Apple TV 4K (3rd generation)
|
destination: platform=tvOS Simulator,name=Apple TV 4K (3rd generation)
|
||||||
scheme: TV
|
scheme: TV
|
||||||
flag: tvos
|
flag: tvos
|
||||||
# - platform: visionOS
|
- platform: visionOS
|
||||||
# destination: platform=visionOS Simulator,name=Apple Vision Pro
|
destination: platform=visionOS Simulator,name=Apple Vision Pro
|
||||||
# scheme: Vision
|
scheme: Vision
|
||||||
# flag: visionos
|
flag: visionos
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
|
@ -847,7 +847,9 @@ static BOOL SDImageIOPNGPluginBuggyNeedWorkaround(void) {
|
||||||
#else
|
#else
|
||||||
CGImagePropertyOrientation exifOrientation = kCGImagePropertyOrientationUp;
|
CGImagePropertyOrientation exifOrientation = kCGImagePropertyOrientationUp;
|
||||||
#endif
|
#endif
|
||||||
properties[(__bridge NSString *)kCGImagePropertyOrientation] = @(exifOrientation);
|
if (exifOrientation != kCGImagePropertyOrientationUp) {
|
||||||
|
properties[(__bridge NSString *)kCGImagePropertyOrientation] = @(exifOrientation);
|
||||||
|
}
|
||||||
// Encoding Options
|
// Encoding Options
|
||||||
double compressionQuality = 1;
|
double compressionQuality = 1;
|
||||||
if (options[SDImageCoderEncodeCompressionQuality]) {
|
if (options[SDImageCoderEncodeCompressionQuality]) {
|
||||||
|
|
|
@ -27,10 +27,14 @@
|
||||||
323B8E2020862322008952BE /* SDWebImageTestLoader.m in Sources */ = {isa = PBXBuildFile; fileRef = 323B8E1E20862322008952BE /* SDWebImageTestLoader.m */; };
|
323B8E2020862322008952BE /* SDWebImageTestLoader.m in Sources */ = {isa = PBXBuildFile; fileRef = 323B8E1E20862322008952BE /* SDWebImageTestLoader.m */; };
|
||||||
324047442271956F007C53E1 /* TestEXIF.png in Resources */ = {isa = PBXBuildFile; fileRef = 324047432271956F007C53E1 /* TestEXIF.png */; };
|
324047442271956F007C53E1 /* TestEXIF.png in Resources */ = {isa = PBXBuildFile; fileRef = 324047432271956F007C53E1 /* TestEXIF.png */; };
|
||||||
324047452271956F007C53E1 /* TestEXIF.png in Resources */ = {isa = PBXBuildFile; fileRef = 324047432271956F007C53E1 /* TestEXIF.png */; };
|
324047452271956F007C53E1 /* TestEXIF.png in Resources */ = {isa = PBXBuildFile; fileRef = 324047432271956F007C53E1 /* TestEXIF.png */; };
|
||||||
|
324371372C4F9E0900BEB4F5 /* TestICCProfile.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 324371362C4F9E0900BEB4F5 /* TestICCProfile.jpg */; };
|
||||||
|
324371382C4F9E0900BEB4F5 /* TestICCProfile.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 324371362C4F9E0900BEB4F5 /* TestICCProfile.jpg */; };
|
||||||
|
324371392C4F9E0900BEB4F5 /* TestICCProfile.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 324371362C4F9E0900BEB4F5 /* TestICCProfile.jpg */; };
|
||||||
|
3243713A2C4F9E0900BEB4F5 /* TestICCProfile.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 324371362C4F9E0900BEB4F5 /* TestICCProfile.jpg */; };
|
||||||
32464A902B7B1833006BE70E /* 1@2x.gif in Resources */ = {isa = PBXBuildFile; fileRef = 32648066250232F7004FA0FC /* 1@2x.gif */; };
|
32464A902B7B1833006BE70E /* 1@2x.gif in Resources */ = {isa = PBXBuildFile; fileRef = 32648066250232F7004FA0FC /* 1@2x.gif */; };
|
||||||
32464A912B7B1833006BE70E /* TestImage.nef in Resources */ = {isa = PBXBuildFile; fileRef = 32F788A2290D252200B57A1C /* TestImage.nef */; };
|
32464A912B7B1833006BE70E /* TestImage.nef in Resources */ = {isa = PBXBuildFile; fileRef = 32F788A2290D252200B57A1C /* TestImage.nef */; };
|
||||||
32464A922B7B1833006BE70E /* TestImage.heic in Resources */ = {isa = PBXBuildFile; fileRef = 327A418B211D660600495442 /* TestImage.heic */; };
|
32464A922B7B1833006BE70E /* TestImage.heic in Resources */ = {isa = PBXBuildFile; fileRef = 327A418B211D660600495442 /* TestImage.heic */; };
|
||||||
32464A932B7B1833006BE70E /* TestImageAnimated.heic in Resources */ = {isa = PBXBuildFile; fileRef = 3297A09E23374D1600814590 /* TestImageAnimated.heic */; };
|
32464A932B7B1833006BE70E /* TestImageAnimated.heics in Resources */ = {isa = PBXBuildFile; fileRef = 3297A09E23374D1600814590 /* TestImageAnimated.heics */; };
|
||||||
32464A942B7B1833006BE70E /* TestJFIF.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 3264CD162AAB1E23001E338B /* TestJFIF.jpg */; };
|
32464A942B7B1833006BE70E /* TestJFIF.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 3264CD162AAB1E23001E338B /* TestJFIF.jpg */; };
|
||||||
32464A952B7B1833006BE70E /* TestImageStatic.webp in Resources */ = {isa = PBXBuildFile; fileRef = 32515F9724AF1919005E8F79 /* TestImageStatic.webp */; };
|
32464A952B7B1833006BE70E /* TestImageStatic.webp in Resources */ = {isa = PBXBuildFile; fileRef = 32515F9724AF1919005E8F79 /* TestImageStatic.webp */; };
|
||||||
32464A962B7B1833006BE70E /* TestImage.gif in Resources */ = {isa = PBXBuildFile; fileRef = 433BBBB61D7EF8200086B6E9 /* TestImage.gif */; };
|
32464A962B7B1833006BE70E /* TestImage.gif in Resources */ = {isa = PBXBuildFile; fileRef = 433BBBB61D7EF8200086B6E9 /* TestImage.gif */; };
|
||||||
|
@ -94,8 +98,8 @@
|
||||||
328BB6DE20825E9800760D6C /* SDWebImageTestCache.m in Sources */ = {isa = PBXBuildFile; fileRef = 328BB6DC20825E9800760D6C /* SDWebImageTestCache.m */; };
|
328BB6DE20825E9800760D6C /* SDWebImageTestCache.m in Sources */ = {isa = PBXBuildFile; fileRef = 328BB6DC20825E9800760D6C /* SDWebImageTestCache.m */; };
|
||||||
32905E64211D786E00460FCF /* TestImage.heif in Resources */ = {isa = PBXBuildFile; fileRef = 32905E63211D786E00460FCF /* TestImage.heif */; };
|
32905E64211D786E00460FCF /* TestImage.heif in Resources */ = {isa = PBXBuildFile; fileRef = 32905E63211D786E00460FCF /* TestImage.heif */; };
|
||||||
32905E65211D786E00460FCF /* TestImage.heif in Resources */ = {isa = PBXBuildFile; fileRef = 32905E63211D786E00460FCF /* TestImage.heif */; };
|
32905E65211D786E00460FCF /* TestImage.heif in Resources */ = {isa = PBXBuildFile; fileRef = 32905E63211D786E00460FCF /* TestImage.heif */; };
|
||||||
3297A09F23374D1700814590 /* TestImageAnimated.heic in Resources */ = {isa = PBXBuildFile; fileRef = 3297A09E23374D1600814590 /* TestImageAnimated.heic */; };
|
3297A09F23374D1700814590 /* TestImageAnimated.heics in Resources */ = {isa = PBXBuildFile; fileRef = 3297A09E23374D1600814590 /* TestImageAnimated.heics */; };
|
||||||
3297A0A023374D1700814590 /* TestImageAnimated.heic in Resources */ = {isa = PBXBuildFile; fileRef = 3297A09E23374D1600814590 /* TestImageAnimated.heic */; };
|
3297A0A023374D1700814590 /* TestImageAnimated.heics in Resources */ = {isa = PBXBuildFile; fileRef = 3297A09E23374D1600814590 /* TestImageAnimated.heics */; };
|
||||||
329922732365DC6100EAFD97 /* SDImageCacheTests.m in Sources */ = {isa = PBXBuildFile; fileRef = DA248D68195475D800390AB0 /* SDImageCacheTests.m */; };
|
329922732365DC6100EAFD97 /* SDImageCacheTests.m in Sources */ = {isa = PBXBuildFile; fileRef = DA248D68195475D800390AB0 /* SDImageCacheTests.m */; };
|
||||||
329922742365DC6100EAFD97 /* SDWebImageManagerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = DA248D6A195476AC00390AB0 /* SDWebImageManagerTests.m */; };
|
329922742365DC6100EAFD97 /* SDWebImageManagerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = DA248D6A195476AC00390AB0 /* SDWebImageManagerTests.m */; };
|
||||||
329922752365DC6100EAFD97 /* SDWebImageDownloaderTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1E3C51E819B46E370092B5E6 /* SDWebImageDownloaderTests.m */; };
|
329922752365DC6100EAFD97 /* SDWebImageDownloaderTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1E3C51E819B46E370092B5E6 /* SDWebImageDownloaderTests.m */; };
|
||||||
|
@ -123,7 +127,7 @@
|
||||||
3299228B2365DC6C00EAFD97 /* TestImage.heic in Resources */ = {isa = PBXBuildFile; fileRef = 327A418B211D660600495442 /* TestImage.heic */; };
|
3299228B2365DC6C00EAFD97 /* TestImage.heic in Resources */ = {isa = PBXBuildFile; fileRef = 327A418B211D660600495442 /* TestImage.heic */; };
|
||||||
3299228C2365DC6C00EAFD97 /* TestImage.heif in Resources */ = {isa = PBXBuildFile; fileRef = 32905E63211D786E00460FCF /* TestImage.heif */; };
|
3299228C2365DC6C00EAFD97 /* TestImage.heif in Resources */ = {isa = PBXBuildFile; fileRef = 32905E63211D786E00460FCF /* TestImage.heif */; };
|
||||||
3299228D2365DC6C00EAFD97 /* TestImageAnimated.apng in Resources */ = {isa = PBXBuildFile; fileRef = 327054E1206CEFF3006EA328 /* TestImageAnimated.apng */; };
|
3299228D2365DC6C00EAFD97 /* TestImageAnimated.apng in Resources */ = {isa = PBXBuildFile; fileRef = 327054E1206CEFF3006EA328 /* TestImageAnimated.apng */; };
|
||||||
3299228E2365DC6C00EAFD97 /* TestImageAnimated.heic in Resources */ = {isa = PBXBuildFile; fileRef = 3297A09E23374D1600814590 /* TestImageAnimated.heic */; };
|
3299228E2365DC6C00EAFD97 /* TestImageAnimated.heics in Resources */ = {isa = PBXBuildFile; fileRef = 3297A09E23374D1600814590 /* TestImageAnimated.heics */; };
|
||||||
32A571562037DB2D002EDAAE /* SDAnimatedImageTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 32A571552037DB2D002EDAAE /* SDAnimatedImageTest.m */; };
|
32A571562037DB2D002EDAAE /* SDAnimatedImageTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 32A571552037DB2D002EDAAE /* SDAnimatedImageTest.m */; };
|
||||||
32B4A4802C082A160004E42C /* TestImage.svg in Resources */ = {isa = PBXBuildFile; fileRef = 32B4A47F2C082A160004E42C /* TestImage.svg */; };
|
32B4A4802C082A160004E42C /* TestImage.svg in Resources */ = {isa = PBXBuildFile; fileRef = 32B4A47F2C082A160004E42C /* TestImage.svg */; };
|
||||||
32B4A4812C082A160004E42C /* TestImage.svg in Resources */ = {isa = PBXBuildFile; fileRef = 32B4A47F2C082A160004E42C /* TestImage.svg */; };
|
32B4A4812C082A160004E42C /* TestImage.svg in Resources */ = {isa = PBXBuildFile; fileRef = 32B4A47F2C082A160004E42C /* TestImage.svg */; };
|
||||||
|
@ -190,6 +194,7 @@
|
||||||
323B8E1D20862322008952BE /* SDWebImageTestLoader.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDWebImageTestLoader.h; sourceTree = "<group>"; };
|
323B8E1D20862322008952BE /* SDWebImageTestLoader.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDWebImageTestLoader.h; sourceTree = "<group>"; };
|
||||||
323B8E1E20862322008952BE /* SDWebImageTestLoader.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDWebImageTestLoader.m; sourceTree = "<group>"; };
|
323B8E1E20862322008952BE /* SDWebImageTestLoader.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDWebImageTestLoader.m; sourceTree = "<group>"; };
|
||||||
324047432271956F007C53E1 /* TestEXIF.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = TestEXIF.png; sourceTree = "<group>"; };
|
324047432271956F007C53E1 /* TestEXIF.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = TestEXIF.png; sourceTree = "<group>"; };
|
||||||
|
324371362C4F9E0900BEB4F5 /* TestICCProfile.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = TestICCProfile.jpg; sourceTree = "<group>"; };
|
||||||
32464A892B7B0FF2006BE70E /* Tests Vision.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Tests Vision.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
|
32464A892B7B0FF2006BE70E /* Tests Vision.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Tests Vision.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
32515F9724AF1919005E8F79 /* TestImageStatic.webp */ = {isa = PBXFileReference; lastKnownFileType = file; path = TestImageStatic.webp; sourceTree = "<group>"; };
|
32515F9724AF1919005E8F79 /* TestImageStatic.webp */ = {isa = PBXFileReference; lastKnownFileType = file; path = TestImageStatic.webp; sourceTree = "<group>"; };
|
||||||
32515F9824AF1919005E8F79 /* TestImageAnimated.webp */ = {isa = PBXFileReference; lastKnownFileType = file; path = TestImageAnimated.webp; sourceTree = "<group>"; };
|
32515F9824AF1919005E8F79 /* TestImageAnimated.webp */ = {isa = PBXFileReference; lastKnownFileType = file; path = TestImageAnimated.webp; sourceTree = "<group>"; };
|
||||||
|
@ -208,7 +213,7 @@
|
||||||
328BB6DB20825E9800760D6C /* SDWebImageTestCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDWebImageTestCache.h; sourceTree = "<group>"; };
|
328BB6DB20825E9800760D6C /* SDWebImageTestCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDWebImageTestCache.h; sourceTree = "<group>"; };
|
||||||
328BB6DC20825E9800760D6C /* SDWebImageTestCache.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDWebImageTestCache.m; sourceTree = "<group>"; };
|
328BB6DC20825E9800760D6C /* SDWebImageTestCache.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDWebImageTestCache.m; sourceTree = "<group>"; };
|
||||||
32905E63211D786E00460FCF /* TestImage.heif */ = {isa = PBXFileReference; lastKnownFileType = file; path = TestImage.heif; sourceTree = "<group>"; };
|
32905E63211D786E00460FCF /* TestImage.heif */ = {isa = PBXFileReference; lastKnownFileType = file; path = TestImage.heif; sourceTree = "<group>"; };
|
||||||
3297A09E23374D1600814590 /* TestImageAnimated.heic */ = {isa = PBXFileReference; lastKnownFileType = file; path = TestImageAnimated.heic; sourceTree = "<group>"; };
|
3297A09E23374D1600814590 /* TestImageAnimated.heics */ = {isa = PBXFileReference; lastKnownFileType = file; path = TestImageAnimated.heics; sourceTree = "<group>"; };
|
||||||
3299222A2365D9A100EAFD97 /* Tests TV.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Tests TV.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
|
3299222A2365D9A100EAFD97 /* Tests TV.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Tests TV.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
3299222E2365D9A100EAFD97 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
3299222E2365D9A100EAFD97 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||||
32A571552037DB2D002EDAAE /* SDAnimatedImageTest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDAnimatedImageTest.m; sourceTree = "<group>"; };
|
32A571552037DB2D002EDAAE /* SDAnimatedImageTest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDAnimatedImageTest.m; sourceTree = "<group>"; };
|
||||||
|
@ -340,6 +345,7 @@
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
32648066250232F7004FA0FC /* 1@2x.gif */,
|
32648066250232F7004FA0FC /* 1@2x.gif */,
|
||||||
|
324371362C4F9E0900BEB4F5 /* TestICCProfile.jpg */,
|
||||||
3278F5E12B04C1AC0004A6EE /* IndexedPNG.png */,
|
3278F5E12B04C1AC0004A6EE /* IndexedPNG.png */,
|
||||||
32C268272B888A4100CA29AE /* RGBA16PNG.png */,
|
32C268272B888A4100CA29AE /* RGBA16PNG.png */,
|
||||||
433BBBBA1D7EFA8B0086B6E9 /* MonochromeTestImage.jpg */,
|
433BBBBA1D7EFA8B0086B6E9 /* MonochromeTestImage.jpg */,
|
||||||
|
@ -358,7 +364,7 @@
|
||||||
32F788A2290D252200B57A1C /* TestImage.nef */,
|
32F788A2290D252200B57A1C /* TestImage.nef */,
|
||||||
32B4A47F2C082A160004E42C /* TestImage.svg */,
|
32B4A47F2C082A160004E42C /* TestImage.svg */,
|
||||||
327054E1206CEFF3006EA328 /* TestImageAnimated.apng */,
|
327054E1206CEFF3006EA328 /* TestImageAnimated.apng */,
|
||||||
3297A09E23374D1600814590 /* TestImageAnimated.heic */,
|
3297A09E23374D1600814590 /* TestImageAnimated.heics */,
|
||||||
32515F9824AF1919005E8F79 /* TestImageAnimated.webp */,
|
32515F9824AF1919005E8F79 /* TestImageAnimated.webp */,
|
||||||
32515F9724AF1919005E8F79 /* TestImageStatic.webp */,
|
32515F9724AF1919005E8F79 /* TestImageStatic.webp */,
|
||||||
6B181A1A265757ED00BD06B3 /* TestAnimatedImageMemory.webp */,
|
6B181A1A265757ED00BD06B3 /* TestAnimatedImageMemory.webp */,
|
||||||
|
@ -597,9 +603,10 @@
|
||||||
32464A992B7B1833006BE70E /* TestEXIF.png in Resources */,
|
32464A992B7B1833006BE70E /* TestEXIF.png in Resources */,
|
||||||
32464A922B7B1833006BE70E /* TestImage.heic in Resources */,
|
32464A922B7B1833006BE70E /* TestImage.heic in Resources */,
|
||||||
32464A9D2B7B1833006BE70E /* TestImageAnimated.apng in Resources */,
|
32464A9D2B7B1833006BE70E /* TestImageAnimated.apng in Resources */,
|
||||||
|
3243713A2C4F9E0900BEB4F5 /* TestICCProfile.jpg in Resources */,
|
||||||
32464A9F2B7B1833006BE70E /* IndexedPNG.png in Resources */,
|
32464A9F2B7B1833006BE70E /* IndexedPNG.png in Resources */,
|
||||||
32464AA02B7B1833006BE70E /* TestImage.jpg in Resources */,
|
32464AA02B7B1833006BE70E /* TestImage.jpg in Resources */,
|
||||||
32464A932B7B1833006BE70E /* TestImageAnimated.heic in Resources */,
|
32464A932B7B1833006BE70E /* TestImageAnimated.heics in Resources */,
|
||||||
32464A9A2B7B1833006BE70E /* TestImage.png in Resources */,
|
32464A9A2B7B1833006BE70E /* TestImage.png in Resources */,
|
||||||
32464A9C2B7B1833006BE70E /* TestImage.pdf in Resources */,
|
32464A9C2B7B1833006BE70E /* TestImage.pdf in Resources */,
|
||||||
32464A9E2B7B1833006BE70E /* TestImageAnimated.webp in Resources */,
|
32464A9E2B7B1833006BE70E /* TestImageAnimated.webp in Resources */,
|
||||||
|
@ -627,6 +634,7 @@
|
||||||
329922872365DC6C00EAFD97 /* TestLoopCount.gif in Resources */,
|
329922872365DC6C00EAFD97 /* TestLoopCount.gif in Resources */,
|
||||||
3299228C2365DC6C00EAFD97 /* TestImage.heif in Resources */,
|
3299228C2365DC6C00EAFD97 /* TestImage.heif in Resources */,
|
||||||
3234306423E2BAC800C290C8 /* TestImage.pdf in Resources */,
|
3234306423E2BAC800C290C8 /* TestImage.pdf in Resources */,
|
||||||
|
324371392C4F9E0900BEB4F5 /* TestICCProfile.jpg in Resources */,
|
||||||
320224F92440C39B00E5B29D /* TestImageLarge.png in Resources */,
|
320224F92440C39B00E5B29D /* TestImageLarge.png in Resources */,
|
||||||
321F311027D0DC490042B274 /* TestImage.bmp in Resources */,
|
321F311027D0DC490042B274 /* TestImage.bmp in Resources */,
|
||||||
329922892365DC6C00EAFD97 /* TestImageLarge.jpg in Resources */,
|
329922892365DC6C00EAFD97 /* TestImageLarge.jpg in Resources */,
|
||||||
|
@ -637,7 +645,7 @@
|
||||||
329922882365DC6C00EAFD97 /* TestImage.jpg in Resources */,
|
329922882365DC6C00EAFD97 /* TestImage.jpg in Resources */,
|
||||||
32B4A4822C082A160004E42C /* TestImage.svg in Resources */,
|
32B4A4822C082A160004E42C /* TestImage.svg in Resources */,
|
||||||
32515F9E24AF1919005E8F79 /* TestImageAnimated.webp in Resources */,
|
32515F9E24AF1919005E8F79 /* TestImageAnimated.webp in Resources */,
|
||||||
3299228E2365DC6C00EAFD97 /* TestImageAnimated.heic in Resources */,
|
3299228E2365DC6C00EAFD97 /* TestImageAnimated.heics in Resources */,
|
||||||
32515F9B24AF1919005E8F79 /* TestImageStatic.webp in Resources */,
|
32515F9B24AF1919005E8F79 /* TestImageStatic.webp in Resources */,
|
||||||
329922862365DC6C00EAFD97 /* TestImage.gif in Resources */,
|
329922862365DC6C00EAFD97 /* TestImage.gif in Resources */,
|
||||||
329922852365DC6C00EAFD97 /* TestEXIF.png in Resources */,
|
329922852365DC6C00EAFD97 /* TestEXIF.png in Resources */,
|
||||||
|
@ -657,11 +665,12 @@
|
||||||
324047452271956F007C53E1 /* TestEXIF.png in Resources */,
|
324047452271956F007C53E1 /* TestEXIF.png in Resources */,
|
||||||
32B99EA4203B31360017FD66 /* TestImage.jpg in Resources */,
|
32B99EA4203B31360017FD66 /* TestImage.jpg in Resources */,
|
||||||
3234306323E2BAC800C290C8 /* TestImage.pdf in Resources */,
|
3234306323E2BAC800C290C8 /* TestImage.pdf in Resources */,
|
||||||
|
324371382C4F9E0900BEB4F5 /* TestICCProfile.jpg in Resources */,
|
||||||
320224F82440C39B00E5B29D /* TestImageLarge.png in Resources */,
|
320224F82440C39B00E5B29D /* TestImageLarge.png in Resources */,
|
||||||
321F310F27D0DC490042B274 /* TestImage.bmp in Resources */,
|
321F310F27D0DC490042B274 /* TestImage.bmp in Resources */,
|
||||||
32B99EA6203B31360017FD66 /* TestImage.png in Resources */,
|
32B99EA6203B31360017FD66 /* TestImage.png in Resources */,
|
||||||
32648068250232F7004FA0FC /* 1@2x.gif in Resources */,
|
32648068250232F7004FA0FC /* 1@2x.gif in Resources */,
|
||||||
3297A0A023374D1700814590 /* TestImageAnimated.heic in Resources */,
|
3297A0A023374D1700814590 /* TestImageAnimated.heics in Resources */,
|
||||||
3278F5E32B04C1AC0004A6EE /* IndexedPNG.png in Resources */,
|
3278F5E32B04C1AC0004A6EE /* IndexedPNG.png in Resources */,
|
||||||
32B99EA2203B31360017FD66 /* MonochromeTestImage.jpg in Resources */,
|
32B99EA2203B31360017FD66 /* MonochromeTestImage.jpg in Resources */,
|
||||||
32905E65211D786E00460FCF /* TestImage.heif in Resources */,
|
32905E65211D786E00460FCF /* TestImage.heif in Resources */,
|
||||||
|
@ -687,13 +696,14 @@
|
||||||
32905E64211D786E00460FCF /* TestImage.heif in Resources */,
|
32905E64211D786E00460FCF /* TestImage.heif in Resources */,
|
||||||
43828A451DA67F9900000E62 /* TestImageLarge.jpg in Resources */,
|
43828A451DA67F9900000E62 /* TestImageLarge.jpg in Resources */,
|
||||||
3234306223E2BAC800C290C8 /* TestImage.pdf in Resources */,
|
3234306223E2BAC800C290C8 /* TestImage.pdf in Resources */,
|
||||||
|
324371372C4F9E0900BEB4F5 /* TestICCProfile.jpg in Resources */,
|
||||||
320224F72440C39B00E5B29D /* TestImageLarge.png in Resources */,
|
320224F72440C39B00E5B29D /* TestImageLarge.png in Resources */,
|
||||||
321F310E27D0DC490042B274 /* TestImage.bmp in Resources */,
|
321F310E27D0DC490042B274 /* TestImage.bmp in Resources */,
|
||||||
433BBBB71D7EF8200086B6E9 /* TestImage.gif in Resources */,
|
433BBBB71D7EF8200086B6E9 /* TestImage.gif in Resources */,
|
||||||
32648067250232F7004FA0FC /* 1@2x.gif in Resources */,
|
32648067250232F7004FA0FC /* 1@2x.gif in Resources */,
|
||||||
433BBBB91D7EF8260086B6E9 /* TestImage.png in Resources */,
|
433BBBB91D7EF8260086B6E9 /* TestImage.png in Resources */,
|
||||||
3278F5E22B04C1AC0004A6EE /* IndexedPNG.png in Resources */,
|
3278F5E22B04C1AC0004A6EE /* IndexedPNG.png in Resources */,
|
||||||
3297A09F23374D1700814590 /* TestImageAnimated.heic in Resources */,
|
3297A09F23374D1700814590 /* TestImageAnimated.heics in Resources */,
|
||||||
327054E2206CEFF3006EA328 /* TestImageAnimated.apng in Resources */,
|
327054E2206CEFF3006EA328 /* TestImageAnimated.apng in Resources */,
|
||||||
32B4A4802C082A160004E42C /* TestImage.svg in Resources */,
|
32B4A4802C082A160004E42C /* TestImage.svg in Resources */,
|
||||||
32515F9C24AF1919005E8F79 /* TestImageAnimated.webp in Resources */,
|
32515F9C24AF1919005E8F79 /* TestImageAnimated.webp in Resources */,
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 117 KiB |
|
@ -325,7 +325,7 @@ static BOOL _isCalled;
|
||||||
- (void)test23AnimatedImageViewCategoryProgressive {
|
- (void)test23AnimatedImageViewCategoryProgressive {
|
||||||
XCTestExpectation *expectation = [self expectationWithDescription:@"test SDAnimatedImageView view category progressive"];
|
XCTestExpectation *expectation = [self expectationWithDescription:@"test SDAnimatedImageView view category progressive"];
|
||||||
SDAnimatedImageView *imageView = [SDAnimatedImageView new];
|
SDAnimatedImageView *imageView = [SDAnimatedImageView new];
|
||||||
NSURL *testURL = [NSURL URLWithString:kTestGIFURL];
|
NSURL *testURL = [NSURL URLWithString:@"https://raw.githubusercontent.com/onevcat/APNGKit/2.2.0/Tests/APNGKitTests/Resources/General/APNG-cube.apng"];
|
||||||
[SDImageCache.sharedImageCache removeImageFromMemoryForKey:testURL.absoluteString];
|
[SDImageCache.sharedImageCache removeImageFromMemoryForKey:testURL.absoluteString];
|
||||||
[SDImageCache.sharedImageCache removeImageFromDiskForKey:testURL.absoluteString];
|
[SDImageCache.sharedImageCache removeImageFromDiskForKey:testURL.absoluteString];
|
||||||
[imageView sd_setImageWithURL:testURL placeholderImage:nil options:SDWebImageProgressiveLoad progress:^(NSInteger receivedSize, NSInteger expectedSize, NSURL * _Nullable targetURL) {
|
[imageView sd_setImageWithURL:testURL placeholderImage:nil options:SDWebImageProgressiveLoad progress:^(NSInteger receivedSize, NSInteger expectedSize, NSURL * _Nullable targetURL) {
|
||||||
|
|
|
@ -14,6 +14,12 @@
|
||||||
static NSString *kTestImageKeyJPEG = @"TestImageKey.jpg";
|
static NSString *kTestImageKeyJPEG = @"TestImageKey.jpg";
|
||||||
static NSString *kTestImageKeyPNG = @"TestImageKey.png";
|
static NSString *kTestImageKeyPNG = @"TestImageKey.png";
|
||||||
|
|
||||||
|
@interface SDCallbackQueue ()
|
||||||
|
|
||||||
|
@property (nonatomic, strong, nonnull) dispatch_queue_t queue;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
@interface SDImageCacheTests : SDTestCase <NSFileManagerDelegate>
|
@interface SDImageCacheTests : SDTestCase <NSFileManagerDelegate>
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
@ -374,12 +380,12 @@ static NSString *kTestImageKeyPNG = @"TestImageKey.png";
|
||||||
|
|
||||||
[[SDImageCodersManager sharedManager] removeCoder:testDecoder];
|
[[SDImageCodersManager sharedManager] removeCoder:testDecoder];
|
||||||
|
|
||||||
[[SDImageCache sharedImageCache] removeImageForKey:key withCompletion:^{
|
[cache removeImageFromMemoryForKey:key];
|
||||||
[expectation fulfill];
|
[cache removeImageFromDiskForKey:key];
|
||||||
}];
|
[expectation fulfill];
|
||||||
}];
|
}];
|
||||||
|
|
||||||
[self waitForExpectationsWithCommonTimeout];
|
[self waitForExpectationsWithTimeout:10 handler:nil];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)test41StoreImageDataToDiskWithCustomFileManager {
|
- (void)test41StoreImageDataToDiskWithCustomFileManager {
|
||||||
|
@ -670,32 +676,43 @@ static NSString *kTestImageKeyPNG = @"TestImageKey.png";
|
||||||
[self waitForExpectationsWithCommonTimeout];
|
[self waitForExpectationsWithCommonTimeout];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
- (void)test48CacheUseConcurrentIOQueue {
|
- (void)test48CacheUseConcurrentIOQueue {
|
||||||
XCTestExpectation *expectation = [self expectationWithDescription:@"SDImageCache concurrent ioQueue"];
|
XCTestExpectation *expectation1 = [self expectationWithDescription:@"SDImageCache concurrent ioQueue1"];
|
||||||
expectation.expectedFulfillmentCount = 2;
|
XCTestExpectation *expectation2 = [self expectationWithDescription:@"SDImageCache concurrent ioQueue2"];
|
||||||
|
|
||||||
SDImageCacheConfig *config = [SDImageCacheConfig new];
|
SDImageCacheConfig *config = [SDImageCacheConfig new];
|
||||||
dispatch_queue_attr_t attr = dispatch_queue_attr_make_with_qos_class(DISPATCH_QUEUE_CONCURRENT, QOS_CLASS_BACKGROUND, 0);
|
dispatch_queue_attr_t attr = dispatch_queue_attr_make_with_qos_class(DISPATCH_QUEUE_CONCURRENT, QOS_CLASS_BACKGROUND, 0);
|
||||||
config.ioQueueAttributes = attr;
|
config.ioQueueAttributes = attr;
|
||||||
|
|
||||||
SDImageCache *cache = [[SDImageCache alloc] initWithNamespace:@"Concurrent" diskCacheDirectory:@"/" config:config];
|
SDImageCache *cache = [[SDImageCache alloc] initWithNamespace:@"Concurrent" diskCacheDirectory:@"/" config:config];
|
||||||
NSData *pngData = [NSData dataWithContentsOfFile:[self testPNGPath]];
|
|
||||||
// Added test case for custom queue
|
// Added test case for custom queue
|
||||||
[SDCallbackQueue.globalQueue async:^{
|
SDCallbackQueue *globalQueue = SDCallbackQueue.globalQueue;
|
||||||
SDWebImageContext *context = @{SDWebImageContextCallbackQueue : SDCallbackQueue.currentQueue};
|
globalQueue.policy = SDCallbackPolicyDispatch;
|
||||||
|
[globalQueue async:^{
|
||||||
|
SDCallbackQueue *currentQueue = SDCallbackQueue.currentQueue;
|
||||||
|
SDWebImageContext *context = @{SDWebImageContextCallbackQueue : currentQueue};
|
||||||
|
expect(globalQueue.queue).equal(currentQueue.queue);
|
||||||
expect(NSThread.isMainThread).beFalsy();
|
expect(NSThread.isMainThread).beFalsy();
|
||||||
[cache queryCacheOperationForKey:@"Key1" options:0 context:context done:^(UIImage * _Nullable image, NSData * _Nullable data, SDImageCacheType cacheType) {
|
[cache queryCacheOperationForKey:@"Key1" options:0 context:context done:^(UIImage * _Nullable image, NSData * _Nullable data, SDImageCacheType cacheType) {
|
||||||
expect(data).beNil();
|
SDCallbackQueue *currentQueue1 = SDCallbackQueue.currentQueue;
|
||||||
|
expect(globalQueue.queue).equal(currentQueue1.queue);
|
||||||
expect(NSThread.isMainThread).beFalsy();
|
expect(NSThread.isMainThread).beFalsy();
|
||||||
[expectation fulfill];
|
[expectation1 fulfill];
|
||||||
}];
|
}];
|
||||||
[cache storeImageData:pngData forKey:@"Key1" completion:^{
|
[cache queryCacheOperationForKey:@"Key2" options:0 context:context done:^(UIImage * _Nullable image, NSData * _Nullable data, SDImageCacheType cacheType) {
|
||||||
[expectation fulfill];
|
SDCallbackQueue *currentQueue2 = SDCallbackQueue.currentQueue;
|
||||||
|
expect(globalQueue.queue).equal(currentQueue2.queue);
|
||||||
|
expect(NSThread.isMainThread).beFalsy();
|
||||||
|
[expectation2 fulfill];
|
||||||
}];
|
}];
|
||||||
}];
|
}];
|
||||||
|
|
||||||
[self waitForExpectationsWithCommonTimeout];
|
[self waitForExpectationsWithTimeout:10 handler:^(NSError * _Nullable error) {
|
||||||
|
[cache clearDiskOnCompletion:nil];
|
||||||
|
}];
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
#pragma mark - SDImageCache & SDImageCachesManager
|
#pragma mark - SDImageCache & SDImageCachesManager
|
||||||
- (void)test49SDImageCacheQueryOp {
|
- (void)test49SDImageCacheQueryOp {
|
||||||
|
|
|
@ -206,7 +206,11 @@
|
||||||
- (void)test13ThatHEICWorks {
|
- (void)test13ThatHEICWorks {
|
||||||
if (@available(iOS 11, tvOS 11, macOS 10.13, *)) {
|
if (@available(iOS 11, tvOS 11, macOS 10.13, *)) {
|
||||||
NSURL *heicURL = [[NSBundle bundleForClass:[self class]] URLForResource:@"TestImage" withExtension:@"heic"];
|
NSURL *heicURL = [[NSBundle bundleForClass:[self class]] URLForResource:@"TestImage" withExtension:@"heic"];
|
||||||
|
#if SD_MAC
|
||||||
BOOL supportsEncoding = !SDTestCase.isCI; // GitHub Action Mac env currently does not support HEIC encoding
|
BOOL supportsEncoding = !SDTestCase.isCI; // GitHub Action Mac env currently does not support HEIC encoding
|
||||||
|
#else
|
||||||
|
BOOL supportsEncoding = YES; // GitHub Action Mac env with simulator, supported from 20240707.1
|
||||||
|
#endif
|
||||||
[self verifyCoder:[SDImageIOCoder sharedCoder]
|
[self verifyCoder:[SDImageIOCoder sharedCoder]
|
||||||
withLocalImageURL:heicURL
|
withLocalImageURL:heicURL
|
||||||
supportsEncoding:supportsEncoding
|
supportsEncoding:supportsEncoding
|
||||||
|
@ -236,8 +240,9 @@
|
||||||
|
|
||||||
- (void)test16ThatHEICAnimatedWorks {
|
- (void)test16ThatHEICAnimatedWorks {
|
||||||
if (@available(iOS 13, tvOS 13, macOS 10.15, *)) {
|
if (@available(iOS 13, tvOS 13, macOS 10.15, *)) {
|
||||||
NSURL *heicURL = [[NSBundle bundleForClass:[self class]] URLForResource:@"TestImageAnimated" withExtension:@"heic"];
|
NSURL *heicURL = [[NSBundle bundleForClass:[self class]] URLForResource:@"TestImageAnimated" withExtension:@"heics"];
|
||||||
BOOL supportsEncoding = !SDTestCase.isCI; // GitHub Action Mac env currently does not support HEIC encoding
|
BOOL supportsEncoding = !SDTestCase.isCI; // GitHub Action Mac env currently does not support HEICS animated encoding (but HEIC supported, I don't know why)
|
||||||
|
// See: #3227
|
||||||
BOOL isAnimatedImage = YES;
|
BOOL isAnimatedImage = YES;
|
||||||
[self verifyCoder:[SDImageHEICCoder sharedCoder]
|
[self verifyCoder:[SDImageHEICCoder sharedCoder]
|
||||||
withLocalImageURL:heicURL
|
withLocalImageURL:heicURL
|
||||||
|
@ -297,7 +302,11 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)test21ThatEmbedThumbnailHEICWorks {
|
- (void)test21ThatEmbedThumbnailHEICWorks {
|
||||||
|
#if SD_MAC
|
||||||
BOOL supportsEncoding = !SDTestCase.isCI; // GitHub Action Mac env currently does not support HEIC encoding
|
BOOL supportsEncoding = !SDTestCase.isCI; // GitHub Action Mac env currently does not support HEIC encoding
|
||||||
|
#else
|
||||||
|
BOOL supportsEncoding = YES; // GitHub Action Mac env with simulator, supported from 20240707.1
|
||||||
|
#endif
|
||||||
if (!supportsEncoding) {
|
if (!supportsEncoding) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,7 @@ const int64_t kMinDelayNanosecond = NSEC_PER_MSEC * 100; // 0.1s
|
||||||
NSString *const kTestJPEGURL = @"https://placehold.co/50x50.jpg";
|
NSString *const kTestJPEGURL = @"https://placehold.co/50x50.jpg";
|
||||||
NSString *const kTestProgressiveJPEGURL = @"https://raw.githubusercontent.com/ibireme/YYImage/master/Demo/YYImageDemo/mew_progressive.jpg";
|
NSString *const kTestProgressiveJPEGURL = @"https://raw.githubusercontent.com/ibireme/YYImage/master/Demo/YYImageDemo/mew_progressive.jpg";
|
||||||
NSString *const kTestPNGURL = @"https://placehold.co/50x50.png";
|
NSString *const kTestPNGURL = @"https://placehold.co/50x50.png";
|
||||||
NSString *const kTestGIFURL = @"https://media.giphy.com/media/UEsrLdv7ugRTq/giphy.gif";
|
NSString *const kTestGIFURL = @"https://upload.wikimedia.org/wikipedia/commons/2/2c/Rotating_earth_%28large%29.gif";
|
||||||
NSString *const kTestAPNGPURL = @"https://upload.wikimedia.org/wikipedia/commons/1/14/Animated_PNG_example_bouncing_beach_ball.png";
|
NSString *const kTestAPNGPURL = @"https://upload.wikimedia.org/wikipedia/commons/1/14/Animated_PNG_example_bouncing_beach_ball.png";
|
||||||
|
|
||||||
@implementation SDTestCase
|
@implementation SDTestCase
|
||||||
|
|
|
@ -640,7 +640,8 @@
|
||||||
|
|
||||||
- (void)test22ThatForceDecodePolicyAutomatic {
|
- (void)test22ThatForceDecodePolicyAutomatic {
|
||||||
XCTestExpectation *expectation = [self expectationWithDescription:@"Automatic policy with ICC profile colorspace image should force-decode"];
|
XCTestExpectation *expectation = [self expectationWithDescription:@"Automatic policy with ICC profile colorspace image should force-decode"];
|
||||||
NSURL *url = [NSURL URLWithString:@"http://photodb.illusdolphin.net/media/15292/browsertest.jpg"];
|
NSString * testImagePath = [[NSBundle bundleForClass:[self class]] pathForResource:@"TestICCProfile" ofType:@"jpg"];
|
||||||
|
NSURL *url = [NSURL fileURLWithPath:testImagePath];
|
||||||
SDImageCoderHelper.defaultDecodeSolution = SDImageCoderDecodeSolutionCoreGraphics; // Temp set
|
SDImageCoderHelper.defaultDecodeSolution = SDImageCoderDecodeSolutionCoreGraphics; // Temp set
|
||||||
[SDWebImageManager.sharedManager loadImageWithURL:url options:SDWebImageFromLoaderOnly context:@{SDWebImageContextImageForceDecodePolicy : @(SDImageForceDecodePolicyAutomatic)} progress:nil completed:^(UIImage * _Nullable image, NSData * _Nullable data, NSError * _Nullable error, SDImageCacheType cacheType, BOOL finished, NSURL * _Nullable imageURL) {
|
[SDWebImageManager.sharedManager loadImageWithURL:url options:SDWebImageFromLoaderOnly context:@{SDWebImageContextImageForceDecodePolicy : @(SDImageForceDecodePolicyAutomatic)} progress:nil completed:^(UIImage * _Nullable image, NSData * _Nullable data, NSError * _Nullable error, SDImageCacheType cacheType, BOOL finished, NSURL * _Nullable imageURL) {
|
||||||
expect(image).notTo.beNil();
|
expect(image).notTo.beNil();
|
||||||
|
|
Loading…
Reference in New Issue