Skip to content

Commit 622703b

Browse files
[Chunked] Improve tests for ChunksOfCount traversal
1 parent f89fe8f commit 622703b

File tree

1 file changed

+6
-18
lines changed

1 file changed

+6
-18
lines changed

Tests/SwiftAlgorithmsTests/ChunkedTests.swift

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -138,23 +138,11 @@ final class ChunkedTests: XCTestCase {
138138
}
139139

140140
func testChunksOfCountTraversal() {
141-
let collection = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
142-
let chunks = collection.chunks(ofCount: 2)
143-
144-
validateIndexTraversals(chunks)
145-
}
146-
147-
func testChunksOfCountWithSingleRemainderTraversal() {
148-
let collection = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
149-
let chunks = collection.chunks(ofCount: 3)
150-
151-
validateIndexTraversals(chunks)
152-
}
153-
154-
func testChunksOfCountWithRemainder() {
155-
let collection2 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
156-
let chunks = collection2.chunks(ofCount: 3)
157-
158-
validateIndexTraversals(chunks)
141+
for i in 1..<10 {
142+
let collection = (1...50).map { $0 }
143+
let chunks = collection.chunks(ofCount: i)
144+
145+
validateIndexTraversals(chunks)
146+
}
159147
}
160148
}

0 commit comments

Comments
 (0)