Skip to content

Commit 5ba6914

Browse files
authored
Merge pull request #10 from link-u/feature/coverage
Added unit tests and remove inappropriate debugging code.
2 parents 240192f + f1d6dbe commit 5ba6914

File tree

912 files changed

+8534
-28
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

912 files changed

+8534
-28
lines changed

.github/workflows/check-image-decoding.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Check the decoded images.
22

3-
on: [push]
3+
on: [push, pull_request]
44

55
jobs:
66
build:

.travis.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,14 @@ script:
3939
- echo Build example
4040
- pod install --project-directory=Example
4141
- xcodebuild build -workspace Example/SDWebImageAVIFCoder.xcworkspace -scheme 'SDWebImageAVIFCoder-Example' -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 11 Pro' -configuration Debug | xcpretty -c
42-
- xcodebuild build -workspace Example/SDWebImageAVIFCoder.xcworkspace -scheme 'SDWebImageAVIFCoder-Example macOS' -sdk macosx -configuration Debug | xcpretty -c
42+
- xcodebuild build -workspace Example/SDWebImageAVIFCoder.xcworkspace -scheme 'SDWebImageAVIFCoder-Example macOS' -sdk macosx -configuration Debug | xcpretty -c
43+
- xcodebuild build -workspace Example/SDWebImageAVIFCoder.xcworkspace -scheme 'SDWebImageAVIFCoder_Example CLI' -sdk macosx -configuration Debug | xcpretty -c
44+
45+
- echo Clean builds
46+
- rm -rf ~/Library/Developer/Xcode/DerivedData/
47+
48+
- echo Run unit tests
49+
- xcodebuild clean build test -workspace Example/SDWebImageAVIFCoder.xcworkspace -scheme "SDWebImageAVIFCoder-Example" -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 11 Pro' -enableCodeCoverage 'YES' -configuration Debug | xcpretty -c
50+
51+
after_success:
52+
- bash <(curl -s https://codecov.io/bash)

Example/SDWebImageAVIFCoder.xcodeproj/project.pbxproj

Lines changed: 7240 additions & 0 deletions
Large diffs are not rendered by default.

Example/SDWebImageAVIFCoder.xcodeproj/xcshareddata/xcschemes/SDWebImageAVIFCoder-Example macOS.xcscheme

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,8 @@
2626
buildConfiguration = "Debug"
2727
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
2828
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29-
shouldUseLaunchSchemeArgsEnv = "YES">
30-
<Testables>
31-
</Testables>
29+
shouldUseLaunchSchemeArgsEnv = "YES"
30+
codeCoverageEnabled = "YES">
3231
<MacroExpansion>
3332
<BuildableReference
3433
BuildableIdentifier = "primary"
@@ -38,8 +37,8 @@
3837
ReferencedContainer = "container:SDWebImageAVIFCoder.xcodeproj">
3938
</BuildableReference>
4039
</MacroExpansion>
41-
<AdditionalOptions>
42-
</AdditionalOptions>
40+
<Testables>
41+
</Testables>
4342
</TestAction>
4443
<LaunchAction
4544
buildConfiguration = "Debug"
@@ -61,8 +60,6 @@
6160
ReferencedContainer = "container:SDWebImageAVIFCoder.xcodeproj">
6261
</BuildableReference>
6362
</BuildableProductRunnable>
64-
<AdditionalOptions>
65-
</AdditionalOptions>
6663
</LaunchAction>
6764
<ProfileAction
6865
buildConfiguration = "Release"

Example/SDWebImageAVIFCoder.xcodeproj/xcshareddata/xcschemes/SDWebImageAVIFCoder-Example.xcscheme

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,17 @@
2626
buildConfiguration = "Debug"
2727
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
2828
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29-
shouldUseLaunchSchemeArgsEnv = "YES">
29+
shouldUseLaunchSchemeArgsEnv = "YES"
30+
codeCoverageEnabled = "YES">
31+
<MacroExpansion>
32+
<BuildableReference
33+
BuildableIdentifier = "primary"
34+
BlueprintIdentifier = "6003F589195388D20070C39A"
35+
BuildableName = "SDWebImageAVIFCoder_Example.app"
36+
BlueprintName = "SDWebImageAVIFCoder_Example"
37+
ReferencedContainer = "container:SDWebImageAVIFCoder.xcodeproj">
38+
</BuildableReference>
39+
</MacroExpansion>
3040
<Testables>
3141
<TestableReference
3242
skipped = "NO">
@@ -39,17 +49,6 @@
3949
</BuildableReference>
4050
</TestableReference>
4151
</Testables>
42-
<MacroExpansion>
43-
<BuildableReference
44-
BuildableIdentifier = "primary"
45-
BlueprintIdentifier = "6003F589195388D20070C39A"
46-
BuildableName = "SDWebImageAVIFCoder_Example.app"
47-
BlueprintName = "SDWebImageAVIFCoder_Example"
48-
ReferencedContainer = "container:SDWebImageAVIFCoder.xcodeproj">
49-
</BuildableReference>
50-
</MacroExpansion>
51-
<AdditionalOptions>
52-
</AdditionalOptions>
5352
</TestAction>
5453
<LaunchAction
5554
buildConfiguration = "Debug"
@@ -71,8 +70,6 @@
7170
ReferencedContainer = "container:SDWebImageAVIFCoder.xcodeproj">
7271
</BuildableReference>
7372
</BuildableProductRunnable>
74-
<AdditionalOptions>
75-
</AdditionalOptions>
7673
</LaunchAction>
7774
<ProfileAction
7875
buildConfiguration = "Release"

Example/Tests/Images/.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/*.png
2+
!/white.png
3+
!/black.png
4+
!/e47a8c.png
5+
!/green.png
6+
!/red.png
7+
!/white.png
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

Example/Tests/Images/black.png

168 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)