From 91dd2d61fb772e1311bb5f13b59266b579d77e42 Mon Sep 17 00:00:00 2001 From: carolinacass <67160898+carolinacass@users.noreply.github.com> Date: Fri, 28 Oct 2022 13:56:39 +0100 Subject: [PATCH] Use #fileID/#filePath instead of #file (#184) Motivation: Modifications: Changed #file to #filePath or #fileID depending on situation --- Tests/NIOExtrasTests/WritePCAPHandlerTest.swift | 4 ++-- .../NIOHTTPCompressionTests/HTTPResponseCompressorTest.swift | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Tests/NIOExtrasTests/WritePCAPHandlerTest.swift b/Tests/NIOExtrasTests/WritePCAPHandlerTest.swift index fafd04f7..ab873841 100644 --- a/Tests/NIOExtrasTests/WritePCAPHandlerTest.swift +++ b/Tests/NIOExtrasTests/WritePCAPHandlerTest.swift @@ -62,7 +62,7 @@ class WritePCAPHandlerTest: XCTestCase { func assertEqual(expectedAddress: SocketAddress?, actualIPv4Address: in_addr, actualPort: UInt16, - file: StaticString = #file, + file: StaticString = #filePath, line: UInt = #line) { guard let port = expectedAddress?.port else { XCTFail("expected address nil or has no port", file: (file), line: line) @@ -83,7 +83,7 @@ class WritePCAPHandlerTest: XCTestCase { func assertEqual(expectedAddress: SocketAddress?, actualIPv6Address: in6_addr, actualPort: UInt16, - file: StaticString = #file, + file: StaticString = #filePath, line: UInt = #line) { guard let port = expectedAddress?.port else { XCTFail("expected address nil or has no port", file: (file), line: line) diff --git a/Tests/NIOHTTPCompressionTests/HTTPResponseCompressorTest.swift b/Tests/NIOHTTPCompressionTests/HTTPResponseCompressorTest.swift index 97c03053..01c93af7 100644 --- a/Tests/NIOHTTPCompressionTests/HTTPResponseCompressorTest.swift +++ b/Tests/NIOHTTPCompressionTests/HTTPResponseCompressorTest.swift @@ -29,7 +29,7 @@ private class PromiseOrderer { self.eventLoop = eventLoop } - func makePromise(file: StaticString = #file, line: UInt = #line) -> EventLoopPromise { + func makePromise(file: StaticString = #fileID, line: UInt = #line) -> EventLoopPromise { let promise = eventLoop.makePromise(of: Void.self, file: (file), line: line) appendPromise(promise) return promise