From 927b276d751907c4e14d711df09c05001e47abfe Mon Sep 17 00:00:00 2001 From: YoloMao Date: Mon, 25 Dec 2023 17:48:30 +0800 Subject: [PATCH] style: spelling and grammar check --- Sources/Cache/DiskStorage.swift | 2 +- Sources/Cache/ImageCache.swift | 18 +++++++++--------- Sources/Cache/MemoryStorage.swift | 2 +- Sources/Cache/Storage.swift | 2 +- .../ImageSource/AVAssetImageDataProvider.swift | 2 +- .../ImageSource/ImageDataProvider.swift | 2 +- Sources/General/ImageSource/Resource.swift | 2 +- Sources/General/KingfisherError.swift | 2 +- Sources/General/KingfisherManager.swift | 4 ++-- Sources/Image/ImageProgressive.swift | 4 ++-- Sources/Networking/ImageDownloader.swift | 6 +++--- Sources/Networking/ImagePrefetcher.swift | 2 +- Sources/Networking/SessionDataTask.swift | 2 +- .../DataReceivingSideEffectTests.swift | 10 +++++----- Tests/KingfisherTests/ImageCacheTests.swift | 4 ++-- .../KingfisherTests/ImageDownloaderTests.swift | 10 +++++----- .../ImageViewExtensionTests.swift | 6 +++--- .../KingfisherManagerTests.swift | 6 +++--- Tests/KingfisherTests/MemoryStorageTests.swift | 2 +- .../NSButtonExtensionTests.swift | 4 ++-- Tests/KingfisherTests/RetryStrategyTests.swift | 4 ++-- .../UIButtonExtensionTests.swift | 4 ++-- 22 files changed, 50 insertions(+), 50 deletions(-) diff --git a/Sources/Cache/DiskStorage.swift b/Sources/Cache/DiskStorage.swift index ada06f5bf..8c1f38efa 100644 --- a/Sources/Cache/DiskStorage.swift +++ b/Sources/Cache/DiskStorage.swift @@ -483,7 +483,7 @@ extension DiskStorage { /// Whether the cache file name will be hashed before storing. /// /// The default is `true`, which means that file name is hashed to protect user information (for example, the - /// orignial download URL which is used as the cache key). + /// original download URL which is used as the cache key). public var usesHashedFileName = true diff --git a/Sources/Cache/ImageCache.swift b/Sources/Cache/ImageCache.swift index 9d51391f6..945fb78e5 100644 --- a/Sources/Cache/ImageCache.swift +++ b/Sources/Cache/ImageCache.swift @@ -724,7 +724,7 @@ open class ImageCache { // MARK: Cleaning /// Clears the memory and disk storage of this cache. /// - /// This is an asynchronous operation. When the cache clearing opertaion finishes, the `handler` will be invoked. + /// This is an asynchronous operation. When the cache clearing operation finishes, the `handler` will be invoked. /// /// - Parameter handler: A closure that is invoked when the cache clearing operation finishes. /// This `handler` will be called from the main queue. @@ -740,7 +740,7 @@ open class ImageCache { /// Clears the disk storage of this cache. /// - /// This is an asynchronous operation. When the cache clearing opertaion finishes, the `handler` will be invoked. + /// This is an asynchronous operation. When the cache clearing operation finishes, the `handler` will be invoked. /// /// - Parameter handler: A closure that is invoked when the cache clearing operation finishes. /// This `handler` will be called from the main queue. @@ -757,7 +757,7 @@ open class ImageCache { /// Clears the expired images from the memory and disk storage. /// - /// This is an asynchronous operation. When the cache clearing opertaion finishes, the `handler` will be invoked. + /// This is an asynchronous operation. When the cache clearing operation finishes, the `handler` will be invoked. open func cleanExpiredCache(completion handler: (() -> Void)? = nil) { cleanExpiredMemoryCache() cleanExpiredDiskCache(completion: handler) @@ -777,7 +777,7 @@ open class ImageCache { /// Clears the expired images from disk storage. /// - /// This is an asynchronous operation. When the cache clearing opertaion finishes, the `handler` will be invoked. + /// This is an asynchronous operation. When the cache clearing operation finishes, the `handler` will be invoked. /// /// - Parameter handler: A closure which is invoked when the cache clearing operation finishes. /// This `handler` will be called from the main queue. @@ -811,7 +811,7 @@ open class ImageCache { #if !os(macOS) && !os(watchOS) /// Clears the expired images from disk storage when the app is in the background. /// - /// This is an asynchronous operation. When the cache clearing opertaion finishes, the `handler` will be invoked. + /// This is an asynchronous operation. When the cache clearing operation finishes, the `handler` will be invoked. /// /// In most cases, you should not call this method explicitly. It will be called automatically when a /// `UIApplicationDidEnterBackgroundNotification` is received. @@ -1120,7 +1120,7 @@ open class ImageCache { /// Clears the memory and disk storage of this cache. /// - /// This is an asynchronous operation. When the cache clearing opertaion finishes, the whole method returns. + /// This is an asynchronous operation. When the cache clearing operation finishes, the whole method returns. open func clearCache() async { await withCheckedContinuation { clearCache(completion: $0.resume) @@ -1129,7 +1129,7 @@ open class ImageCache { /// Clears the disk storage of this cache. /// - /// This is an asynchronous operation. When the cache clearing opertaion finishes, the whole method returns. + /// This is an asynchronous operation. When the cache clearing operation finishes, the whole method returns. open func clearDiskCache() async { await withCheckedContinuation { clearDiskCache(completion: $0.resume) @@ -1138,7 +1138,7 @@ open class ImageCache { /// Clears the expired images from the memory and disk storage. /// - /// This is an asynchronous operation. When the cache clearing opertaion finishes, the whole method returns. + /// This is an asynchronous operation. When the cache clearing operation finishes, the whole method returns. open func cleanExpiredCache() async { await withCheckedContinuation { cleanExpiredCache(completion: $0.resume) @@ -1147,7 +1147,7 @@ open class ImageCache { /// Clears the expired images from disk storage. /// - /// This is an asynchronous operation. When the cache clearing opertaion finishes, the whole method returns. + /// This is an asynchronous operation. When the cache clearing operation finishes, the whole method returns. open func cleanExpiredDiskCache() async { await withCheckedContinuation { cleanExpiredDiskCache(completion: $0.resume) diff --git a/Sources/Cache/MemoryStorage.swift b/Sources/Cache/MemoryStorage.swift index 43e519b60..d6bea4787 100644 --- a/Sources/Cache/MemoryStorage.swift +++ b/Sources/Cache/MemoryStorage.swift @@ -55,7 +55,7 @@ public enum MemoryStorage { let storage = NSCache>() - // Keys trackes the objects once inside the storage. + // Keys track the objects once inside the storage. // // For object removing triggered by user, the corresponding key would be also removed. However, for the object // removing triggered by cache rule/policy of system, the key will be remained there until next `removeExpired` diff --git a/Sources/Cache/Storage.swift b/Sources/Cache/Storage.swift index b12d6d050..4013a0844 100644 --- a/Sources/Cache/Storage.swift +++ b/Sources/Cache/Storage.swift @@ -120,6 +120,6 @@ public protocol DataTransformable { /// An empty object of `Self`. /// /// > In the cache, when the data is not actually loaded, this value will be returned as a placeholder. - /// > This varible should be returned quickly without any heavy operation inside. + /// > This variable should be returned quickly without any heavy operation inside. static var empty: Self { get } } diff --git a/Sources/General/ImageSource/AVAssetImageDataProvider.swift b/Sources/General/ImageSource/AVAssetImageDataProvider.swift index a7f2b3943..c87ca4e41 100644 --- a/Sources/General/ImageSource/AVAssetImageDataProvider.swift +++ b/Sources/General/ImageSource/AVAssetImageDataProvider.swift @@ -95,7 +95,7 @@ public struct AVAssetImageDataProvider: ImageDataProvider { /// - seconds: At which time in seconds in the asset the image should be generated. /// /// This method uses the `assetURL` parameter to create an `AVAssetImageGenerator` object, uses the `seconds` - /// paremeter to create a `CMTime`, then calls the ``init(assetImageGenerator:time:)`` initializer. + /// parameter to create a `CMTime`, then calls the ``init(assetImageGenerator:time:)`` initializer. /// public init(assetURL: URL, seconds: TimeInterval) { let time = CMTime(seconds: seconds, preferredTimescale: 600) diff --git a/Sources/General/ImageSource/ImageDataProvider.swift b/Sources/General/ImageSource/ImageDataProvider.swift index 2835e5ec8..0778dce9f 100644 --- a/Sources/General/ImageSource/ImageDataProvider.swift +++ b/Sources/General/ImageSource/ImageDataProvider.swift @@ -166,7 +166,7 @@ public struct RawImageDataProvider: ImageDataProvider { /// Creates an image data provider by the given raw `data` value and a `cacheKey` be used in Kingfisher cache. /// /// - Parameters: - /// - data: The raw data reprensents an image. + /// - data: The raw data represents an image. /// - cacheKey: The key is used for caching the image data. You need a different key for any different image. public init(data: Data, cacheKey: String) { self.data = data diff --git a/Sources/General/ImageSource/Resource.swift b/Sources/General/ImageSource/Resource.swift index b841889a4..3f7719e48 100644 --- a/Sources/General/ImageSource/Resource.swift +++ b/Sources/General/ImageSource/Resource.swift @@ -45,7 +45,7 @@ extension Resource { /// ``Source/network(_:)`` is returned. /// /// - Parameter overrideCacheKey: The key should be used to override the ``Resource/cacheKey`` when performing the - /// conversion. `nil` if not overriden and ``Resource/cacheKey`` of `self` is used. + /// conversion. `nil` if not overridden and ``Resource/cacheKey`` of `self` is used. /// - Returns: The converted source. /// public func convertToSource(overrideCacheKey: String? = nil) -> Source { diff --git a/Sources/General/KingfisherError.swift b/Sources/General/KingfisherError.swift index 6f785e1de..1673b610c 100644 --- a/Sources/General/KingfisherError.swift +++ b/Sources/General/KingfisherError.swift @@ -575,7 +575,7 @@ extension KingfisherError.ImageSettingErrorReason { case .dataProviderError(let provider, let error): return "Image data provider fails to provide data. Provider: \(provider), error: \(error)" case .alternativeSourcesExhausted(let errors): - return "Image setting from alternaive sources failed: \(errors)" + return "Image setting from alternative sources failed: \(errors)" } } diff --git a/Sources/General/KingfisherManager.swift b/Sources/General/KingfisherManager.swift index 4805c8473..25870d6d6 100644 --- a/Sources/General/KingfisherManager.swift +++ b/Sources/General/KingfisherManager.swift @@ -741,7 +741,7 @@ extension KingfisherManager { /// contains an `expectedContentLength` and always runs on the main queue. /// /// - Returns: The ``RetrieveImageResult`` containing the retrieved image object and cache type. - /// - Throws: A ``KingfisherError`` if any issue occured during the image retrieving progress. + /// - Throws: A ``KingfisherError`` if any issue occurred during the image retrieving progress. /// /// - Note: This method first checks whether the requested `resource` is already in the cache. If it is cached, /// it returns `nil` and invokes the `completionHandler` after retrieving the cached image. Otherwise, it downloads @@ -769,7 +769,7 @@ extension KingfisherManager { /// contains an `expectedContentLength` and always runs on the main queue. /// /// - Returns: The ``RetrieveImageResult`` containing the retrieved image object and cache type. - /// - Throws: A ``KingfisherError`` if any issue occured during the image retrieving progress. + /// - Throws: A ``KingfisherError`` if any issue occurred during the image retrieving progress. /// /// - Note: This method first checks whether the requested `source` is already in the cache. If it is cached, /// it returns `nil` and invokes the `completionHandler` after retrieving the cached image. Otherwise, it downloads diff --git a/Sources/Image/ImageProgressive.swift b/Sources/Image/ImageProgressive.swift index cad0363c6..2889b70a7 100644 --- a/Sources/Image/ImageProgressive.swift +++ b/Sources/Image/ImageProgressive.swift @@ -58,7 +58,7 @@ public struct ImageProgressive { /// A default `ImageProgressive` could be used across. It blurs the progressive loading with the fastest /// scan enabled and scan interval as 0. - @available(*, deprecated, message: "Getting a default `ImageProgressive` is deprecated due to its syntax symatic is not clear. Use `ImageProgressive.init` instead.", renamed: "init()") + @available(*, deprecated, message: "Getting a default `ImageProgressive` is deprecated due to its syntax semantic is not clear. Use `ImageProgressive.init` instead.", renamed: "init()") public static let `default` = ImageProgressive( isBlur: true, isFastestScan: true, @@ -76,7 +76,7 @@ public struct ImageProgressive { /// Called when an intermediate image is prepared and about to be set to the image view. /// - /// If implemneted, you should return an ``UpdatingStrategy`` value from this delegate. This value will be used to + /// If implemented, you should return an ``UpdatingStrategy`` value from this delegate. This value will be used to /// update the hosting view, if any. Otherwise, if there is no hosting view (i.e., the image retrieval is not /// happening from a view extension method), the returned ``UpdatingStrategy`` is ignored. public let onImageUpdated = Delegate() diff --git a/Sources/Networking/ImageDownloader.swift b/Sources/Networking/ImageDownloader.swift index 9758722a6..88a5f3c51 100644 --- a/Sources/Networking/ImageDownloader.swift +++ b/Sources/Networking/ImageDownloader.swift @@ -59,7 +59,7 @@ public struct ImageLoadingResult { /// Represents a task in the image downloading process. /// -/// When a download starts in Kingfisher, the invovled methods always return you an instance of ``DownloadTask``. If you +/// When a download starts in Kingfisher, the involved methods always return you an instance of ``DownloadTask``. If you /// need to cancel the task during the download process, you can keep a reference to the instance and call ``cancel()`` /// on it. public class DownloadTask { @@ -176,7 +176,7 @@ open class ImageDownloader { } } - /// The session delegate which is used to hadnle the session related tasks. + /// The session delegate which is used to handle the session related tasks. /// /// > Setting a new session delegate to the downloader will invalidate the existing session and create a new one /// > with the new value and the ``sessionConfiguration``. @@ -190,7 +190,7 @@ open class ImageDownloader { /// Whether the download requests should use pipeline or not. /// - /// It sets the `httpShouldUsePipelining` of the `URLRequest` for the downlaod task. Default is false. + /// It sets the `httpShouldUsePipelining` of the `URLRequest` for the download task. Default is false. open var requestsUsePipelining = false /// The delegate of this `ImageDownloader` object. diff --git a/Sources/Networking/ImagePrefetcher.swift b/Sources/Networking/ImagePrefetcher.swift index 87259ffac..26d9dce2a 100644 --- a/Sources/Networking/ImagePrefetcher.swift +++ b/Sources/Networking/ImagePrefetcher.swift @@ -350,7 +350,7 @@ public class ImagePrefetcher: CustomStringConvertible { private func reportCompletionOrStartNext() { if let resource = self.pendingSources.popFirst() { - // Loose call stack for huge ammount of sources. + // Loose call stack for huge amount of sources. prefetchQueue.async { self.startPrefetching(resource) } } else { guard allFinished else { return } diff --git a/Sources/Networking/SessionDataTask.swift b/Sources/Networking/SessionDataTask.swift index 4b925c049..5bba833c0 100644 --- a/Sources/Networking/SessionDataTask.swift +++ b/Sources/Networking/SessionDataTask.swift @@ -28,7 +28,7 @@ import Foundation /// Represents a session data task in ``ImageDownloader``. /// -/// Essetially, a ``SessionDataTask`` wraps a `URLSessionDataTask` and manages the download data. +/// Essentially, a ``SessionDataTask`` wraps a `URLSessionDataTask` and manages the download data. /// It uses a ``SessionDataTask/CancelToken`` to track the task and manage its cancellation. public class SessionDataTask { diff --git a/Tests/KingfisherTests/DataReceivingSideEffectTests.swift b/Tests/KingfisherTests/DataReceivingSideEffectTests.swift index 33d7e20ba..76e38b065 100644 --- a/Tests/KingfisherTests/DataReceivingSideEffectTests.swift +++ b/Tests/KingfisherTests/DataReceivingSideEffectTests.swift @@ -80,13 +80,13 @@ class DataReceivingSideEffectTests: XCTestCase { let url = testURLs[0] stub(url, data: testImageData, length: 123) - let receiver = DataReceivingNotAppyStub() + let receiver = DataReceivingNotApplyStub() let options: KingfisherOptionsInfo = [/*.onDataReceived([receiver]),*/ .waitForCache] KingfisherManager.shared.retrieveImage(with: url, options: options) { result in XCTAssertTrue(receiver.called) - XCTAssertFalse(receiver.appied) + XCTAssertFalse(receiver.applied) exp.fulfill() } waitForExpectations(timeout: 3, handler: nil) @@ -101,17 +101,17 @@ class DataReceivingStub: DataReceivingSideEffect { } } -class DataReceivingNotAppyStub: DataReceivingSideEffect { +class DataReceivingNotApplyStub: DataReceivingSideEffect { var called: Bool = false - var appied: Bool = false + var applied: Bool = false var onShouldApply: () -> Bool = { return false } func onDataReceived(_ session: URLSession, task: SessionDataTask, data: Data) { called = true if onShouldApply() { - appied = true + applied = true } } } diff --git a/Tests/KingfisherTests/ImageCacheTests.swift b/Tests/KingfisherTests/ImageCacheTests.swift index 23210b48b..db45ea081 100644 --- a/Tests/KingfisherTests/ImageCacheTests.swift +++ b/Tests/KingfisherTests/ImageCacheTests.swift @@ -310,7 +310,7 @@ class ImageCacheTests: XCTestCase { XCTAssertTrue(cachePath.hasSuffix(".jpg")) } - func testCachedImageIsFetchedSyncronouslyFromTheMemoryCache() { + func testCachedImageIsFetchedSynchronouslyFromTheMemoryCache() { cache.store(testImage, forKey: testKeys[0], toDisk: false) var foundImage: KFCrossPlatformImage? cache.retrieveImage(forKey: testKeys[0]) { result in @@ -319,7 +319,7 @@ class ImageCacheTests: XCTestCase { XCTAssertEqual(testImage, foundImage) } - func testCachedImageIsFetchedSyncronouslyFromTheMemoryCacheAsync() async throws { + func testCachedImageIsFetchedSynchronouslyFromTheMemoryCacheAsync() async throws { try await cache.store(testImage, forKey: testKeys[0], toDisk: false) let result = try await cache.retrieveImage(forKey: testKeys[0]) XCTAssertEqual(testImage, result.image) diff --git a/Tests/KingfisherTests/ImageDownloaderTests.swift b/Tests/KingfisherTests/ImageDownloaderTests.swift index 29f9ef4c8..66d4c0807 100644 --- a/Tests/KingfisherTests/ImageDownloaderTests.swift +++ b/Tests/KingfisherTests/ImageDownloaderTests.swift @@ -159,7 +159,7 @@ class ImageDownloaderTests: XCTestCase { downloadTaskCalled = true } - let someURL = URL(string: "some_strage_url")! + let someURL = URL(string: "some_strange_url")! let task = downloader.downloadImage(with: someURL, options: [.requestModifier(asyncModifier)]) { result in XCTAssertNotNil(result.value) XCTAssertEqual(result.value?.url, url) @@ -444,13 +444,13 @@ class ImageDownloaderTests: XCTestCase { stub(url, data: testImageData) let p = RoundCornerImageProcessor(cornerRadius: 40) - let roundcornered = testImage.kf.image(withRoundRadius: 40, fit: testImage.kf.size) + let roundCornered = testImage.kf.image(withRoundRadius: 40, fit: testImage.kf.size) downloader.downloadImage(with: url, options: [.processor(p)]) { result in XCTAssertNotNil(result.value) let image = result.value!.image XCTAssertFalse(image.renderEqual(to: testImage)) - XCTAssertTrue(image.renderEqual(to: roundcornered)) + XCTAssertTrue(image.renderEqual(to: roundCornered)) XCTAssertEqual(result.value!.originalData, testImageData) exp.fulfill() } @@ -464,7 +464,7 @@ class ImageDownloaderTests: XCTestCase { let stub = delayedStub(url, data: testImageData) let p1 = RoundCornerImageProcessor(cornerRadius: 40) - let roundcornered = testImage.kf.image(withRoundRadius: 40, fit: testImage.kf.size) + let roundCornered = testImage.kf.image(withRoundRadius: 40, fit: testImage.kf.size) let p2 = BlurImageProcessor(blurRadius: 3.0) let blurred = testImage.kf.blurred(withRadius: 3.0) @@ -473,7 +473,7 @@ class ImageDownloaderTests: XCTestCase { group.enter() let task1 = downloader.downloadImage(with: url, options: [.processor(p1)]) { result in - XCTAssertTrue(result.value!.image.renderEqual(to: roundcornered)) + XCTAssertTrue(result.value!.image.renderEqual(to: roundCornered)) group.leave() } diff --git a/Tests/KingfisherTests/ImageViewExtensionTests.swift b/Tests/KingfisherTests/ImageViewExtensionTests.swift index 4ae8d743e..1ff3b904d 100644 --- a/Tests/KingfisherTests/ImageViewExtensionTests.swift +++ b/Tests/KingfisherTests/ImageViewExtensionTests.swift @@ -347,7 +347,7 @@ class ImageViewExtensionTests: XCTestCase { waitForExpectations(timeout: 3, handler: nil) } - func testDownloadForMutipleURLs() { + func testDownloadForMultipleURLs() { let exp = expectation(description: #function) stub(testURLs[0], data: testImageData) @@ -357,7 +357,7 @@ class ImageViewExtensionTests: XCTestCase { group.enter() imageView.kf.setImage(with: testURLs[0]) { result in - // The download successed, but not the resource we want. + // The download succeeded, but not with the resource we want. XCTAssertNotNil(result.error) if case .imageSettingError( reason: .notCurrentSourceTask(let result, _, let source)) = result.error! @@ -884,7 +884,7 @@ class ImageViewExtensionTests: XCTestCase { XCTFail("The error should be a task cancelled.") return } - XCTAssertEqual(task.task.originalRequest?.url, url, "Should be the alternatived url cancelled.") + XCTAssertEqual(task.task.originalRequest?.url, url, "Should be the alternative url cancelled.") } waitForExpectations(timeout: 1, handler: nil) diff --git a/Tests/KingfisherTests/KingfisherManagerTests.swift b/Tests/KingfisherTests/KingfisherManagerTests.swift index 9d17b848d..f559fe513 100644 --- a/Tests/KingfisherTests/KingfisherManagerTests.swift +++ b/Tests/KingfisherTests/KingfisherManagerTests.swift @@ -230,7 +230,7 @@ class KingfisherManagerTests: XCTestCase { } } - func testSuccessCompletionHandlerRunningOnMainQueueDefaultly() { + func testSuccessCompletionHandlerRunningOnMainQueueByDefault() { let progressExpectation = expectation(description: "progressBlock running on main queue") let completionExpectation = expectation(description: "completionHandler running on main queue") @@ -267,7 +267,7 @@ class KingfisherManagerTests: XCTestCase { waitForExpectations(timeout: 3, handler: nil) } - func testErrorCompletionHandlerRunningOnMainQueueDefaultly() { + func testErrorCompletionHandlerRunningOnMainQueueByDefault() { let exp = expectation(description: #function) let url = testURLs[0] stub(url, data: testImageData, statusCode: 404) @@ -281,7 +281,7 @@ class KingfisherManagerTests: XCTestCase { waitForExpectations(timeout: 3, handler: nil) } - func testSucessCompletionHandlerRunningOnCustomQueue() { + func testSuccessCompletionHandlerRunningOnCustomQueue() { let progressExpectation = expectation(description: "progressBlock running on custom queue") let completionExpectation = expectation(description: "completionHandler running on custom queue") diff --git a/Tests/KingfisherTests/MemoryStorageTests.swift b/Tests/KingfisherTests/MemoryStorageTests.swift index 5d19b004b..c022d1cdf 100644 --- a/Tests/KingfisherTests/MemoryStorageTests.swift +++ b/Tests/KingfisherTests/MemoryStorageTests.swift @@ -69,7 +69,7 @@ class MemoryStorageTests: XCTestCase { XCTAssertEqual(storage.value(forKey: "1"), 1) } - func testStoreValueOverwritting() { + func testStoreValueOverwriting() { storage.store(value: 1, forKey: "1") XCTAssertEqual(storage.value(forKey: "1"), 1) diff --git a/Tests/KingfisherTests/NSButtonExtensionTests.swift b/Tests/KingfisherTests/NSButtonExtensionTests.swift index 3d217f744..9a1262d1d 100644 --- a/Tests/KingfisherTests/NSButtonExtensionTests.swift +++ b/Tests/KingfisherTests/NSButtonExtensionTests.swift @@ -106,7 +106,7 @@ class NSButtonExtensionTests: XCTestCase { waitForExpectations(timeout: 5, handler: nil) } - func testCacnelImageTask() { + func testCancelImageTask() { let exp = expectation(description: #function) let url = testURLs[0] let stub = delayedStub(url, data: testImageData) @@ -123,7 +123,7 @@ class NSButtonExtensionTests: XCTestCase { waitForExpectations(timeout: 3, handler: nil) } - func testCacnelAlternateImageTask() { + func testCancelAlternateImageTask() { let exp = expectation(description: #function) let url = testURLs[0] let stub = delayedStub(url, data: testImageData) diff --git a/Tests/KingfisherTests/RetryStrategyTests.swift b/Tests/KingfisherTests/RetryStrategyTests.swift index 17ae01939..f35330bb8 100644 --- a/Tests/KingfisherTests/RetryStrategyTests.swift +++ b/Tests/KingfisherTests/RetryStrategyTests.swift @@ -115,7 +115,7 @@ class RetryStrategyTests: XCTestCase { ) retry.retry(context: context1) { decision in guard case RetryDecision.retry(let userInfo) = decision else { - XCTFail("The deicision should be `retry`") + XCTFail("The decision should be `retry`") return } XCTAssertNil(userInfo) @@ -131,7 +131,7 @@ class RetryStrategyTests: XCTestCase { context2.increaseRetryCount() // 3 retry.retry(context: context2) { decision in guard case RetryDecision.stop = decision else { - XCTFail("The deicision should be `stop`") + XCTFail("The decision should be `stop`") return } blockCalled.append(true) diff --git a/Tests/KingfisherTests/UIButtonExtensionTests.swift b/Tests/KingfisherTests/UIButtonExtensionTests.swift index 03b720777..3cc5cb1a4 100644 --- a/Tests/KingfisherTests/UIButtonExtensionTests.swift +++ b/Tests/KingfisherTests/UIButtonExtensionTests.swift @@ -110,7 +110,7 @@ class UIButtonExtensionTests: XCTestCase { waitForExpectations(timeout: 3, handler: nil) } - func testCacnelImageTask() { + func testCancelImageTask() { let exp = expectation(description: #function) let url = testURLs[0] let stub = delayedStub(url, data: testImageData) @@ -128,7 +128,7 @@ class UIButtonExtensionTests: XCTestCase { waitForExpectations(timeout: 3, handler: nil) } - func testCacnelBackgroundImageTask() { + func testCancelBackgroundImageTask() { let exp = expectation(description: #function) let url = testURLs[0] let stub = delayedStub(url, data: testImageData)