|
|
@@ -51,9 +51,6 @@ class ImageDataProviderTests: XCTestCase {
|
|
|
waitForExpectations(timeout: 1, handler: nil)
|
|
|
}
|
|
|
|
|
|
- #if swift(>=5.5)
|
|
|
- #if canImport(_Concurrency)
|
|
|
- @available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *)
|
|
|
func testLocalFileImageDataProviderAsync() async {
|
|
|
let fm = FileManager.default
|
|
|
let document = try! fm.url(for: .documentDirectory, in: .userDomainMask, appropriateFor: nil, create: true)
|
|
|
@@ -70,9 +67,7 @@ class ImageDataProviderTests: XCTestCase {
|
|
|
XCTAssertEqual(value, testImageData)
|
|
|
try! fm.removeItem(at: fileURL)
|
|
|
}
|
|
|
- #endif
|
|
|
- #endif
|
|
|
-
|
|
|
+
|
|
|
func testLocalFileImageDataProviderMainQueue() {
|
|
|
let fm = FileManager.default
|
|
|
let document = try! fm.url(for: .documentDirectory, in: .userDomainMask, appropriateFor: nil, create: true)
|
|
|
@@ -92,10 +87,7 @@ class ImageDataProviderTests: XCTestCase {
|
|
|
|
|
|
XCTAssertTrue(called)
|
|
|
}
|
|
|
-
|
|
|
- #if swift(>=5.5)
|
|
|
- #if canImport(_Concurrency)
|
|
|
- @available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *)
|
|
|
+
|
|
|
func testLocalFileImageDataProviderMainQueueAsync() async {
|
|
|
let fm = FileManager.default
|
|
|
let document = try! fm.url(for: .documentDirectory, in: .userDomainMask, appropriateFor: nil, create: true)
|
|
|
@@ -114,8 +106,6 @@ class ImageDataProviderTests: XCTestCase {
|
|
|
|
|
|
XCTAssertTrue(called)
|
|
|
}
|
|
|
- #endif
|
|
|
- #endif
|
|
|
|
|
|
func testLocalFileCacheKey() {
|
|
|
let url1 = URL(string: "file:///Users/onevcat/Library/Developer/CoreSimulator/Devices/ABC/data/Containers/Bundle/Application/DEF/Kingfisher-Demo.app/images/kingfisher-1.jpg")!
|