Change the encoding test into official macOS unit test

Added `testWebPEncodingWithICCProfile`
This commit is contained in:
DreamPiggy 2023-11-08 18:14:10 +08:00
parent daa8373449
commit 835eb13e30
12 changed files with 407 additions and 14 deletions

View File

@ -1,2 +1,2 @@
github "SDWebImage/SDWebImage" "5.10.0"
github "SDWebImage/libwebp-Xcode" "1.1.0"
github "SDWebImage/SDWebImage" "5.18.4"
github "SDWebImage/libwebp-Xcode" "1.3.2"

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
</dict>
</plist>

View File

@ -10,22 +10,59 @@
#import <SDWebImageWebPCoder/SDWebImageWebPCoder.h>
#import <SDWebImage/SDWebImage.h>
@interface ViewController ()
@property (nonatomic, strong) UIImageView *imageView1;
@property (nonatomic, strong) SDAnimatedImageView *imageView2;
@end
@implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];
// Test transcoding
NSString *jpegPath = [NSBundle.mainBundle pathForResource:@"before.jpeg" ofType:nil inDirectory:@"examples/pexels-egor-kamelev-920163"];
NSData *jpegData = [NSData dataWithContentsOfFile:jpegPath];
NSImage *jpegImage = [[NSImage alloc] initWithData:jpegData];
[SDImageCache.sharedImageCache clearDiskOnCompletion:nil];
NSData *webpData = [[SDImageWebPCoder sharedCoder] encodedDataWithImage:jpegImage format:SDImageFormatWebP options:nil];
NSString *webpPath = [[jpegPath stringByDeletingLastPathComponent] stringByAppendingPathComponent:@"after.webp"];
BOOL success = [webpData writeToFile:webpPath atomically:YES];
NSAssert(success, @"Encode WebP success");
[[SDImageCodersManager sharedManager] addCoder:[SDImageWebPCoder sharedCoder]];
self.imageView1 = [UIImageView new];
self.imageView1.imageScaling = NSImageScaleProportionallyUpOrDown;
[self.view addSubview:self.imageView1];
self.imageView2 = [SDAnimatedImageView new];
self.imageView2.imageScaling = NSImageScaleProportionallyUpOrDown;
[self.view addSubview:self.imageView2];
NSURL *staticWebPURL = [NSURL URLWithString:@"https://www.gstatic.com/webp/gallery/2.webp"];
NSURL *animatedWebPURL = [NSURL URLWithString:@"http://littlesvr.ca/apng/images/world-cup-2014-42.webp"];
[self.imageView1 sd_setImageWithURL:staticWebPURL placeholderImage:nil options:0 context:@{SDWebImageContextImageScaleDownLimitBytes : @(1024 * 100)} progress:nil completed:^(UIImage * _Nullable image, NSError * _Nullable error, SDImageCacheType cacheType, NSURL * _Nullable imageURL) {
NSCAssert(image.size.width < 200, @"Limit Bytes should limit image size to 186");
if (image) {
NSLog(@"%@", @"Static WebP load success");
}
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
NSUInteger maxFileSize = 4096;
NSData *webpData = [SDImageWebPCoder.sharedCoder encodedDataWithImage:image format:SDImageFormatWebP options:@{SDImageCoderEncodeMaxFileSize : @(maxFileSize)}];
if (webpData) {
NSCAssert(webpData.length <= maxFileSize, @"WebP Encoding with max file size limit works");
NSLog(@"%@", @"WebP encoding success");
}
});
}];
[self.imageView2 sd_setImageWithURL:animatedWebPURL placeholderImage:nil options:SDWebImageProgressiveLoad completed:^(UIImage * _Nullable image, NSError * _Nullable error, SDImageCacheType cacheType, NSURL * _Nullable imageURL) {
if (image) {
NSLog(@"%@", @"Animated WebP load success");
}
}];
}
- (void)viewWillLayout {
[super viewWillLayout];
self.imageView1.frame = CGRectMake(0, 0, self.view.bounds.size.width, self.view.bounds.size.height / 2);
self.imageView2.frame = CGRectMake(0, self.view.bounds.size.height / 2, self.view.bounds.size.width, self.view.bounds.size.height / 2);
}
- (void)setRepresentedObject:(id)representedObject {
[super setRepresentedObject:representedObject];

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

View File

@ -35,6 +35,7 @@
329D55C52AFB8A1B008B4DA3 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
329D55C72AFB8A1B008B4DA3 /* SDWebImageWebPCoderExample_macOS.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = SDWebImageWebPCoderExample_macOS.entitlements; sourceTree = "<group>"; };
329D55E02AFB8C39008B4DA3 /* examples */ = {isa = PBXFileReference; lastKnownFileType = folder; path = examples; sourceTree = "<group>"; };
329D55E22AFB916E008B4DA3 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
4038A28BEB6E86807E9286D7 /* Pods_SDWebImageWebPCoderExample_macOS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SDWebImageWebPCoderExample_macOS.framework; sourceTree = BUILT_PRODUCTS_DIR; };
803D79CE213597CB00C815FC /* SDWebImageWebPCoderExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SDWebImageWebPCoderExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
803D79D1213597CB00C815FC /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
@ -75,6 +76,7 @@
329D55B92AFB8A1A008B4DA3 /* SDWebImageWebPCoderExample-macOS */ = {
isa = PBXGroup;
children = (
329D55E22AFB916E008B4DA3 /* Info.plist */,
329D55E02AFB8C39008B4DA3 /* examples */,
329D55BA2AFB8A1A008B4DA3 /* AppDelegate.h */,
329D55BB2AFB8A1A008B4DA3 /* AppDelegate.m */,
@ -386,6 +388,7 @@
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = "SDWebImageWebPCoderExample-macOS/Info.plist";
INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2023 SDWebImage. All rights reserved.";
INFOPLIST_KEY_NSMainStoryboardFile = Main;
INFOPLIST_KEY_NSPrincipalClass = NSApplication;
@ -418,6 +421,7 @@
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = "SDWebImageWebPCoderExample-macOS/Info.plist";
INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2023 SDWebImage. All rights reserved.";
INFOPLIST_KEY_NSMainStoryboardFile = Main;
INFOPLIST_KEY_NSPrincipalClass = NSApplication;

View File

@ -0,0 +1,78 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1410"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "329D55B72AFB8A1A008B4DA3"
BuildableName = "SDWebImageWebPCoderExample-macOS.app"
BlueprintName = "SDWebImageWebPCoderExample-macOS"
ReferencedContainer = "container:SDWebImageWebPCoderExample.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "329D55B72AFB8A1A008B4DA3"
BuildableName = "SDWebImageWebPCoderExample-macOS.app"
BlueprintName = "SDWebImageWebPCoderExample-macOS"
ReferencedContainer = "container:SDWebImageWebPCoderExample.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "329D55B72AFB8A1A008B4DA3"
BuildableName = "SDWebImageWebPCoderExample-macOS.app"
BlueprintName = "SDWebImageWebPCoderExample-macOS"
ReferencedContainer = "container:SDWebImageWebPCoderExample.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

View File

@ -22,3 +22,10 @@ target 'SDWebImageWebPCoderTests' do
pod 'Expecta'
pod 'SDWebImageWebPCoder', :path => './'
end
target 'SDWebImageWebPCoderTests-macOS' do
platform :osx, '11.0'
project test_project_path
pod 'Expecta'
pod 'SDWebImageWebPCoder', :path => './'
end

View File

@ -7,9 +7,6 @@
<FileRef
location = "group:Tests/SDWebImageWebPCoderTests.xcodeproj">
</FileRef>
<FileRef
location = "group:SDWebImageWebPCoder.xcodeproj">
</FileRef>
<FileRef
location = "group:Pods/Pods.xcodeproj">
</FileRef>

View File

Before

Width:  |  Height:  |  Size: 97 KiB

After

Width:  |  Height:  |  Size: 97 KiB

View File

@ -338,6 +338,26 @@ const int64_t kAsyncTestTimeout = 5;
expect(255 * b1).notTo.equal(255 * b2);
}
- (void)testWebPEncodingWithICCProfile {
// Test transcoding
NSString *jpegPath = [[NSBundle bundleForClass:[self class]] pathForResource:@"TestColorspaceBefore" ofType:@"jpeg"];
NSData *jpegData = [NSData dataWithContentsOfFile:jpegPath];
UIImage *jpegImage = [[UIImage alloc] initWithData:jpegData];
NSData *webpData = [[SDImageWebPCoder sharedCoder] encodedDataWithImage:jpegImage format:SDImageFormatWebP options:nil];
// Re-decode to pick color
UIImage *webpImage = [[SDImageWebPCoder sharedCoder] decodedImageWithData:webpData options:nil];
CGPoint point1 = CGPointMake(310, 70);
UIColor *color1 = [webpImage sd_colorAtPoint:point1];
CGFloat r1;
CGFloat g1;
CGFloat b1;
[color1 getRed:&r1 green:&g1 blue:&b1 alpha:nil];
expect(255 * r1).beCloseToWithin(0, 5);
expect(255 * g1).beCloseToWithin(38, 5);
expect(255 * b1).beCloseToWithin(135, 5);
}
@end
@implementation SDWebImageWebPCoderTests (Helpers)

View File

@ -11,6 +11,15 @@
3219F3B2228B0453003822A6 /* TestImageBlendAnimated.webp in Resources */ = {isa = PBXBuildFile; fileRef = 3219F3B1228B0453003822A6 /* TestImageBlendAnimated.webp */; };
325E268E25C82BE1000B807B /* TestImageGrayscale.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 325E268D25C82BE1000B807B /* TestImageGrayscale.jpg */; };
326420312A5D53E300EE3E46 /* TestColorspaceStatic.webp in Resources */ = {isa = PBXBuildFile; fileRef = 326420302A5D53E300EE3E46 /* TestColorspaceStatic.webp */; };
32B4C78B2AFB954C003A4BC7 /* TestImageGrayscale.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 325E268D25C82BE1000B807B /* TestImageGrayscale.jpg */; };
32B4C78C2AFB954C003A4BC7 /* TestColorspaceStatic.webp in Resources */ = {isa = PBXBuildFile; fileRef = 326420302A5D53E300EE3E46 /* TestColorspaceStatic.webp */; };
32B4C78D2AFB954C003A4BC7 /* TestImageBlendAnimated.webp in Resources */ = {isa = PBXBuildFile; fileRef = 3219F3B1228B0453003822A6 /* TestImageBlendAnimated.webp */; };
32B4C78E2AFB954C003A4BC7 /* TestImageAnimated.webp in Resources */ = {isa = PBXBuildFile; fileRef = 808C919B213FD2B2004B0F7C /* TestImageAnimated.webp */; };
32B4C78F2AFB954C003A4BC7 /* TestImageStatic.webp in Resources */ = {isa = PBXBuildFile; fileRef = 808C919A213FD2B2004B0F7C /* TestImageStatic.webp */; };
32B4C7902AFB954E003A4BC7 /* SDWebImageWebPCoderTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 808C918D213FD131004B0F7C /* SDWebImageWebPCoderTests.m */; };
32B4C7922AFB959E003A4BC7 /* TestColorspaceBefore.jpeg in Resources */ = {isa = PBXBuildFile; fileRef = 32B4C7912AFB959E003A4BC7 /* TestColorspaceBefore.jpeg */; };
32B4C7932AFB959E003A4BC7 /* TestColorspaceBefore.jpeg in Resources */ = {isa = PBXBuildFile; fileRef = 32B4C7912AFB959E003A4BC7 /* TestColorspaceBefore.jpeg */; };
3DCFBEFFFAB96D2ACC81D9E4 /* Pods_SDWebImageWebPCoderTests_macOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 629C9E800FD4422F8978409C /* Pods_SDWebImageWebPCoderTests_macOS.framework */; };
808C918E213FD131004B0F7C /* SDWebImageWebPCoderTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 808C918D213FD131004B0F7C /* SDWebImageWebPCoderTests.m */; };
808C919C213FD2B2004B0F7C /* TestImageStatic.webp in Resources */ = {isa = PBXBuildFile; fileRef = 808C919A213FD2B2004B0F7C /* TestImageStatic.webp */; };
808C919D213FD2B2004B0F7C /* TestImageAnimated.webp in Resources */ = {isa = PBXBuildFile; fileRef = 808C919B213FD2B2004B0F7C /* TestImageAnimated.webp */; };
@ -21,16 +30,29 @@
3219F3B1228B0453003822A6 /* TestImageBlendAnimated.webp */ = {isa = PBXFileReference; lastKnownFileType = file; path = TestImageBlendAnimated.webp; sourceTree = "<group>"; };
325E268D25C82BE1000B807B /* TestImageGrayscale.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = TestImageGrayscale.jpg; sourceTree = "<group>"; };
326420302A5D53E300EE3E46 /* TestColorspaceStatic.webp */ = {isa = PBXFileReference; lastKnownFileType = file; path = TestColorspaceStatic.webp; sourceTree = "<group>"; };
32B4C7842AFB9544003A4BC7 /* SDWebImageWebPCoderTests-macOS.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "SDWebImageWebPCoderTests-macOS.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
32B4C7912AFB959E003A4BC7 /* TestColorspaceBefore.jpeg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = TestColorspaceBefore.jpeg; sourceTree = "<group>"; };
46F21AD7D1692EBAC4D0FF33 /* Pods_SDWebImageWebPCoderTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SDWebImageWebPCoderTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
629C9E800FD4422F8978409C /* Pods_SDWebImageWebPCoderTests_macOS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SDWebImageWebPCoderTests_macOS.framework; sourceTree = BUILT_PRODUCTS_DIR; };
629CDA5B28E4CDE69D5A5051 /* Pods-SDWebImageWebPCoderTests-macOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SDWebImageWebPCoderTests-macOS.release.xcconfig"; path = "../Pods/Target Support Files/Pods-SDWebImageWebPCoderTests-macOS/Pods-SDWebImageWebPCoderTests-macOS.release.xcconfig"; sourceTree = "<group>"; };
808C918B213FD130004B0F7C /* SDWebImageWebPCoderTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SDWebImageWebPCoderTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
808C918D213FD131004B0F7C /* SDWebImageWebPCoderTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDWebImageWebPCoderTests.m; sourceTree = "<group>"; };
808C918F213FD131004B0F7C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
808C919A213FD2B2004B0F7C /* TestImageStatic.webp */ = {isa = PBXFileReference; lastKnownFileType = file; path = TestImageStatic.webp; sourceTree = "<group>"; };
808C919B213FD2B2004B0F7C /* TestImageAnimated.webp */ = {isa = PBXFileReference; lastKnownFileType = file; path = TestImageAnimated.webp; sourceTree = "<group>"; };
D92E6791BF088D1A101E670E /* Pods-SDWebImageWebPCoderTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SDWebImageWebPCoderTests.release.xcconfig"; path = "../Pods/Target Support Files/Pods-SDWebImageWebPCoderTests/Pods-SDWebImageWebPCoderTests.release.xcconfig"; sourceTree = "<group>"; };
F121CFAEBEFA209D335C5C6D /* Pods-SDWebImageWebPCoderTests-macOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SDWebImageWebPCoderTests-macOS.debug.xcconfig"; path = "../Pods/Target Support Files/Pods-SDWebImageWebPCoderTests-macOS/Pods-SDWebImageWebPCoderTests-macOS.debug.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
32B4C7812AFB9544003A4BC7 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
3DCFBEFFFAB96D2ACC81D9E4 /* Pods_SDWebImageWebPCoderTests_macOS.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
808C9188213FD130004B0F7C /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
@ -47,6 +69,8 @@
children = (
28D8AA3D3015E075692FD3E3 /* Pods-SDWebImageWebPCoderTests.debug.xcconfig */,
D92E6791BF088D1A101E670E /* Pods-SDWebImageWebPCoderTests.release.xcconfig */,
F121CFAEBEFA209D335C5C6D /* Pods-SDWebImageWebPCoderTests-macOS.debug.xcconfig */,
629CDA5B28E4CDE69D5A5051 /* Pods-SDWebImageWebPCoderTests-macOS.release.xcconfig */,
);
name = Pods;
sourceTree = "<group>";
@ -65,6 +89,7 @@
isa = PBXGroup;
children = (
808C918B213FD130004B0F7C /* SDWebImageWebPCoderTests.xctest */,
32B4C7842AFB9544003A4BC7 /* SDWebImageWebPCoderTests-macOS.xctest */,
);
name = Products;
sourceTree = "<group>";
@ -82,6 +107,7 @@
808C9199213FD2B2004B0F7C /* Images */ = {
isa = PBXGroup;
children = (
32B4C7912AFB959E003A4BC7 /* TestColorspaceBefore.jpeg */,
326420302A5D53E300EE3E46 /* TestColorspaceStatic.webp */,
325E268D25C82BE1000B807B /* TestImageGrayscale.jpg */,
808C919A213FD2B2004B0F7C /* TestImageStatic.webp */,
@ -95,6 +121,7 @@
isa = PBXGroup;
children = (
46F21AD7D1692EBAC4D0FF33 /* Pods_SDWebImageWebPCoderTests.framework */,
629C9E800FD4422F8978409C /* Pods_SDWebImageWebPCoderTests_macOS.framework */,
);
name = Frameworks;
sourceTree = "<group>";
@ -102,6 +129,25 @@
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
32B4C7832AFB9544003A4BC7 /* SDWebImageWebPCoderTests-macOS */ = {
isa = PBXNativeTarget;
buildConfigurationList = 32B4C78A2AFB9544003A4BC7 /* Build configuration list for PBXNativeTarget "SDWebImageWebPCoderTests-macOS" */;
buildPhases = (
09FBAA666475C3CD1B2B08E4 /* [CP] Check Pods Manifest.lock */,
32B4C7802AFB9544003A4BC7 /* Sources */,
32B4C7812AFB9544003A4BC7 /* Frameworks */,
32B4C7822AFB9544003A4BC7 /* Resources */,
F262B3BCDAE3514B4F1ED3D7 /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
dependencies = (
);
name = "SDWebImageWebPCoderTests-macOS";
productName = "SDWebImageWebPCoderTests-macOS";
productReference = 32B4C7842AFB9544003A4BC7 /* SDWebImageWebPCoderTests-macOS.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
808C918A213FD130004B0F7C /* SDWebImageWebPCoderTests */ = {
isa = PBXNativeTarget;
buildConfigurationList = 808C9195213FD131004B0F7C /* Build configuration list for PBXNativeTarget "SDWebImageWebPCoderTests" */;
@ -130,6 +176,9 @@
LastUpgradeCheck = 0940;
ORGANIZATIONNAME = SDWebImage;
TargetAttributes = {
32B4C7832AFB9544003A4BC7 = {
CreatedOnToolsVersion = 14.1;
};
808C918A213FD130004B0F7C = {
CreatedOnToolsVersion = 9.4.1;
};
@ -148,11 +197,25 @@
projectRoot = "";
targets = (
808C918A213FD130004B0F7C /* SDWebImageWebPCoderTests */,
32B4C7832AFB9544003A4BC7 /* SDWebImageWebPCoderTests-macOS */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
32B4C7822AFB9544003A4BC7 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
32B4C78E2AFB954C003A4BC7 /* TestImageAnimated.webp in Resources */,
32B4C78C2AFB954C003A4BC7 /* TestColorspaceStatic.webp in Resources */,
32B4C78D2AFB954C003A4BC7 /* TestImageBlendAnimated.webp in Resources */,
32B4C7932AFB959E003A4BC7 /* TestColorspaceBefore.jpeg in Resources */,
32B4C78B2AFB954C003A4BC7 /* TestImageGrayscale.jpg in Resources */,
32B4C78F2AFB954C003A4BC7 /* TestImageStatic.webp in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
808C9189213FD130004B0F7C /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
@ -160,6 +223,7 @@
3219F3B2228B0453003822A6 /* TestImageBlendAnimated.webp in Resources */,
808C919D213FD2B2004B0F7C /* TestImageAnimated.webp in Resources */,
808C919C213FD2B2004B0F7C /* TestImageStatic.webp in Resources */,
32B4C7922AFB959E003A4BC7 /* TestColorspaceBefore.jpeg in Resources */,
326420312A5D53E300EE3E46 /* TestColorspaceStatic.webp in Resources */,
325E268E25C82BE1000B807B /* TestImageGrayscale.jpg in Resources */,
);
@ -168,6 +232,28 @@
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
09FBAA666475C3CD1B2B08E4 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = (
);
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-SDWebImageWebPCoderTests-macOS-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
16EA90D31CB9146CCF2C1C4E /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
@ -203,9 +289,34 @@
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
F262B3BCDAE3514B4F1ED3D7 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-SDWebImageWebPCoderTests-macOS/Pods-SDWebImageWebPCoderTests-macOS-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
name = "[CP] Embed Pods Frameworks";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-SDWebImageWebPCoderTests-macOS/Pods-SDWebImageWebPCoderTests-macOS-frameworks-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-SDWebImageWebPCoderTests-macOS/Pods-SDWebImageWebPCoderTests-macOS-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
32B4C7802AFB9544003A4BC7 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
32B4C7902AFB954E003A4BC7 /* SDWebImageWebPCoderTests.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
808C9187213FD130004B0F7C /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
@ -217,6 +328,47 @@
/* End PBXSourcesBuildPhase section */
/* Begin XCBuildConfiguration section */
32B4C7882AFB9544003A4BC7 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = F121CFAEBEFA209D335C5C6D /* Pods-SDWebImageWebPCoderTests-macOS.debug.xcconfig */;
buildSettings = {
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = Info.plist;
MACOSX_DEPLOYMENT_TARGET = 13.0;
MARKETING_VERSION = 1.0;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.SDWebImageWebPCoderTests-macOS";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx;
SWIFT_EMIT_LOC_STRINGS = NO;
};
name = Debug;
};
32B4C7892AFB9544003A4BC7 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 629CDA5B28E4CDE69D5A5051 /* Pods-SDWebImageWebPCoderTests-macOS.release.xcconfig */;
buildSettings = {
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = Info.plist;
MACOSX_DEPLOYMENT_TARGET = 13.0;
MARKETING_VERSION = 1.0;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.SDWebImageWebPCoderTests-macOS";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx;
SWIFT_EMIT_LOC_STRINGS = NO;
};
name = Release;
};
806E77A32136A1C000A316D2 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
@ -401,6 +553,15 @@
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
32B4C78A2AFB9544003A4BC7 /* Build configuration list for PBXNativeTarget "SDWebImageWebPCoderTests-macOS" */ = {
isa = XCConfigurationList;
buildConfigurations = (
32B4C7882AFB9544003A4BC7 /* Debug */,
32B4C7892AFB9544003A4BC7 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
806E77972136A1C000A316D2 /* Build configuration list for PBXProject "SDWebImageWebPCoderTests" */ = {
isa = XCConfigurationList;
buildConfigurations = (

View File

@ -0,0 +1,78 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1410"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "32B4C7832AFB9544003A4BC7"
BuildableName = "SDWebImageWebPCoderTests-macOS.xctest"
BlueprintName = "SDWebImageWebPCoderTests-macOS"
ReferencedContainer = "container:SDWebImageWebPCoderTests.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO"
parallelizable = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "32B4C7832AFB9544003A4BC7"
BuildableName = "SDWebImageWebPCoderTests-macOS.xctest"
BlueprintName = "SDWebImageWebPCoderTests-macOS"
ReferencedContainer = "container:SDWebImageWebPCoderTests.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "32B4C7832AFB9544003A4BC7"
BuildableName = "SDWebImageWebPCoderTests-macOS.xctest"
BlueprintName = "SDWebImageWebPCoderTests-macOS"
ReferencedContainer = "container:SDWebImageWebPCoderTests.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>