Skip to content

Commit 0c379af

Browse files
committed
chore: Address lint
1 parent ed8b795 commit 0c379af

5 files changed

Lines changed: 15 additions & 20 deletions

File tree

Tests/AsyncDataLoaderTests/DataLoaderAbuseTests.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
import XCTest
2-
31
@testable import AsyncDataLoader
2+
import XCTest
43

54
/// Provides descriptive error messages for API abuse
65
class DataLoaderAbuseTests: XCTestCase {

Tests/AsyncDataLoaderTests/DataLoaderTests.swift

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
import XCTest
2-
31
@testable import AsyncDataLoader
2+
import XCTest
43

54
let sleepConstant = UInt64(2_000_000)
65

@@ -53,7 +52,7 @@ final class DataLoaderTests: XCTestCase {
5352
XCTAssertTrue(empty.isEmpty)
5453
}
5554

56-
// Batches multiple requests
55+
/// Batches multiple requests
5756
func testMultipleRequests() async throws {
5857
let loadCalls = Concurrent<[[Int]]>([])
5958

@@ -178,7 +177,7 @@ final class DataLoaderTests: XCTestCase {
178177
XCTAssertTrue(calls.map { $0.sorted() } == [[1]])
179178
}
180179

181-
// Caches repeated requests
180+
/// Caches repeated requests
182181
func testCachesRepeatedRequests() async throws {
183182
let loadCalls = Concurrent<[[String]]>([])
184183

@@ -399,7 +398,7 @@ final class DataLoaderTests: XCTestCase {
399398
XCTAssertTrue(calls2.map { $0.sorted() } == [["A", "B"], ["A", "B"]])
400399
}
401400

402-
// Allows priming the cache
401+
/// Allows priming the cache
403402
func testAllowsPrimingTheCache() async throws {
404403
let loadCalls = Concurrent<[[String]]>([])
405404

Tests/DataLoaderTests/DataLoaderAbuseTests.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1+
@testable import DataLoader
12
import NIOPosix
23
import XCTest
34

4-
@testable import DataLoader
5-
65
/// Provides descriptive error messages for API abuse
76
class DataLoaderAbuseTests: XCTestCase {
87
func testFuntionWithNoValues() throws {

Tests/DataLoaderTests/DataLoaderAsyncTests.swift

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1+
@testable import DataLoader
12
import NIOPosix
23
import XCTest
34

4-
@testable import DataLoader
5-
65
#if compiler(>=5.5) && canImport(_Concurrency)
76

87
@available(macOS 12, iOS 15, watchOS 8, tvOS 15, *)
@@ -70,7 +69,7 @@ import XCTest
7069
XCTAssertTrue(empty.isEmpty)
7170
}
7271

73-
// Batches multiple requests
72+
/// Batches multiple requests
7473
func testMultipleRequests() async throws {
7574
let eventLoopGroup = MultiThreadedEventLoopGroup(numberOfThreads: 1)
7675
defer {
@@ -96,8 +95,8 @@ import XCTest
9695
async let value1 = identityLoader.load(key: 1, on: eventLoopGroup)
9796
async let value2 = identityLoader.load(key: 2, on: eventLoopGroup)
9897

99-
/// Have to wait for a split second because Tasks may not be executed before this
100-
/// statement
98+
// Have to wait for a split second because Tasks may not be executed before this
99+
// statement
101100
try await Task.sleep(nanoseconds: 500_000_000)
102101

103102
XCTAssertNoThrow(try identityLoader.execute())

Tests/DataLoaderTests/DataLoaderTests.swift

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1+
@testable import DataLoader
12
import NIOCore
23
import NIOPosix
34
import XCTest
45

5-
@testable import DataLoader
6-
76
/// Primary API
87
final class DataLoaderTests: XCTestCase {
98
/// Builds a really really simple data loader'
@@ -48,7 +47,7 @@ final class DataLoaderTests: XCTestCase {
4847
XCTAssertTrue(empty.isEmpty)
4948
}
5049

51-
// Batches multiple requests
50+
/// Batches multiple requests
5251
func testMultipleRequests() throws {
5352
let eventLoopGroup = MultiThreadedEventLoopGroup(numberOfThreads: 1)
5453
defer {
@@ -144,7 +143,7 @@ final class DataLoaderTests: XCTestCase {
144143
XCTAssertTrue(loadCalls == [[1]])
145144
}
146145

147-
// Caches repeated requests
146+
/// Caches repeated requests
148147
func testCachesRepeatedRequests() throws {
149148
let eventLoopGroup = MultiThreadedEventLoopGroup(numberOfThreads: 1)
150149
defer {
@@ -270,7 +269,7 @@ final class DataLoaderTests: XCTestCase {
270269
XCTAssertTrue(loadCalls == [["A", "B"], ["A", "B"]])
271270
}
272271

273-
// Allows priming the cache
272+
/// Allows priming the cache
274273
func testAllowsPrimingTheCache() throws {
275274
let eventLoopGroup = MultiThreadedEventLoopGroup(numberOfThreads: 1)
276275
defer {
@@ -384,7 +383,7 @@ final class DataLoaderTests: XCTestCase {
384383
XCTAssertTrue(loadCalls == [["B"]])
385384
}
386385

387-
// Caches repeated requests, even if initiated asyncronously
386+
/// Caches repeated requests, even if initiated asyncronously
388387
func testCacheConcurrency() throws {
389388
let eventLoopGroup = MultiThreadedEventLoopGroup(numberOfThreads: 1)
390389
defer {

0 commit comments

Comments
 (0)