@@ -467,6 +467,7 @@ class HTTPClientRequestTests: XCTestCase {
467
467
}
468
468
}
469
469
470
+ @available ( macOS 10 . 15 , iOS 13 . 0 , watchOS 6 . 0 , tvOS 13 . 0 , * )
470
471
func testChunkingRandomAccessCollection( ) async throws {
471
472
let body = try await HTTPClientRequest . Body. bytes (
472
473
Array ( repeating: 0 , count: bagOfBytesToByteBufferConversionChunkSize) +
@@ -483,6 +484,7 @@ class HTTPClientRequestTests: XCTestCase {
483
484
XCTAssertEqual ( body, expectedChunks)
484
485
}
485
486
487
+ @available ( macOS 10 . 15 , iOS 13 . 0 , watchOS 6 . 0 , tvOS 13 . 0 , * )
486
488
func testChunkingCollection( ) async throws {
487
489
let body = try await HTTPClientRequest . Body. bytes (
488
490
(
@@ -502,6 +504,7 @@ class HTTPClientRequestTests: XCTestCase {
502
504
XCTAssertEqual ( body, expectedChunks)
503
505
}
504
506
507
+ @available ( macOS 10 . 15 , iOS 13 . 0 , watchOS 6 . 0 , tvOS 13 . 0 , * )
505
508
func testChunkingSequenceThatDoesNotImplementWithContiguousStorageIfAvailable( ) async throws {
506
509
let bagOfBytesToByteBufferConversionChunkSize = 8
507
510
let body = try await HTTPClientRequest . Body. _bytes (
@@ -522,6 +525,7 @@ class HTTPClientRequestTests: XCTestCase {
522
525
XCTAssertEqual ( body, expectedChunks)
523
526
}
524
527
528
+ @available ( macOS 10 . 15 , iOS 13 . 0 , watchOS 6 . 0 , tvOS 13 . 0 , * )
525
529
func testChunkingSequenceFastPath( ) async throws {
526
530
func makeBytes( ) -> some Sequence < UInt8 > & Sendable {
527
531
Array ( repeating: 0 , count: bagOfBytesToByteBufferConversionChunkSize) +
@@ -543,6 +547,7 @@ class HTTPClientRequestTests: XCTestCase {
543
547
XCTAssertEqual ( body, expectedChunks)
544
548
}
545
549
550
+ @available ( macOS 10 . 15 , iOS 13 . 0 , watchOS 6 . 0 , tvOS 13 . 0 , * )
546
551
func testChunkingSequenceFastPathExceedingByteBufferMaxSize( ) async throws {
547
552
let bagOfBytesToByteBufferConversionChunkSize = 8
548
553
let byteBufferMaxSize = 16
@@ -602,6 +607,7 @@ class HTTPClientRequestTests: XCTestCase {
602
607
}
603
608
}
604
609
610
+ @available ( macOS 10 . 15 , iOS 13 . 0 , watchOS 6 . 0 , tvOS 13 . 0 , * )
605
611
extension AsyncSequence {
606
612
func collect( ) async throws -> [ Element ] {
607
613
try await self . reduce ( into: [ ] ) { $0 += CollectionOfOne ( $1) }
0 commit comments