-
Notifications
You must be signed in to change notification settings - Fork 232
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #77 from SDWebImage/bugfix_onSuccess_when_memory_c…
…ache_hit Fix the issue that WebImage's onSuccess does not get called when memory cache hit for new created View Struct
- Loading branch information
Showing
6 changed files
with
60 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import XCTest | ||
import SwiftUI | ||
|
||
class TestUtils { | ||
static var testBundle = Bundle(for: TestUtils.self) | ||
|
||
class func testImageBundle() -> Bundle { | ||
let imagePath = (testBundle.resourcePath! as NSString).appendingPathComponent("Images.bundle") | ||
return Bundle(path: imagePath)! | ||
} | ||
|
||
class func testImageData(name: String) -> Data? { | ||
guard let url = testImageBundle().url(forResource: name, withExtension: nil) else { | ||
return nil | ||
} | ||
return try? Data(contentsOf: url) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters