@@ -32,18 +32,15 @@ final class TestURLSession: LoopbackServerTest, @unchecked Sendable {
32
32
}
33
33
34
34
func test_dataTaskWithAcceptEncoding( ) async {
35
- #if !os(Windows)
36
- throw XCTSkip ( " This test is currently only enabled on Windows " )
37
- #else
38
35
let urlString = " http://127.0.0.1: \( TestURLSession . serverPort) /accept-encoding "
39
36
let url = URL ( string: urlString) !
40
37
let d = DataTask ( with: expectation ( description: " GET \( urlString) : with a delegate " ) )
41
38
d. run ( with: url)
42
39
waitForExpectations ( timeout: 12 )
43
40
if !d. error {
44
- XCTAssertEqual ( d. capital, " deflate, gzip, br " , " test_dataTaskWithURLRequest returned an unexpected result " )
41
+ let supportedEncodings = d. capital. split ( separator: " , " ) . map { $0. trimmingCharacters ( in: CharacterSet . whitespacesAndNewlines ) }
42
+ XCTAssert ( supportedEncodings. contains ( " br " ) , " test_dataTaskWithURLRequest returned an unexpected result " )
45
43
}
46
- #endif
47
44
}
48
45
49
46
func test_dataTaskWithURLCompletionHandler( ) async {
@@ -272,9 +269,6 @@ final class TestURLSession: LoopbackServerTest, @unchecked Sendable {
272
269
}
273
270
274
271
func test_brotliDataTask( ) async {
275
- #if !os(Windows)
276
- throw XCTSkip ( " This test is currently only enabled on Windows " )
277
- #else
278
272
let urlString = " http://127.0.0.1: \( TestURLSession . serverPort) /brotli-response "
279
273
let url = URL ( string: urlString) !
280
274
let d = DataTask ( with: expectation ( description: " GET \( urlString) : brotli response " ) )
@@ -283,7 +277,6 @@ final class TestURLSession: LoopbackServerTest, @unchecked Sendable {
283
277
if !d. error {
284
278
XCTAssertEqual ( d. capital, " Hello World! " )
285
279
}
286
- #endif
287
280
}
288
281
289
282
func test_downloadTaskWithURL( ) async {
0 commit comments