Skip to content

Commit cc28c74

Browse files
committed
Temporary debug testing
1 parent b2c8092 commit cc28c74

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

TestFoundation/HTTPServer.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -476,8 +476,10 @@ public class TestURLSessionServer {
476476
if uri == "/UnitedKingdom" {
477477
let value = capitals[String(uri.dropFirst())]!
478478
let text = request.getCommaSeparatedHeaders()
479+
print("\n/UnitedKingdom:", value, "text:", text)
479480
//Response header with only path to the location to redirect.
480481
let httpResponse = _HTTPResponse(response: .REDIRECT, headers: "Location: \(value)", body: text)
482+
print("httpResponse:", httpResponse)
481483
return httpResponse
482484
}
483485
return _HTTPResponse(response: .OK, body: capitals[String(uri.dropFirst())]!)

TestFoundation/TestURLSession.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -875,6 +875,7 @@ class HTTPRedirectionDataTask : NSObject {
875875
extension HTTPRedirectionDataTask : URLSessionDataDelegate {
876876
public func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive response: URLResponse, completionHandler: @escaping (URLSession.ResponseDisposition) -> Void) {
877877
guard let httpresponse = response as? HTTPURLResponse else { fatalError() }
878+
print("\ndatatask response:", httpresponse)
878879
XCTAssertNotNil(response)
879880
XCTAssertEqual(200, httpresponse.statusCode, "HTTP response code is not 200")
880881
}

0 commit comments

Comments
 (0)