|
|
@@ -186,22 +186,18 @@ class UIImageViewExtensionTests: XCTestCase {
|
|
|
task1Completion = true
|
|
|
}
|
|
|
|
|
|
- let task2 = imageView.kf_setImageWithURL(URL, placeholderImage: nil, optionsInfo: nil, progressBlock: { (receivedSize, totalSize) -> () in
|
|
|
+ let _ = imageView.kf_setImageWithURL(URL, placeholderImage: nil, optionsInfo: nil, progressBlock: { (receivedSize, totalSize) -> () in
|
|
|
|
|
|
}) { (image, error, cacheType, imageURL) -> () in
|
|
|
task2Completion = true
|
|
|
}
|
|
|
|
|
|
- let task3 = imageView.kf_setImageWithURL(URL, placeholderImage: nil, optionsInfo: nil, progressBlock: { (receivedSize, totalSize) -> () in
|
|
|
+ let _ = imageView.kf_setImageWithURL(URL, placeholderImage: nil, optionsInfo: nil, progressBlock: { (receivedSize, totalSize) -> () in
|
|
|
|
|
|
}) { (image, error, cacheType, imageURL) -> () in
|
|
|
task3Completion = true
|
|
|
}
|
|
|
|
|
|
- // Prevent unused warning.
|
|
|
- print(task2)
|
|
|
- print(task3)
|
|
|
-
|
|
|
task1.cancel()
|
|
|
|
|
|
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, Int64(Double(NSEC_PER_SEC) * 0.09)), dispatch_get_main_queue()) { () -> Void in
|