Added SDWebImage Tests project. It uses CocoaPods (Expecta + XCTestAsync). Added some demo tests
Showing
8 changed files
with
487 additions
and
10 deletions
1 | -<?xml version="1.0" encoding="UTF-8"?> | ||
2 | -<Workspace | ||
3 | - version = "1.0"> | ||
4 | - <FileRef | ||
5 | - location = "group:SDWebImage.xcodeproj"> | ||
6 | - </FileRef> | ||
7 | - <FileRef | ||
8 | - location = "group:Examples/SDWebImage Demo.xcodeproj"> | ||
9 | - </FileRef> | ||
10 | -</Workspace> | 1 | +<?xml version='1.0' encoding='UTF-8'?><Workspace version='1.0'><FileRef location='group:SDWebImage.xcodeproj'/><FileRef location='group:Examples/SDWebImage Demo.xcodeproj'/><FileRef location='group:Tests/SDWebImage Tests.xcodeproj'/><FileRef location='group:Tests/Pods/Pods.xcodeproj'/></Workspace> |
Tests/Podfile
0 → 100644
1 | +xcodeproj 'SDWebImage Tests' | ||
2 | +workspace '../SDWebImage' | ||
3 | + | ||
4 | +def import_pods | ||
5 | + pod 'Expecta' # A Matcher Framework for Objective-C/Cocoa | ||
6 | + pod 'XCTestAsync' # Extension to XCTest for asynchronous testing | ||
7 | + pod 'SDWebImage', :path => '../' | ||
8 | +end | ||
9 | + | ||
10 | +target :ios do | ||
11 | + platform :ios, '5.0' | ||
12 | + link_with 'Tests' | ||
13 | + import_pods | ||
14 | +end |
1 | +// !$*UTF8*$! | ||
2 | +{ | ||
3 | + archiveVersion = 1; | ||
4 | + classes = { | ||
5 | + }; | ||
6 | + objectVersion = 46; | ||
7 | + objects = { | ||
8 | + | ||
9 | +/* Begin PBXBuildFile section */ | ||
10 | + ABC8501F672447AA91C788DA /* libPods-ios.a in Frameworks */ = {isa = PBXBuildFile; fileRef = EB0D107E6B4C4094BA2FEE29 /* libPods-ios.a */; }; | ||
11 | + DA248D57195472AA00390AB0 /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DA248D56195472AA00390AB0 /* XCTest.framework */; }; | ||
12 | + DA248D59195472AA00390AB0 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DA248D58195472AA00390AB0 /* Foundation.framework */; }; | ||
13 | + DA248D5B195472AA00390AB0 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DA248D5A195472AA00390AB0 /* UIKit.framework */; }; | ||
14 | + DA248D61195472AA00390AB0 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = DA248D5F195472AA00390AB0 /* InfoPlist.strings */; }; | ||
15 | + DA248D69195475D800390AB0 /* SDImageCacheTests.m in Sources */ = {isa = PBXBuildFile; fileRef = DA248D68195475D800390AB0 /* SDImageCacheTests.m */; }; | ||
16 | + DA248D6B195476AC00390AB0 /* SDWebImageManagerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = DA248D6A195476AC00390AB0 /* SDWebImageManagerTests.m */; }; | ||
17 | +/* End PBXBuildFile section */ | ||
18 | + | ||
19 | +/* Begin PBXFileReference section */ | ||
20 | + 5421361315E74CAA8FCCC423 /* Pods-ios.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ios.xcconfig"; path = "Pods/Pods-ios.xcconfig"; sourceTree = "<group>"; }; | ||
21 | + DA248D53195472AA00390AB0 /* Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; | ||
22 | + DA248D56195472AA00390AB0 /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; | ||
23 | + DA248D58195472AA00390AB0 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; | ||
24 | + DA248D5A195472AA00390AB0 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; }; | ||
25 | + DA248D5E195472AA00390AB0 /* Tests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Tests-Info.plist"; sourceTree = "<group>"; }; | ||
26 | + DA248D60195472AA00390AB0 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; }; | ||
27 | + DA248D64195472AA00390AB0 /* Tests-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Tests-Prefix.pch"; sourceTree = "<group>"; }; | ||
28 | + DA248D68195475D800390AB0 /* SDImageCacheTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDImageCacheTests.m; sourceTree = "<group>"; }; | ||
29 | + DA248D6A195476AC00390AB0 /* SDWebImageManagerTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDWebImageManagerTests.m; sourceTree = "<group>"; }; | ||
30 | + EB0D107E6B4C4094BA2FEE29 /* libPods-ios.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-ios.a"; sourceTree = BUILT_PRODUCTS_DIR; }; | ||
31 | +/* End PBXFileReference section */ | ||
32 | + | ||
33 | +/* Begin PBXFrameworksBuildPhase section */ | ||
34 | + DA248D50195472AA00390AB0 /* Frameworks */ = { | ||
35 | + isa = PBXFrameworksBuildPhase; | ||
36 | + buildActionMask = 2147483647; | ||
37 | + files = ( | ||
38 | + DA248D57195472AA00390AB0 /* XCTest.framework in Frameworks */, | ||
39 | + DA248D5B195472AA00390AB0 /* UIKit.framework in Frameworks */, | ||
40 | + DA248D59195472AA00390AB0 /* Foundation.framework in Frameworks */, | ||
41 | + ABC8501F672447AA91C788DA /* libPods-ios.a in Frameworks */, | ||
42 | + ); | ||
43 | + runOnlyForDeploymentPostprocessing = 0; | ||
44 | + }; | ||
45 | +/* End PBXFrameworksBuildPhase section */ | ||
46 | + | ||
47 | +/* Begin PBXGroup section */ | ||
48 | + DA248D451954721A00390AB0 = { | ||
49 | + isa = PBXGroup; | ||
50 | + children = ( | ||
51 | + DA248D5C195472AA00390AB0 /* Tests */, | ||
52 | + DA248D55195472AA00390AB0 /* Frameworks */, | ||
53 | + DA248D54195472AA00390AB0 /* Products */, | ||
54 | + 5421361315E74CAA8FCCC423 /* Pods-ios.xcconfig */, | ||
55 | + ); | ||
56 | + sourceTree = "<group>"; | ||
57 | + }; | ||
58 | + DA248D54195472AA00390AB0 /* Products */ = { | ||
59 | + isa = PBXGroup; | ||
60 | + children = ( | ||
61 | + DA248D53195472AA00390AB0 /* Tests.xctest */, | ||
62 | + ); | ||
63 | + name = Products; | ||
64 | + sourceTree = "<group>"; | ||
65 | + }; | ||
66 | + DA248D55195472AA00390AB0 /* Frameworks */ = { | ||
67 | + isa = PBXGroup; | ||
68 | + children = ( | ||
69 | + DA248D56195472AA00390AB0 /* XCTest.framework */, | ||
70 | + DA248D58195472AA00390AB0 /* Foundation.framework */, | ||
71 | + DA248D5A195472AA00390AB0 /* UIKit.framework */, | ||
72 | + EB0D107E6B4C4094BA2FEE29 /* libPods-ios.a */, | ||
73 | + ); | ||
74 | + name = Frameworks; | ||
75 | + sourceTree = "<group>"; | ||
76 | + }; | ||
77 | + DA248D5C195472AA00390AB0 /* Tests */ = { | ||
78 | + isa = PBXGroup; | ||
79 | + children = ( | ||
80 | + DA248D5D195472AA00390AB0 /* Supporting Files */, | ||
81 | + DA248D68195475D800390AB0 /* SDImageCacheTests.m */, | ||
82 | + DA248D6A195476AC00390AB0 /* SDWebImageManagerTests.m */, | ||
83 | + ); | ||
84 | + path = Tests; | ||
85 | + sourceTree = "<group>"; | ||
86 | + }; | ||
87 | + DA248D5D195472AA00390AB0 /* Supporting Files */ = { | ||
88 | + isa = PBXGroup; | ||
89 | + children = ( | ||
90 | + DA248D5E195472AA00390AB0 /* Tests-Info.plist */, | ||
91 | + DA248D5F195472AA00390AB0 /* InfoPlist.strings */, | ||
92 | + DA248D64195472AA00390AB0 /* Tests-Prefix.pch */, | ||
93 | + ); | ||
94 | + name = "Supporting Files"; | ||
95 | + sourceTree = "<group>"; | ||
96 | + }; | ||
97 | +/* End PBXGroup section */ | ||
98 | + | ||
99 | +/* Begin PBXNativeTarget section */ | ||
100 | + DA248D52195472AA00390AB0 /* Tests */ = { | ||
101 | + isa = PBXNativeTarget; | ||
102 | + buildConfigurationList = DA248D67195472AA00390AB0 /* Build configuration list for PBXNativeTarget "Tests" */; | ||
103 | + buildPhases = ( | ||
104 | + FBC8982311CD4ED9A3006D45 /* Check Pods Manifest.lock */, | ||
105 | + DA248D4F195472AA00390AB0 /* Sources */, | ||
106 | + DA248D50195472AA00390AB0 /* Frameworks */, | ||
107 | + DA248D51195472AA00390AB0 /* Resources */, | ||
108 | + D6347736BDF64FC5A4D078A4 /* Copy Pods Resources */, | ||
109 | + ); | ||
110 | + buildRules = ( | ||
111 | + ); | ||
112 | + dependencies = ( | ||
113 | + ); | ||
114 | + name = Tests; | ||
115 | + productName = Tests; | ||
116 | + productReference = DA248D53195472AA00390AB0 /* Tests.xctest */; | ||
117 | + productType = "com.apple.product-type.bundle.unit-test"; | ||
118 | + }; | ||
119 | +/* End PBXNativeTarget section */ | ||
120 | + | ||
121 | +/* Begin PBXProject section */ | ||
122 | + DA248D461954721A00390AB0 /* Project object */ = { | ||
123 | + isa = PBXProject; | ||
124 | + attributes = { | ||
125 | + LastUpgradeCheck = 0510; | ||
126 | + }; | ||
127 | + buildConfigurationList = DA248D491954721A00390AB0 /* Build configuration list for PBXProject "SDWebImage Tests" */; | ||
128 | + compatibilityVersion = "Xcode 3.2"; | ||
129 | + developmentRegion = English; | ||
130 | + hasScannedForEncodings = 0; | ||
131 | + knownRegions = ( | ||
132 | + en, | ||
133 | + ); | ||
134 | + mainGroup = DA248D451954721A00390AB0; | ||
135 | + productRefGroup = DA248D54195472AA00390AB0 /* Products */; | ||
136 | + projectDirPath = ""; | ||
137 | + projectRoot = ""; | ||
138 | + targets = ( | ||
139 | + DA248D52195472AA00390AB0 /* Tests */, | ||
140 | + ); | ||
141 | + }; | ||
142 | +/* End PBXProject section */ | ||
143 | + | ||
144 | +/* Begin PBXResourcesBuildPhase section */ | ||
145 | + DA248D51195472AA00390AB0 /* Resources */ = { | ||
146 | + isa = PBXResourcesBuildPhase; | ||
147 | + buildActionMask = 2147483647; | ||
148 | + files = ( | ||
149 | + DA248D61195472AA00390AB0 /* InfoPlist.strings in Resources */, | ||
150 | + ); | ||
151 | + runOnlyForDeploymentPostprocessing = 0; | ||
152 | + }; | ||
153 | +/* End PBXResourcesBuildPhase section */ | ||
154 | + | ||
155 | +/* Begin PBXShellScriptBuildPhase section */ | ||
156 | + D6347736BDF64FC5A4D078A4 /* Copy Pods Resources */ = { | ||
157 | + isa = PBXShellScriptBuildPhase; | ||
158 | + buildActionMask = 2147483647; | ||
159 | + files = ( | ||
160 | + ); | ||
161 | + inputPaths = ( | ||
162 | + ); | ||
163 | + name = "Copy Pods Resources"; | ||
164 | + outputPaths = ( | ||
165 | + ); | ||
166 | + runOnlyForDeploymentPostprocessing = 0; | ||
167 | + shellPath = /bin/sh; | ||
168 | + shellScript = "\"${SRCROOT}/Pods/Pods-ios-resources.sh\"\n"; | ||
169 | + showEnvVarsInLog = 0; | ||
170 | + }; | ||
171 | + FBC8982311CD4ED9A3006D45 /* Check Pods Manifest.lock */ = { | ||
172 | + isa = PBXShellScriptBuildPhase; | ||
173 | + buildActionMask = 2147483647; | ||
174 | + files = ( | ||
175 | + ); | ||
176 | + inputPaths = ( | ||
177 | + ); | ||
178 | + name = "Check Pods Manifest.lock"; | ||
179 | + outputPaths = ( | ||
180 | + ); | ||
181 | + runOnlyForDeploymentPostprocessing = 0; | ||
182 | + shellPath = /bin/sh; | ||
183 | + shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; | ||
184 | + showEnvVarsInLog = 0; | ||
185 | + }; | ||
186 | +/* End PBXShellScriptBuildPhase section */ | ||
187 | + | ||
188 | +/* Begin PBXSourcesBuildPhase section */ | ||
189 | + DA248D4F195472AA00390AB0 /* Sources */ = { | ||
190 | + isa = PBXSourcesBuildPhase; | ||
191 | + buildActionMask = 2147483647; | ||
192 | + files = ( | ||
193 | + DA248D69195475D800390AB0 /* SDImageCacheTests.m in Sources */, | ||
194 | + DA248D6B195476AC00390AB0 /* SDWebImageManagerTests.m in Sources */, | ||
195 | + ); | ||
196 | + runOnlyForDeploymentPostprocessing = 0; | ||
197 | + }; | ||
198 | +/* End PBXSourcesBuildPhase section */ | ||
199 | + | ||
200 | +/* Begin PBXVariantGroup section */ | ||
201 | + DA248D5F195472AA00390AB0 /* InfoPlist.strings */ = { | ||
202 | + isa = PBXVariantGroup; | ||
203 | + children = ( | ||
204 | + DA248D60195472AA00390AB0 /* en */, | ||
205 | + ); | ||
206 | + name = InfoPlist.strings; | ||
207 | + sourceTree = "<group>"; | ||
208 | + }; | ||
209 | +/* End PBXVariantGroup section */ | ||
210 | + | ||
211 | +/* Begin XCBuildConfiguration section */ | ||
212 | + DA248D4A1954721A00390AB0 /* Debug */ = { | ||
213 | + isa = XCBuildConfiguration; | ||
214 | + buildSettings = { | ||
215 | + }; | ||
216 | + name = Debug; | ||
217 | + }; | ||
218 | + DA248D4B1954721A00390AB0 /* Release */ = { | ||
219 | + isa = XCBuildConfiguration; | ||
220 | + buildSettings = { | ||
221 | + }; | ||
222 | + name = Release; | ||
223 | + }; | ||
224 | + DA248D65195472AA00390AB0 /* Debug */ = { | ||
225 | + isa = XCBuildConfiguration; | ||
226 | + baseConfigurationReference = 5421361315E74CAA8FCCC423 /* Pods-ios.xcconfig */; | ||
227 | + buildSettings = { | ||
228 | + ALWAYS_SEARCH_USER_PATHS = NO; | ||
229 | + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; | ||
230 | + CLANG_CXX_LIBRARY = "libc++"; | ||
231 | + CLANG_ENABLE_MODULES = YES; | ||
232 | + CLANG_ENABLE_OBJC_ARC = YES; | ||
233 | + CLANG_WARN_BOOL_CONVERSION = YES; | ||
234 | + CLANG_WARN_CONSTANT_CONVERSION = YES; | ||
235 | + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; | ||
236 | + CLANG_WARN_EMPTY_BODY = YES; | ||
237 | + CLANG_WARN_ENUM_CONVERSION = YES; | ||
238 | + CLANG_WARN_INT_CONVERSION = YES; | ||
239 | + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; | ||
240 | + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; | ||
241 | + COPY_PHASE_STRIP = NO; | ||
242 | + FRAMEWORK_SEARCH_PATHS = ( | ||
243 | + "$(SDKROOT)/Developer/Library/Frameworks", | ||
244 | + "$(inherited)", | ||
245 | + "$(DEVELOPER_FRAMEWORKS_DIR)", | ||
246 | + ); | ||
247 | + GCC_C_LANGUAGE_STANDARD = gnu99; | ||
248 | + GCC_DYNAMIC_NO_PIC = NO; | ||
249 | + GCC_OPTIMIZATION_LEVEL = 0; | ||
250 | + GCC_PRECOMPILE_PREFIX_HEADER = YES; | ||
251 | + GCC_PREFIX_HEADER = "Tests/Tests-Prefix.pch"; | ||
252 | + GCC_PREPROCESSOR_DEFINITIONS = ( | ||
253 | + "DEBUG=1", | ||
254 | + "$(inherited)", | ||
255 | + ); | ||
256 | + GCC_SYMBOLS_PRIVATE_EXTERN = NO; | ||
257 | + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; | ||
258 | + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; | ||
259 | + GCC_WARN_UNDECLARED_SELECTOR = YES; | ||
260 | + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; | ||
261 | + GCC_WARN_UNUSED_FUNCTION = YES; | ||
262 | + GCC_WARN_UNUSED_VARIABLE = YES; | ||
263 | + INFOPLIST_FILE = "Tests/Tests-Info.plist"; | ||
264 | + IPHONEOS_DEPLOYMENT_TARGET = 5.0; | ||
265 | + ONLY_ACTIVE_ARCH = YES; | ||
266 | + PRODUCT_NAME = "$(TARGET_NAME)"; | ||
267 | + SDKROOT = iphoneos; | ||
268 | + WRAPPER_EXTENSION = xctest; | ||
269 | + }; | ||
270 | + name = Debug; | ||
271 | + }; | ||
272 | + DA248D66195472AA00390AB0 /* Release */ = { | ||
273 | + isa = XCBuildConfiguration; | ||
274 | + baseConfigurationReference = 5421361315E74CAA8FCCC423 /* Pods-ios.xcconfig */; | ||
275 | + buildSettings = { | ||
276 | + ALWAYS_SEARCH_USER_PATHS = NO; | ||
277 | + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; | ||
278 | + CLANG_CXX_LIBRARY = "libc++"; | ||
279 | + CLANG_ENABLE_MODULES = YES; | ||
280 | + CLANG_ENABLE_OBJC_ARC = YES; | ||
281 | + CLANG_WARN_BOOL_CONVERSION = YES; | ||
282 | + CLANG_WARN_CONSTANT_CONVERSION = YES; | ||
283 | + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; | ||
284 | + CLANG_WARN_EMPTY_BODY = YES; | ||
285 | + CLANG_WARN_ENUM_CONVERSION = YES; | ||
286 | + CLANG_WARN_INT_CONVERSION = YES; | ||
287 | + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; | ||
288 | + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; | ||
289 | + COPY_PHASE_STRIP = YES; | ||
290 | + ENABLE_NS_ASSERTIONS = NO; | ||
291 | + FRAMEWORK_SEARCH_PATHS = ( | ||
292 | + "$(SDKROOT)/Developer/Library/Frameworks", | ||
293 | + "$(inherited)", | ||
294 | + "$(DEVELOPER_FRAMEWORKS_DIR)", | ||
295 | + ); | ||
296 | + GCC_C_LANGUAGE_STANDARD = gnu99; | ||
297 | + GCC_PRECOMPILE_PREFIX_HEADER = YES; | ||
298 | + GCC_PREFIX_HEADER = "Tests/Tests-Prefix.pch"; | ||
299 | + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; | ||
300 | + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; | ||
301 | + GCC_WARN_UNDECLARED_SELECTOR = YES; | ||
302 | + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; | ||
303 | + GCC_WARN_UNUSED_FUNCTION = YES; | ||
304 | + GCC_WARN_UNUSED_VARIABLE = YES; | ||
305 | + INFOPLIST_FILE = "Tests/Tests-Info.plist"; | ||
306 | + IPHONEOS_DEPLOYMENT_TARGET = 5.0; | ||
307 | + PRODUCT_NAME = "$(TARGET_NAME)"; | ||
308 | + SDKROOT = iphoneos; | ||
309 | + VALIDATE_PRODUCT = YES; | ||
310 | + WRAPPER_EXTENSION = xctest; | ||
311 | + }; | ||
312 | + name = Release; | ||
313 | + }; | ||
314 | +/* End XCBuildConfiguration section */ | ||
315 | + | ||
316 | +/* Begin XCConfigurationList section */ | ||
317 | + DA248D491954721A00390AB0 /* Build configuration list for PBXProject "SDWebImage Tests" */ = { | ||
318 | + isa = XCConfigurationList; | ||
319 | + buildConfigurations = ( | ||
320 | + DA248D4A1954721A00390AB0 /* Debug */, | ||
321 | + DA248D4B1954721A00390AB0 /* Release */, | ||
322 | + ); | ||
323 | + defaultConfigurationIsVisible = 0; | ||
324 | + defaultConfigurationName = Release; | ||
325 | + }; | ||
326 | + DA248D67195472AA00390AB0 /* Build configuration list for PBXNativeTarget "Tests" */ = { | ||
327 | + isa = XCConfigurationList; | ||
328 | + buildConfigurations = ( | ||
329 | + DA248D65195472AA00390AB0 /* Debug */, | ||
330 | + DA248D66195472AA00390AB0 /* Release */, | ||
331 | + ); | ||
332 | + defaultConfigurationIsVisible = 0; | ||
333 | + defaultConfigurationName = Release; | ||
334 | + }; | ||
335 | +/* End XCConfigurationList section */ | ||
336 | + }; | ||
337 | + rootObject = DA248D461954721A00390AB0 /* Project object */; | ||
338 | +} |
Tests/Tests/SDImageCacheTests.m
0 → 100644
1 | +// | ||
2 | +// SDImageCacheTests.m | ||
3 | +// SDWebImage Tests | ||
4 | +// | ||
5 | +// Created by Bogdan Poplauschi on 20/06/14. | ||
6 | +// | ||
7 | +// | ||
8 | + | ||
9 | +#define EXP_SHORTHAND // required by Expecta | ||
10 | + | ||
11 | + | ||
12 | +#import <XCTest/XCTest.h> | ||
13 | +#import <XCTestAsync/XCTestAsync.h> | ||
14 | +#import <Expecta.h> | ||
15 | + | ||
16 | +#import "SDImageCache.h" | ||
17 | + | ||
18 | + | ||
19 | +@interface SDImageCacheTests : XCTestCase | ||
20 | + | ||
21 | +@end | ||
22 | + | ||
23 | +@implementation SDImageCacheTests | ||
24 | + | ||
25 | +- (void)setUp | ||
26 | +{ | ||
27 | + [super setUp]; | ||
28 | + // Put setup code here. This method is called before the invocation of each test method in the class. | ||
29 | +} | ||
30 | + | ||
31 | +- (void)tearDown | ||
32 | +{ | ||
33 | + // Put teardown code here. This method is called after the invocation of each test method in the class. | ||
34 | + [super tearDown]; | ||
35 | +} | ||
36 | + | ||
37 | +- (void)testSharedImageCache { | ||
38 | + SDImageCache *sharedImageCache = [SDImageCache sharedImageCache]; | ||
39 | + | ||
40 | + expect(sharedImageCache).toNot.beNil(); | ||
41 | +} | ||
42 | + | ||
43 | +@end |
Tests/Tests/SDWebImageManagerTests.m
0 → 100644
1 | +// | ||
2 | +// SDWebImageManagerTests.m | ||
3 | +// SDWebImage Tests | ||
4 | +// | ||
5 | +// Created by Bogdan Poplauschi on 20/06/14. | ||
6 | +// | ||
7 | +// | ||
8 | + | ||
9 | +#define EXP_SHORTHAND // required by Expecta | ||
10 | + | ||
11 | + | ||
12 | +#import <XCTest/XCTest.h> | ||
13 | +#import <XCTestAsync/XCTestAsync.h> | ||
14 | +#import <Expecta.h> | ||
15 | + | ||
16 | +#import "SDWebImageManager.h" | ||
17 | + | ||
18 | +static int64_t kAsyncTestTimeout = 5; | ||
19 | + | ||
20 | + | ||
21 | +@interface SDWebImageManagerTests : XCTestCase | ||
22 | + | ||
23 | +@end | ||
24 | + | ||
25 | +@implementation SDWebImageManagerTests | ||
26 | + | ||
27 | +- (void)setUp | ||
28 | +{ | ||
29 | + [super setUp]; | ||
30 | + // Put setup code here. This method is called before the invocation of each test method in the class. | ||
31 | +} | ||
32 | + | ||
33 | +- (void)tearDown | ||
34 | +{ | ||
35 | + // Put teardown code here. This method is called after the invocation of each test method in the class. | ||
36 | + [super tearDown]; | ||
37 | +} | ||
38 | + | ||
39 | +- (void)testThatDownloadInvokesCompletionBlockWithCorrectParamsAsync { | ||
40 | + NSURL *originalImageURL = [NSURL URLWithString:@"http://static2.dmcdn.net/static/video/656/177/44771656:jpeg_preview_small.jpg?20120509154705"]; | ||
41 | + | ||
42 | + [[SDWebImageManager sharedManager] downloadImageWithURL:originalImageURL options:SDWebImageRefreshCached progress:^(NSInteger receivedSize, NSInteger expectedSize) { | ||
43 | +// expect(receivedSize).to.beLessThanOrEqualTo(expectedSize); | ||
44 | + } completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, BOOL finished, NSURL *imageURL) { | ||
45 | + expect(image).toNot.beNil(); | ||
46 | + expect(error).to.beNil(); | ||
47 | + expect(originalImageURL).to.equal(imageURL); | ||
48 | + | ||
49 | + NSLog(@"xxxx"); | ||
50 | + | ||
51 | + XCAsyncSuccess(); | ||
52 | + }]; | ||
53 | + | ||
54 | + XCAsyncFailAfter(kAsyncTestTimeout, @"Download image timed out"); | ||
55 | +} | ||
56 | + | ||
57 | +@end |
Tests/Tests/Tests-Info.plist
0 → 100644
1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
2 | +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
3 | +<plist version="1.0"> | ||
4 | +<dict> | ||
5 | + <key>CFBundleDevelopmentRegion</key> | ||
6 | + <string>en</string> | ||
7 | + <key>CFBundleExecutable</key> | ||
8 | + <string>${EXECUTABLE_NAME}</string> | ||
9 | + <key>CFBundleIdentifier</key> | ||
10 | + <string>com.SDWebImage.${PRODUCT_NAME:rfc1034identifier}</string> | ||
11 | + <key>CFBundleInfoDictionaryVersion</key> | ||
12 | + <string>6.0</string> | ||
13 | + <key>CFBundlePackageType</key> | ||
14 | + <string>BNDL</string> | ||
15 | + <key>CFBundleShortVersionString</key> | ||
16 | + <string>1.0</string> | ||
17 | + <key>CFBundleSignature</key> | ||
18 | + <string>????</string> | ||
19 | + <key>CFBundleVersion</key> | ||
20 | + <string>1</string> | ||
21 | +</dict> | ||
22 | +</plist> |
Tests/Tests/Tests-Prefix.pch
0 → 100644
Tests/Tests/en.lproj/InfoPlist.strings
0 → 100644
-
Please register or login to post a comment