@@ -17,17 +17,17 @@ import NIOCore
17
17
import XCTest
18
18
19
19
class HTTPClientRequestTests : XCTestCase {
20
- #if compiler(>=5.5) && canImport(_Concurrency)
21
- @available ( macOS 12 . 0 , iOS 15 . 0 , watchOS 8 . 0 , tvOS 15 . 0 , * )
20
+ #if compiler(>=5.5.2 ) && canImport(_Concurrency)
21
+ @available ( macOS 10 . 15 , iOS 13 . 0 , watchOS 6 . 0 , tvOS 13 . 0 , * )
22
22
private typealias Request = HTTPClientRequest
23
23
24
- @available ( macOS 12 . 0 , iOS 15 . 0 , watchOS 8 . 0 , tvOS 15 . 0 , * )
24
+ @available ( macOS 10 . 15 , iOS 13 . 0 , watchOS 6 . 0 , tvOS 13 . 0 , * )
25
25
private typealias PreparedRequest = HTTPClientRequest . Prepared
26
26
#endif
27
27
28
28
func testCustomHeadersAreRespected( ) {
29
- #if compiler(>=5.5) && canImport(_Concurrency)
30
- guard #available( macOS 12 . 0 , iOS 15 . 0 , watchOS 8 . 0 , tvOS 15 . 0 , * ) else { return }
29
+ #if compiler(>=5.5.2 ) && canImport(_Concurrency)
30
+ guard #available( macOS 10 . 15 , iOS 13 . 0 , watchOS 6 . 0 , tvOS 13 . 0 , * ) else { return }
31
31
XCTAsyncTest {
32
32
var request = Request ( url: " https://example.com/get " )
33
33
request. headers = [
@@ -62,8 +62,8 @@ class HTTPClientRequestTests: XCTestCase {
62
62
}
63
63
64
64
func testUnixScheme( ) {
65
- #if compiler(>=5.5) && canImport(_Concurrency)
66
- guard #available( macOS 12 . 0 , iOS 15 . 0 , watchOS 8 . 0 , tvOS 15 . 0 , * ) else { return }
65
+ #if compiler(>=5.5.2 ) && canImport(_Concurrency)
66
+ guard #available( macOS 10 . 15 , iOS 13 . 0 , watchOS 6 . 0 , tvOS 13 . 0 , * ) else { return }
67
67
XCTAsyncTest {
68
68
var request = Request ( url: " unix://%2Fexample%2Ffolder.sock/some_path " )
69
69
request. headers = [ " custom-header " : " custom-value " ]
@@ -93,8 +93,8 @@ class HTTPClientRequestTests: XCTestCase {
93
93
}
94
94
95
95
func testHTTPUnixScheme( ) {
96
- #if compiler(>=5.5) && canImport(_Concurrency)
97
- guard #available( macOS 12 . 0 , iOS 15 . 0 , watchOS 8 . 0 , tvOS 15 . 0 , * ) else { return }
96
+ #if compiler(>=5.5.2 ) && canImport(_Concurrency)
97
+ guard #available( macOS 10 . 15 , iOS 13 . 0 , watchOS 6 . 0 , tvOS 13 . 0 , * ) else { return }
98
98
XCTAsyncTest {
99
99
var request = Request ( url: " http+unix://%2Fexample%2Ffolder.sock/some_path " )
100
100
request. headers = [ " custom-header " : " custom-value " ]
@@ -124,8 +124,8 @@ class HTTPClientRequestTests: XCTestCase {
124
124
}
125
125
126
126
func testHTTPSUnixScheme( ) {
127
- #if compiler(>=5.5) && canImport(_Concurrency)
128
- guard #available( macOS 12 . 0 , iOS 15 . 0 , watchOS 8 . 0 , tvOS 15 . 0 , * ) else { return }
127
+ #if compiler(>=5.5.2 ) && canImport(_Concurrency)
128
+ guard #available( macOS 10 . 15 , iOS 13 . 0 , watchOS 6 . 0 , tvOS 13 . 0 , * ) else { return }
129
129
XCTAsyncTest {
130
130
var request = Request ( url: " https+unix://%2Fexample%2Ffolder.sock/some_path " )
131
131
request. headers = [ " custom-header " : " custom-value " ]
@@ -155,8 +155,8 @@ class HTTPClientRequestTests: XCTestCase {
155
155
}
156
156
157
157
func testGetWithoutBody( ) {
158
- #if compiler(>=5.5) && canImport(_Concurrency)
159
- guard #available( macOS 12 . 0 , iOS 15 . 0 , watchOS 8 . 0 , tvOS 15 . 0 , * ) else { return }
158
+ #if compiler(>=5.5.2 ) && canImport(_Concurrency)
159
+ guard #available( macOS 10 . 15 , iOS 13 . 0 , watchOS 6 . 0 , tvOS 13 . 0 , * ) else { return }
160
160
XCTAsyncTest {
161
161
let request = Request ( url: " https://example.com/get " )
162
162
var preparedRequest : PreparedRequest ?
@@ -185,8 +185,8 @@ class HTTPClientRequestTests: XCTestCase {
185
185
}
186
186
187
187
func testPostWithoutBody( ) {
188
- #if compiler(>=5.5) && canImport(_Concurrency)
189
- guard #available( macOS 12 . 0 , iOS 15 . 0 , watchOS 8 . 0 , tvOS 15 . 0 , * ) else { return }
188
+ #if compiler(>=5.5.2 ) && canImport(_Concurrency)
189
+ guard #available( macOS 10 . 15 , iOS 13 . 0 , watchOS 6 . 0 , tvOS 13 . 0 , * ) else { return }
190
190
XCTAsyncTest {
191
191
var request = Request ( url: " http://example.com/post " )
192
192
request. method = . POST
@@ -220,8 +220,8 @@ class HTTPClientRequestTests: XCTestCase {
220
220
}
221
221
222
222
func testPostWithEmptyByteBuffer( ) {
223
- #if compiler(>=5.5) && canImport(_Concurrency)
224
- guard #available( macOS 12 . 0 , iOS 15 . 0 , watchOS 8 . 0 , tvOS 15 . 0 , * ) else { return }
223
+ #if compiler(>=5.5.2 ) && canImport(_Concurrency)
224
+ guard #available( macOS 10 . 15 , iOS 13 . 0 , watchOS 6 . 0 , tvOS 13 . 0 , * ) else { return }
225
225
XCTAsyncTest {
226
226
var request = Request ( url: " http://example.com/post " )
227
227
request. method = . POST
@@ -256,8 +256,8 @@ class HTTPClientRequestTests: XCTestCase {
256
256
}
257
257
258
258
func testPostWithByteBuffer( ) {
259
- #if compiler(>=5.5) && canImport(_Concurrency)
260
- guard #available( macOS 12 . 0 , iOS 15 . 0 , watchOS 8 . 0 , tvOS 15 . 0 , * ) else { return }
259
+ #if compiler(>=5.5.2 ) && canImport(_Concurrency)
260
+ guard #available( macOS 10 . 15 , iOS 13 . 0 , watchOS 6 . 0 , tvOS 13 . 0 , * ) else { return }
261
261
XCTAsyncTest {
262
262
var request = Request ( url: " http://example.com/post " )
263
263
request. method = . POST
@@ -291,8 +291,8 @@ class HTTPClientRequestTests: XCTestCase {
291
291
}
292
292
293
293
func testPostWithSequenceOfUnknownLength( ) {
294
- #if compiler(>=5.5) && canImport(_Concurrency)
295
- guard #available( macOS 12 . 0 , iOS 15 . 0 , watchOS 8 . 0 , tvOS 15 . 0 , * ) else { return }
294
+ #if compiler(>=5.5.2 ) && canImport(_Concurrency)
295
+ guard #available( macOS 10 . 15 , iOS 13 . 0 , watchOS 6 . 0 , tvOS 13 . 0 , * ) else { return }
296
296
XCTAsyncTest {
297
297
var request = Request ( url: " http://example.com/post " )
298
298
request. method = . POST
@@ -327,8 +327,8 @@ class HTTPClientRequestTests: XCTestCase {
327
327
}
328
328
329
329
func testPostWithSequenceWithFixedLength( ) {
330
- #if compiler(>=5.5) && canImport(_Concurrency)
331
- guard #available( macOS 12 . 0 , iOS 15 . 0 , watchOS 8 . 0 , tvOS 15 . 0 , * ) else { return }
330
+ #if compiler(>=5.5.2 ) && canImport(_Concurrency)
331
+ guard #available( macOS 10 . 15 , iOS 13 . 0 , watchOS 6 . 0 , tvOS 13 . 0 , * ) else { return }
332
332
XCTAsyncTest {
333
333
var request = Request ( url: " http://example.com/post " )
334
334
request. method = . POST
@@ -364,8 +364,8 @@ class HTTPClientRequestTests: XCTestCase {
364
364
}
365
365
366
366
func testPostWithRandomAccessCollection( ) {
367
- #if compiler(>=5.5) && canImport(_Concurrency)
368
- guard #available( macOS 12 . 0 , iOS 15 . 0 , watchOS 8 . 0 , tvOS 15 . 0 , * ) else { return }
367
+ #if compiler(>=5.5.2 ) && canImport(_Concurrency)
368
+ guard #available( macOS 10 . 15 , iOS 13 . 0 , watchOS 6 . 0 , tvOS 13 . 0 , * ) else { return }
369
369
XCTAsyncTest {
370
370
var request = Request ( url: " http://example.com/post " )
371
371
request. method = . POST
@@ -400,8 +400,8 @@ class HTTPClientRequestTests: XCTestCase {
400
400
}
401
401
402
402
func testPostWithAsyncSequenceOfUnknownLength( ) {
403
- #if compiler(>=5.5) && canImport(_Concurrency)
404
- guard #available( macOS 12 . 0 , iOS 15 . 0 , watchOS 8 . 0 , tvOS 15 . 0 , * ) else { return }
403
+ #if compiler(>=5.5.2 ) && canImport(_Concurrency)
404
+ guard #available( macOS 10 . 15 , iOS 13 . 0 , watchOS 6 . 0 , tvOS 13 . 0 , * ) else { return }
405
405
XCTAsyncTest {
406
406
var request = Request ( url: " http://example.com/post " )
407
407
request. method = . POST
@@ -441,8 +441,8 @@ class HTTPClientRequestTests: XCTestCase {
441
441
}
442
442
443
443
func testPostWithAsyncSequenceWithKnownLength( ) {
444
- #if compiler(>=5.5) && canImport(_Concurrency)
445
- guard #available( macOS 12 . 0 , iOS 15 . 0 , watchOS 8 . 0 , tvOS 15 . 0 , * ) else { return }
444
+ #if compiler(>=5.5.2 ) && canImport(_Concurrency)
445
+ guard #available( macOS 10 . 15 , iOS 13 . 0 , watchOS 6 . 0 , tvOS 13 . 0 , * ) else { return }
446
446
XCTAsyncTest {
447
447
var request = Request ( url: " http://example.com/post " )
448
448
request. method = . POST
@@ -482,13 +482,13 @@ class HTTPClientRequestTests: XCTestCase {
482
482
}
483
483
}
484
484
485
- #if compiler(>=5.5) && canImport(_Concurrency)
485
+ #if compiler(>=5.5.2 ) && canImport(_Concurrency)
486
486
private struct LengthMismatch : Error {
487
487
var announcedLength : Int
488
488
var actualLength : Int
489
489
}
490
490
491
- @available ( macOS 12 . 0 , iOS 15 . 0 , watchOS 8 . 0 , tvOS 15 . 0 , * )
491
+ @available ( macOS 10 . 15 , iOS 13 . 0 , watchOS 6 . 0 , tvOS 13 . 0 , * )
492
492
extension Optional where Wrapped == HTTPClientRequest . Body {
493
493
/// Accumulates all data from `self` into a single `ByteBuffer` and checks that the user specified length matches
494
494
/// the length of the accumulated data.
0 commit comments