From 9cdb93e321fee2e7cca8e52750288034a582e372 Mon Sep 17 00:00:00 2001 From: Cory Benfield Date: Thu, 13 Apr 2023 16:47:28 +0100 Subject: [PATCH] Drop Swift 5.5 (#197) Motivation Per SwiftNIO's formal version policy, we are ready to drop support for Swift 5.5. Modifications This patch removes the support for 5.5 and all supporting infrastructure. This includes the test generation functionality, which is no longer required, as well as the files generated by that functionality. It updates the dockerfile for 5.8, and it removes all conditional compilation checks that are now definitionally true. Result A nice, clean, 5.6+ codebase --- Package@swift-5.5.swift | 138 --------- README.md | 7 +- .../NIOExtras/DebugInboundEventsHandler.swift | 2 - .../DebugOutboundEventsHandler.swift | 2 - .../NIOExtras/FixedLengthFrameDecoder.swift | 2 - .../JSONRPCFraming+ContentLengthHeader.swift | 2 - .../LengthFieldBasedFrameDecoder.swift | 2 - Sources/NIOExtras/LengthFieldPrepender.swift | 2 - Sources/NIOExtras/LineBasedFrameDecoder.swift | 2 - Sources/NIOExtras/PCAPRingBuffer.swift | 2 - .../NIOExtras/RequestResponseHandler.swift | 2 - Sources/NIOExtras/WritePCAPHandler.swift | 2 - .../HTTPRequestCompressor.swift | 2 - .../HTTPRequestDecompressor.swift | 2 - .../HTTPResponseCompressor.swift | 2 - .../HTTPResponseDecompressor.swift | 2 - .../Channel Handlers/SOCKSClientHandler.swift | 2 - .../SOCKSServerHandshakeHandler.swift | 2 - Tests/LinuxMain.swift | 75 ----- ...DebugInboundEventsHandlerTest+XCTest.swift | 42 --- ...ebugOutboundEventsHandlerTest+XCTest.swift | 41 --- .../FixedLengthFrameDecoderTest+XCTest.swift | 38 --- ...HTTP1ProxyConnectHandlerTests+XCTest.swift | 40 --- ...ntentLengthHeaderDecoderTests+XCTest.swift | 44 --- ...ntentLengthHeaderEncoderTests+XCTest.swift | 35 --- ...gthFieldBasedFrameDecoderTest+XCTest.swift | 56 ---- .../LengthFieldPrependerTest+XCTest.swift | 45 --- .../LineBasedFrameDecoderTest+XCTest.swift | 42 --- .../PCAPRingBufferTest+XCTest.swift | 43 --- .../QuiescingHelperTest+XCTest.swift | 42 --- .../RequestResponseHandlerTest+XCTest.swift | 38 --- ...uestResponseWithIDHandlerTest+XCTest.swift | 41 --- .../SynchronizedFileSinkTests+XCTest.swift | 35 --- .../WritePCAPHandlerTest+XCTest.swift | 48 --- .../HTTPRequestCompressorTest+XCTest.swift | 43 --- .../HTTPRequestDecompressorTest+XCTest.swift | 39 --- .../HTTPResponseCompressorTest+XCTest.swift | 60 ---- .../HTTPResponseDecompressorTest+XCTest.swift | 46 --- .../NFS3FileSystemTests+XCTest.swift | 34 -- .../NFS3ReplyEncoderTest+XCTest.swift | 35 --- .../NFS3RoundtripTests+XCTest.swift | 36 --- .../ClientGreeting+Tests+XCTest.swift | 35 --- .../ClientRequest+Tests+XCTest.swift | 36 --- .../ClientStateMachine+Tests+XCTest.swift | 35 --- .../NIOSOCKSTests/Helpers+Tests+XCTest.swift | 36 --- .../MethodSelection+Tests+XCTest.swift | 35 --- ...SServerHandshakeHandler+Tests+XCTest.swift | 44 --- .../ServerResponse+Tests+XCTest.swift | 34 -- .../ServerStateMachine+Tests+XCTest.swift | 36 --- .../SocksClientHandler+Tests+XCTest.swift | 43 --- docker/docker-compose.2004.55.yaml | 19 -- scripts/generate_linux_tests.rb | 290 ------------------ scripts/soundness.sh | 12 - 53 files changed, 4 insertions(+), 1826 deletions(-) delete mode 100644 Package@swift-5.5.swift delete mode 100644 Tests/LinuxMain.swift delete mode 100644 Tests/NIOExtrasTests/DebugInboundEventsHandlerTest+XCTest.swift delete mode 100644 Tests/NIOExtrasTests/DebugOutboundEventsHandlerTest+XCTest.swift delete mode 100644 Tests/NIOExtrasTests/FixedLengthFrameDecoderTest+XCTest.swift delete mode 100644 Tests/NIOExtrasTests/HTTP1ProxyConnectHandlerTests+XCTest.swift delete mode 100644 Tests/NIOExtrasTests/JSONRPCFramingContentLengthHeaderDecoderTests+XCTest.swift delete mode 100644 Tests/NIOExtrasTests/JSONRPCFramingContentLengthHeaderEncoderTests+XCTest.swift delete mode 100644 Tests/NIOExtrasTests/LengthFieldBasedFrameDecoderTest+XCTest.swift delete mode 100644 Tests/NIOExtrasTests/LengthFieldPrependerTest+XCTest.swift delete mode 100644 Tests/NIOExtrasTests/LineBasedFrameDecoderTest+XCTest.swift delete mode 100644 Tests/NIOExtrasTests/PCAPRingBufferTest+XCTest.swift delete mode 100644 Tests/NIOExtrasTests/QuiescingHelperTest+XCTest.swift delete mode 100644 Tests/NIOExtrasTests/RequestResponseHandlerTest+XCTest.swift delete mode 100644 Tests/NIOExtrasTests/RequestResponseWithIDHandlerTest+XCTest.swift delete mode 100644 Tests/NIOExtrasTests/SynchronizedFileSinkTests+XCTest.swift delete mode 100644 Tests/NIOExtrasTests/WritePCAPHandlerTest+XCTest.swift delete mode 100644 Tests/NIOHTTPCompressionTests/HTTPRequestCompressorTest+XCTest.swift delete mode 100644 Tests/NIOHTTPCompressionTests/HTTPRequestDecompressorTest+XCTest.swift delete mode 100644 Tests/NIOHTTPCompressionTests/HTTPResponseCompressorTest+XCTest.swift delete mode 100644 Tests/NIOHTTPCompressionTests/HTTPResponseDecompressorTest+XCTest.swift delete mode 100644 Tests/NIONFS3Tests/NFS3FileSystemTests+XCTest.swift delete mode 100644 Tests/NIONFS3Tests/NFS3ReplyEncoderTest+XCTest.swift delete mode 100644 Tests/NIONFS3Tests/NFS3RoundtripTests+XCTest.swift delete mode 100644 Tests/NIOSOCKSTests/ClientGreeting+Tests+XCTest.swift delete mode 100644 Tests/NIOSOCKSTests/ClientRequest+Tests+XCTest.swift delete mode 100644 Tests/NIOSOCKSTests/ClientStateMachine+Tests+XCTest.swift delete mode 100644 Tests/NIOSOCKSTests/Helpers+Tests+XCTest.swift delete mode 100644 Tests/NIOSOCKSTests/MethodSelection+Tests+XCTest.swift delete mode 100644 Tests/NIOSOCKSTests/SOCKSServerHandshakeHandler+Tests+XCTest.swift delete mode 100644 Tests/NIOSOCKSTests/ServerResponse+Tests+XCTest.swift delete mode 100644 Tests/NIOSOCKSTests/ServerStateMachine+Tests+XCTest.swift delete mode 100644 Tests/NIOSOCKSTests/SocksClientHandler+Tests+XCTest.swift delete mode 100644 docker/docker-compose.2004.55.yaml delete mode 100755 scripts/generate_linux_tests.rb diff --git a/Package@swift-5.5.swift b/Package@swift-5.5.swift deleted file mode 100644 index 77840da..0000000 --- a/Package@swift-5.5.swift +++ /dev/null @@ -1,138 +0,0 @@ -// swift-tools-version:5.5 -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2017-2022 Apple Inc. and the SwiftNIO project authors -// Licensed under Apache License v2.0 -// -// See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of SwiftNIO project authors -// -// SPDX-License-Identifier: Apache-2.0 -// -//===----------------------------------------------------------------------===// - -import PackageDescription - -var targets: [PackageDescription.Target] = [ - .target( - name: "NIOExtras", - dependencies: [ - .product(name: "NIO", package: "swift-nio"), - .product(name: "NIOCore", package: "swift-nio"), - .product(name: "NIOHTTP1", package: "swift-nio") - ]), - .target( - name: "NIOHTTPCompression", - dependencies: [ - "CNIOExtrasZlib", - .product(name: "NIO", package: "swift-nio"), - .product(name: "NIOCore", package: "swift-nio"), - .product(name: "NIOHTTP1", package: "swift-nio"), - ]), - .executableTarget( - name: "HTTPServerWithQuiescingDemo", - dependencies: [ - "NIOExtras", - .product(name: "NIOCore", package: "swift-nio"), - .product(name: "NIOPosix", package: "swift-nio"), - .product(name: "NIOHTTP1", package: "swift-nio"), - ]), - .executableTarget( - name: "NIOWritePCAPDemo", - dependencies: [ - "NIOExtras", - .product(name: "NIOCore", package: "swift-nio"), - .product(name: "NIOPosix", package: "swift-nio"), - .product(name: "NIOHTTP1", package: "swift-nio"), - ]), - .executableTarget( - name: "NIOWritePartialPCAPDemo", - dependencies: [ - "NIOExtras", - .product(name: "NIOCore", package: "swift-nio"), - .product(name: "NIOPosix", package: "swift-nio"), - .product(name: "NIOHTTP1", package: "swift-nio"), - ]), - .executableTarget( - name: "NIOExtrasPerformanceTester", - dependencies: [ - "NIOExtras", - .product(name: "NIOCore", package: "swift-nio"), - .product(name: "NIOPosix", package: "swift-nio"), - .product(name: "NIOEmbedded", package: "swift-nio"), - .product(name: "NIOHTTP1", package: "swift-nio"), - ]), - .target( - name: "NIOSOCKS", - dependencies: [ - .product(name: "NIO", package: "swift-nio"), - .product(name: "NIOCore", package: "swift-nio"), - ]), - .executableTarget( - name: "NIOSOCKSClient", - dependencies: [ - .product(name: "NIOCore", package: "swift-nio"), - .product(name: "NIOPosix", package: "swift-nio"), - "NIOSOCKS" - ]), - .target( - name: "CNIOExtrasZlib", - dependencies: [], - linkerSettings: [ - .linkedLibrary("z") - ]), - .testTarget( - name: "NIOExtrasTests", - dependencies: [ - "NIOExtras", - .product(name: "NIOCore", package: "swift-nio"), - .product(name: "NIOEmbedded", package: "swift-nio"), - .product(name: "NIOPosix", package: "swift-nio"), - .product(name: "NIOTestUtils", package: "swift-nio"), - .product(name: "NIOConcurrencyHelpers", package: "swift-nio"), - ]), - .testTarget( - name: "NIOHTTPCompressionTests", - dependencies: [ - "CNIOExtrasZlib", - "NIOHTTPCompression", - .product(name: "NIOCore", package: "swift-nio"), - .product(name: "NIOEmbedded", package: "swift-nio"), - .product(name: "NIOHTTP1", package: "swift-nio"), - .product(name: "NIOConcurrencyHelpers", package: "swift-nio"), - ]), - .testTarget( - name: "NIOSOCKSTests", - dependencies: [ - "NIOSOCKS", - .product(name: "NIOCore", package: "swift-nio"), - .product(name: "NIOEmbedded", package: "swift-nio"), - ]), - .target( - name: "NIONFS3", - dependencies: [ - .product(name: "NIOCore", package: "swift-nio"), - ]), - .testTarget( - name: "NIONFS3Tests", - dependencies: [ - "NIONFS3", - .product(name: "NIOCore", package: "swift-nio"), - .product(name: "NIOTestUtils", package: "swift-nio"), - ]), -] - -let package = Package( - name: "swift-nio-extras", - products: [ - .library(name: "NIOExtras", targets: ["NIOExtras"]), - .library(name: "NIOSOCKS", targets: ["NIOSOCKS"]), - .library(name: "NIOHTTPCompression", targets: ["NIOHTTPCompression"]), - ], - dependencies: [ - .package(url: "https://github.com/apple/swift-nio.git", from: "2.34.0"), - ], - targets: targets -) diff --git a/README.md b/README.md index cde7236..9ec63b1 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ All code will go through code review like in the other repositories related to t `swift-nio-extras` part of the SwiftNIO 2 family of repositories and depends on the following: - [`swift-nio`](https://github.com/apple/swift-nio), version 2.30.0 or better. -- Swift 5.5.2 +- Swift 5.6 - `zlib` and its development headers installed on the system. But don't worry, you'll find `zlib` on pretty much any UNIX system that can compile any sort of code. To depend on `swift-nio-extras`, put the following in the `dependencies` of your `Package.swift`: @@ -25,14 +25,15 @@ To depend on `swift-nio-extras`, put the following in the `dependencies` of your ### Support for older Swift versions -The most recent versions of SwiftNIO Extras support Swift 5.5.2 and newer. The minimum Swift version supported by SwiftNIO Extras releases are detailed below: +The most recent versions of SwiftNIO Extras support Swift 5.6 and newer. The minimum Swift version supported by SwiftNIO Extras releases are detailed below: SwiftNIO Extras | Minimum Swift Version --------------------|---------------------- `1.0.0 ..< 1.10.0` | 5.0 `1.10.0 ..< 1.11.0` | 5.2 `1.11.0 ..< 1.14.0` | 5.4 -`1.14.0 ...` | 5.5.2 +`1.14.0 ..< 1.19.1` | 5.5.2 +`1.19.0 ...` | 5.6 On the [`nio-extras-0.1`](https://github.com/apple/swift-nio-extras/tree/nio-extras-0.1) branch, you can find the `swift-nio-extras` version for the SwiftNIO 1 family. It requires Swift 4.1 or better. diff --git a/Sources/NIOExtras/DebugInboundEventsHandler.swift b/Sources/NIOExtras/DebugInboundEventsHandler.swift index 5df0faa..de8bbcc 100644 --- a/Sources/NIOExtras/DebugInboundEventsHandler.swift +++ b/Sources/NIOExtras/DebugInboundEventsHandler.swift @@ -175,7 +175,5 @@ public class DebugInboundEventsHandler: ChannelInboundHandler { } } -#if swift(>=5.6) @available(*, unavailable) extension DebugInboundEventsHandler: Sendable {} -#endif diff --git a/Sources/NIOExtras/DebugOutboundEventsHandler.swift b/Sources/NIOExtras/DebugOutboundEventsHandler.swift index 8ed454a..e76c723 100644 --- a/Sources/NIOExtras/DebugOutboundEventsHandler.swift +++ b/Sources/NIOExtras/DebugOutboundEventsHandler.swift @@ -171,7 +171,5 @@ public class DebugOutboundEventsHandler: ChannelOutboundHandler { } } -#if swift(>=5.6) @available(*, unavailable) extension DebugOutboundEventsHandler: Sendable {} -#endif diff --git a/Sources/NIOExtras/FixedLengthFrameDecoder.swift b/Sources/NIOExtras/FixedLengthFrameDecoder.swift index 326dc77..0386ba9 100644 --- a/Sources/NIOExtras/FixedLengthFrameDecoder.swift +++ b/Sources/NIOExtras/FixedLengthFrameDecoder.swift @@ -77,7 +77,5 @@ public final class FixedLengthFrameDecoder: ByteToMessageDecoder { } } -#if swift(>=5.6) @available(*, unavailable) extension FixedLengthFrameDecoder: Sendable {} -#endif diff --git a/Sources/NIOExtras/JSONRPCFraming+ContentLengthHeader.swift b/Sources/NIOExtras/JSONRPCFraming+ContentLengthHeader.swift index 9bf462d..adc3fc4 100644 --- a/Sources/NIOExtras/JSONRPCFraming+ContentLengthHeader.swift +++ b/Sources/NIOExtras/JSONRPCFraming+ContentLengthHeader.swift @@ -217,10 +217,8 @@ extension String { -#if swift(>=5.6) @available(*, unavailable) extension NIOJSONRPCFraming.ContentLengthHeaderFrameDecoder: Sendable {} @available(*, unavailable) extension NIOJSONRPCFraming.ContentLengthHeaderFrameEncoder: Sendable {} -#endif diff --git a/Sources/NIOExtras/LengthFieldBasedFrameDecoder.swift b/Sources/NIOExtras/LengthFieldBasedFrameDecoder.swift index 6875e86..ae76fce 100644 --- a/Sources/NIOExtras/LengthFieldBasedFrameDecoder.swift +++ b/Sources/NIOExtras/LengthFieldBasedFrameDecoder.swift @@ -247,7 +247,5 @@ public final class LengthFieldBasedFrameDecoder: ByteToMessageDecoder { } } -#if swift(>=5.6) @available(*, unavailable) extension LengthFieldBasedFrameDecoder: Sendable {} -#endif diff --git a/Sources/NIOExtras/LengthFieldPrepender.swift b/Sources/NIOExtras/LengthFieldPrepender.swift index fdabf79..af8d861 100644 --- a/Sources/NIOExtras/LengthFieldPrepender.swift +++ b/Sources/NIOExtras/LengthFieldPrepender.swift @@ -145,7 +145,5 @@ public final class LengthFieldPrepender: ChannelOutboundHandler { } } -#if swift(>=5.6) @available(*, unavailable) extension LengthFieldPrepender: Sendable {} -#endif diff --git a/Sources/NIOExtras/LineBasedFrameDecoder.swift b/Sources/NIOExtras/LineBasedFrameDecoder.swift index cc1b53b..66ee075 100644 --- a/Sources/NIOExtras/LineBasedFrameDecoder.swift +++ b/Sources/NIOExtras/LineBasedFrameDecoder.swift @@ -92,7 +92,5 @@ public class LineBasedFrameDecoder: ByteToMessageDecoder { } } -#if swift(>=5.6) @available(*, unavailable) extension LineBasedFrameDecoder: Sendable {} -#endif diff --git a/Sources/NIOExtras/PCAPRingBuffer.swift b/Sources/NIOExtras/PCAPRingBuffer.swift index 9364810..0199556 100644 --- a/Sources/NIOExtras/PCAPRingBuffer.swift +++ b/Sources/NIOExtras/PCAPRingBuffer.swift @@ -97,7 +97,5 @@ public class NIOPCAPRingBuffer { } } -#if swift(>=5.6) @available(*, unavailable) extension NIOPCAPRingBuffer: Sendable {} -#endif diff --git a/Sources/NIOExtras/RequestResponseHandler.swift b/Sources/NIOExtras/RequestResponseHandler.swift index 1c91e1e..fadf88a 100644 --- a/Sources/NIOExtras/RequestResponseHandler.swift +++ b/Sources/NIOExtras/RequestResponseHandler.swift @@ -120,7 +120,5 @@ public final class RequestResponseHandler: ChannelDuplexHandl } } -#if swift(>=5.6) @available(*, unavailable) extension RequestResponseHandler: Sendable {} -#endif diff --git a/Sources/NIOExtras/WritePCAPHandler.swift b/Sources/NIOExtras/WritePCAPHandler.swift index 195a27e..e93682b 100644 --- a/Sources/NIOExtras/WritePCAPHandler.swift +++ b/Sources/NIOExtras/WritePCAPHandler.swift @@ -290,10 +290,8 @@ public class NIOWritePCAPHandler: RemovableChannelHandler { } } -#if swift(>=5.6) @available(*, unavailable) extension NIOWritePCAPHandler: Sendable {} -#endif extension NIOWritePCAPHandler: ChannelDuplexHandler { public typealias InboundIn = ByteBuffer diff --git a/Sources/NIOHTTPCompression/HTTPRequestCompressor.swift b/Sources/NIOHTTPCompression/HTTPRequestCompressor.swift index 81ab9fe..d8b21bb 100644 --- a/Sources/NIOHTTPCompression/HTTPRequestCompressor.swift +++ b/Sources/NIOHTTPCompression/HTTPRequestCompressor.swift @@ -179,7 +179,5 @@ public final class NIOHTTPRequestCompressor: ChannelOutboundHandler, RemovableCh } } -#if swift(>=5.6) @available(*, unavailable) extension NIOHTTPRequestCompressor: Sendable {} -#endif diff --git a/Sources/NIOHTTPCompression/HTTPRequestDecompressor.swift b/Sources/NIOHTTPCompression/HTTPRequestDecompressor.swift index bbbc81a..aa3c5c2 100644 --- a/Sources/NIOHTTPCompression/HTTPRequestDecompressor.swift +++ b/Sources/NIOHTTPCompression/HTTPRequestDecompressor.swift @@ -106,7 +106,5 @@ public final class NIOHTTPRequestDecompressor: ChannelDuplexHandler, RemovableCh } } -#if swift(>=5.6) @available(*, unavailable) extension NIOHTTPRequestDecompressor: Sendable {} -#endif diff --git a/Sources/NIOHTTPCompression/HTTPResponseCompressor.swift b/Sources/NIOHTTPCompression/HTTPResponseCompressor.swift index eee4ec9..7b25179 100644 --- a/Sources/NIOHTTPCompression/HTTPResponseCompressor.swift +++ b/Sources/NIOHTTPCompression/HTTPResponseCompressor.swift @@ -222,10 +222,8 @@ public final class HTTPResponseCompressor: ChannelDuplexHandler, RemovableChanne } } -#if swift(>=5.6) @available(*, unavailable) extension HTTPResponseCompressor: Sendable {} -#endif /// A buffer object that allows us to keep track of how much of a HTTP response we've seen before /// a flush. diff --git a/Sources/NIOHTTPCompression/HTTPResponseDecompressor.swift b/Sources/NIOHTTPCompression/HTTPResponseDecompressor.swift index 64c6018..5df5d34 100644 --- a/Sources/NIOHTTPCompression/HTTPResponseDecompressor.swift +++ b/Sources/NIOHTTPCompression/HTTPResponseDecompressor.swift @@ -122,7 +122,5 @@ public final class NIOHTTPResponseDecompressor: ChannelDuplexHandler, RemovableC } } -#if swift(>=5.6) @available(*, unavailable) extension NIOHTTPResponseDecompressor: Sendable {} -#endif diff --git a/Sources/NIOSOCKS/Channel Handlers/SOCKSClientHandler.swift b/Sources/NIOSOCKS/Channel Handlers/SOCKSClientHandler.swift index 679093a..313bca5 100644 --- a/Sources/NIOSOCKS/Channel Handlers/SOCKSClientHandler.swift +++ b/Sources/NIOSOCKS/Channel Handlers/SOCKSClientHandler.swift @@ -114,10 +114,8 @@ public final class SOCKSClientHandler: ChannelDuplexHandler { } } -#if swift(>=5.6) @available(*, unavailable) extension SOCKSClientHandler: Sendable {} -#endif extension SOCKSClientHandler { diff --git a/Sources/NIOSOCKS/Channel Handlers/SOCKSServerHandshakeHandler.swift b/Sources/NIOSOCKS/Channel Handlers/SOCKSServerHandshakeHandler.swift index 619a294..f9b7c30 100644 --- a/Sources/NIOSOCKS/Channel Handlers/SOCKSServerHandshakeHandler.swift +++ b/Sources/NIOSOCKS/Channel Handlers/SOCKSServerHandshakeHandler.swift @@ -122,7 +122,5 @@ public final class SOCKSServerHandshakeHandler: ChannelDuplexHandler, RemovableC } -#if swift(>=5.6) @available(*, unavailable) extension SOCKSServerHandshakeHandler: Sendable {} -#endif diff --git a/Tests/LinuxMain.swift b/Tests/LinuxMain.swift deleted file mode 100644 index ae62878..0000000 --- a/Tests/LinuxMain.swift +++ /dev/null @@ -1,75 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2018-2023 Apple Inc. and the SwiftNIO project authors -// Licensed under Apache License v2.0 -// -// See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of SwiftNIO project authors -// -// SPDX-License-Identifier: Apache-2.0 -// -//===----------------------------------------------------------------------===// -// -// LinuxMain.swift -// -import XCTest - -/// -/// NOTE: This file was generated by generate_linux_tests.rb -/// -/// Do NOT edit this file directly as it will be regenerated automatically when needed. -/// - -#if !compiler(>=5.5) -#if os(Linux) || os(FreeBSD) || os(Android) - @testable import NIOExtrasTests - @testable import NIOHTTPCompressionTests - @testable import NIONFS3Tests - @testable import NIOSOCKSTests - -@available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") -@main -class LinuxMainRunner { - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static func main() { - XCTMain([ - testCase(ClientGreetingTests.allTests), - testCase(ClientRequestTests.allTests), - testCase(ClientStateMachineTests.allTests), - testCase(DebugInboundEventsHandlerTest.allTests), - testCase(DebugOutboundEventsHandlerTest.allTests), - testCase(FixedLengthFrameDecoderTest.allTests), - testCase(HTTP1ProxyConnectHandlerTests.allTests), - testCase(HTTPRequestCompressorTest.allTests), - testCase(HTTPRequestDecompressorTest.allTests), - testCase(HTTPResponseCompressorTest.allTests), - testCase(HTTPResponseDecompressorTest.allTests), - testCase(HelperTests.allTests), - testCase(JSONRPCFramingContentLengthHeaderDecoderTests.allTests), - testCase(JSONRPCFramingContentLengthHeaderEncoderTests.allTests), - testCase(LengthFieldBasedFrameDecoderTest.allTests), - testCase(LengthFieldPrependerTest.allTests), - testCase(LineBasedFrameDecoderTest.allTests), - testCase(MethodSelectionTests.allTests), - testCase(NFS3FileSystemTests.allTests), - testCase(NFS3ReplyEncoderTest.allTests), - testCase(NFS3RoundtripTests.allTests), - testCase(PCAPRingBufferTest.allTests), - testCase(QuiescingHelperTest.allTests), - testCase(RequestResponseHandlerTest.allTests), - testCase(RequestResponseWithIDHandlerTest.allTests), - testCase(SOCKSServerHandlerTests.allTests), - testCase(ServerResponseTests.allTests), - testCase(ServerStateMachineTests.allTests), - testCase(SocksClientHandlerTests.allTests), - testCase(SynchronizedFileSinkTests.allTests), - testCase(WritePCAPHandlerTest.allTests), - ]) - } -} -#endif -#else -#error("on Swift 5.5 and newer, --enable-test-discovery is required") -#endif diff --git a/Tests/NIOExtrasTests/DebugInboundEventsHandlerTest+XCTest.swift b/Tests/NIOExtrasTests/DebugInboundEventsHandlerTest+XCTest.swift deleted file mode 100644 index 67c9dd0..0000000 --- a/Tests/NIOExtrasTests/DebugInboundEventsHandlerTest+XCTest.swift +++ /dev/null @@ -1,42 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2018-2022 Apple Inc. and the SwiftNIO project authors -// Licensed under Apache License v2.0 -// -// See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of SwiftNIO project authors -// -// SPDX-License-Identifier: Apache-2.0 -// -//===----------------------------------------------------------------------===// -// -// DebugInboundEventsHandlerTest+XCTest.swift -// -import XCTest - -/// -/// NOTE: This file was generated by generate_linux_tests.rb -/// -/// Do NOT edit this file directly as it will be regenerated automatically when needed. -/// - -extension DebugInboundEventsHandlerTest { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (DebugInboundEventsHandlerTest) -> () throws -> Void)] { - return [ - ("testRegistered", testRegistered), - ("testUnregistered", testUnregistered), - ("testActive", testActive), - ("testInactive", testInactive), - ("testReadComplete", testReadComplete), - ("testWritabilityChanged", testWritabilityChanged), - ("testUserInboundEvent", testUserInboundEvent), - ("testErrorCaught", testErrorCaught), - ("testRead", testRead), - ] - } -} - diff --git a/Tests/NIOExtrasTests/DebugOutboundEventsHandlerTest+XCTest.swift b/Tests/NIOExtrasTests/DebugOutboundEventsHandlerTest+XCTest.swift deleted file mode 100644 index 6a63783..0000000 --- a/Tests/NIOExtrasTests/DebugOutboundEventsHandlerTest+XCTest.swift +++ /dev/null @@ -1,41 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2018-2022 Apple Inc. and the SwiftNIO project authors -// Licensed under Apache License v2.0 -// -// See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of SwiftNIO project authors -// -// SPDX-License-Identifier: Apache-2.0 -// -//===----------------------------------------------------------------------===// -// -// DebugOutboundEventsHandlerTest+XCTest.swift -// -import XCTest - -/// -/// NOTE: This file was generated by generate_linux_tests.rb -/// -/// Do NOT edit this file directly as it will be regenerated automatically when needed. -/// - -extension DebugOutboundEventsHandlerTest { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (DebugOutboundEventsHandlerTest) -> () throws -> Void)] { - return [ - ("testRegister", testRegister), - ("testBind", testBind), - ("testConnect", testConnect), - ("testWrite", testWrite), - ("testFlush", testFlush), - ("testRead", testRead), - ("testClose", testClose), - ("testTriggerUserOutboundEvent", testTriggerUserOutboundEvent), - ] - } -} - diff --git a/Tests/NIOExtrasTests/FixedLengthFrameDecoderTest+XCTest.swift b/Tests/NIOExtrasTests/FixedLengthFrameDecoderTest+XCTest.swift deleted file mode 100644 index 93782a2..0000000 --- a/Tests/NIOExtrasTests/FixedLengthFrameDecoderTest+XCTest.swift +++ /dev/null @@ -1,38 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2018-2022 Apple Inc. and the SwiftNIO project authors -// Licensed under Apache License v2.0 -// -// See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of SwiftNIO project authors -// -// SPDX-License-Identifier: Apache-2.0 -// -//===----------------------------------------------------------------------===// -// -// FixedLengthFrameDecoderTest+XCTest.swift -// -import XCTest - -/// -/// NOTE: This file was generated by generate_linux_tests.rb -/// -/// Do NOT edit this file directly as it will be regenerated automatically when needed. -/// - -extension FixedLengthFrameDecoderTest { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (FixedLengthFrameDecoderTest) -> () throws -> Void)] { - return [ - ("testDecodeIfFewerBytesAreSent", testDecodeIfFewerBytesAreSent), - ("testDecodeIfMoreBytesAreSent", testDecodeIfMoreBytesAreSent), - ("testRemoveHandlerWhenBufferIsNotEmpty", testRemoveHandlerWhenBufferIsNotEmpty), - ("testRemoveHandlerWhenBufferIsEmpty", testRemoveHandlerWhenBufferIsEmpty), - ("testBasicValidation", testBasicValidation), - ] - } -} - diff --git a/Tests/NIOExtrasTests/HTTP1ProxyConnectHandlerTests+XCTest.swift b/Tests/NIOExtrasTests/HTTP1ProxyConnectHandlerTests+XCTest.swift deleted file mode 100644 index e7a2d53..0000000 --- a/Tests/NIOExtrasTests/HTTP1ProxyConnectHandlerTests+XCTest.swift +++ /dev/null @@ -1,40 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2023 Apple Inc. and the SwiftNIO project authors -// Licensed under Apache License v2.0 -// -// See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of SwiftNIO project authors -// -// SPDX-License-Identifier: Apache-2.0 -// -//===----------------------------------------------------------------------===// -// -// HTTP1ProxyConnectHandlerTests+XCTest.swift -// -import XCTest - -/// -/// NOTE: This file was generated by generate_linux_tests.rb -/// -/// Do NOT edit this file directly as it will be regenerated automatically when needed. -/// - -extension HTTP1ProxyConnectHandlerTests { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (HTTP1ProxyConnectHandlerTests) -> () throws -> Void)] { - return [ - ("testProxyConnectWithoutAuthorizationSuccess", testProxyConnectWithoutAuthorizationSuccess), - ("testProxyConnectWithAuthorization", testProxyConnectWithAuthorization), - ("testProxyConnectWithoutAuthorizationFailure500", testProxyConnectWithoutAuthorizationFailure500), - ("testProxyConnectWithoutAuthorizationButAuthorizationNeeded", testProxyConnectWithoutAuthorizationButAuthorizationNeeded), - ("testProxyConnectReceivesBody", testProxyConnectReceivesBody), - ("testProxyConnectWithoutAuthorizationBufferedWrites", testProxyConnectWithoutAuthorizationBufferedWrites), - ("testProxyConnectFailsBufferedWritesAreFailed", testProxyConnectFailsBufferedWritesAreFailed), - ] - } -} - diff --git a/Tests/NIOExtrasTests/JSONRPCFramingContentLengthHeaderDecoderTests+XCTest.swift b/Tests/NIOExtrasTests/JSONRPCFramingContentLengthHeaderDecoderTests+XCTest.swift deleted file mode 100644 index 1af720d..0000000 --- a/Tests/NIOExtrasTests/JSONRPCFramingContentLengthHeaderDecoderTests+XCTest.swift +++ /dev/null @@ -1,44 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2019-2022 Apple Inc. and the SwiftNIO project authors -// Licensed under Apache License v2.0 -// -// See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of SwiftNIO project authors -// -// SPDX-License-Identifier: Apache-2.0 -// -//===----------------------------------------------------------------------===// -// -// JSONRPCFramingContentLengthHeaderDecoderTests+XCTest.swift -// -import XCTest - -/// -/// NOTE: This file was generated by generate_linux_tests.rb -/// -/// Do NOT edit this file directly as it will be regenerated automatically when needed. -/// - -extension JSONRPCFramingContentLengthHeaderDecoderTests { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (JSONRPCFramingContentLengthHeaderDecoderTests) -> () throws -> Void)] { - return [ - ("testBasicMessage", testBasicMessage), - ("testEmptyMessage", testEmptyMessage), - ("testWrongCasing", testWrongCasing), - ("testTechnicallyInvalidButWeAreNicePeople", testTechnicallyInvalidButWeAreNicePeople), - ("testLongerMessage", testLongerMessage), - ("testSomePointlessExtraHeaders", testSomePointlessExtraHeaders), - ("testDripAndMassFeedMessages", testDripAndMassFeedMessages), - ("testErrorNoContentLengthHeader", testErrorNoContentLengthHeader), - ("testErrorNotEnoughDataAtEOF", testErrorNotEnoughDataAtEOF), - ("testErrorNegativeContentLength", testErrorNegativeContentLength), - ("testErrorNotANumberContentLength", testErrorNotANumberContentLength), - ] - } -} - diff --git a/Tests/NIOExtrasTests/JSONRPCFramingContentLengthHeaderEncoderTests+XCTest.swift b/Tests/NIOExtrasTests/JSONRPCFramingContentLengthHeaderEncoderTests+XCTest.swift deleted file mode 100644 index 6092546..0000000 --- a/Tests/NIOExtrasTests/JSONRPCFramingContentLengthHeaderEncoderTests+XCTest.swift +++ /dev/null @@ -1,35 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2018-2022 Apple Inc. and the SwiftNIO project authors -// Licensed under Apache License v2.0 -// -// See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of SwiftNIO project authors -// -// SPDX-License-Identifier: Apache-2.0 -// -//===----------------------------------------------------------------------===// -// -// JSONRPCFramingContentLengthHeaderEncoderTests+XCTest.swift -// -import XCTest - -/// -/// NOTE: This file was generated by generate_linux_tests.rb -/// -/// Do NOT edit this file directly as it will be regenerated automatically when needed. -/// - -extension JSONRPCFramingContentLengthHeaderEncoderTests { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (JSONRPCFramingContentLengthHeaderEncoderTests) -> () throws -> Void)] { - return [ - ("testEmptyMessage", testEmptyMessage), - ("testRoundtrip", testRoundtrip), - ] - } -} - diff --git a/Tests/NIOExtrasTests/LengthFieldBasedFrameDecoderTest+XCTest.swift b/Tests/NIOExtrasTests/LengthFieldBasedFrameDecoderTest+XCTest.swift deleted file mode 100644 index 0fb509a..0000000 --- a/Tests/NIOExtrasTests/LengthFieldBasedFrameDecoderTest+XCTest.swift +++ /dev/null @@ -1,56 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2018-2022 Apple Inc. and the SwiftNIO project authors -// Licensed under Apache License v2.0 -// -// See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of SwiftNIO project authors -// -// SPDX-License-Identifier: Apache-2.0 -// -//===----------------------------------------------------------------------===// -// -// LengthFieldBasedFrameDecoderTest+XCTest.swift -// -import XCTest - -/// -/// NOTE: This file was generated by generate_linux_tests.rb -/// -/// Do NOT edit this file directly as it will be regenerated automatically when needed. -/// - -extension LengthFieldBasedFrameDecoderTest { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (LengthFieldBasedFrameDecoderTest) -> () throws -> Void)] { - return [ - ("testReadUInt32From3Bytes", testReadUInt32From3Bytes), - ("testReadAndWriteUInt32From3BytesBasicVerification", testReadAndWriteUInt32From3BytesBasicVerification), - ("testDecodeWithUInt8HeaderWithData", testDecodeWithUInt8HeaderWithData), - ("testDecodeWithUInt16HeaderWithString", testDecodeWithUInt16HeaderWithString), - ("testDecodeWithUInt24HeaderWithString", testDecodeWithUInt24HeaderWithString), - ("testDecodeWithUInt32HeaderWithString", testDecodeWithUInt32HeaderWithString), - ("testDecodeWithUInt64HeaderWithString", testDecodeWithUInt64HeaderWithString), - ("testDecodeWithInt64HeaderWithString", testDecodeWithInt64HeaderWithString), - ("testDecodeWithInt64HeaderStringBigEndian", testDecodeWithInt64HeaderStringBigEndian), - ("testDecodeWithInt64HeaderStringDefaultingToBigEndian", testDecodeWithInt64HeaderStringDefaultingToBigEndian), - ("testDecodeWithUInt8HeaderTwoFrames", testDecodeWithUInt8HeaderTwoFrames), - ("testDecodeWithUInt8HeaderFrameSplitIncomingData", testDecodeWithUInt8HeaderFrameSplitIncomingData), - ("testEmptyBuffer", testEmptyBuffer), - ("testDecodeWithUInt16HeaderWithPartialHeader", testDecodeWithUInt16HeaderWithPartialHeader), - ("testDecodeWithUInt16HeaderWithPartialBody", testDecodeWithUInt16HeaderWithPartialBody), - ("testRemoveHandlerWhenBufferIsEmpty", testRemoveHandlerWhenBufferIsEmpty), - ("testRemoveHandlerWhenBufferIsNotEmpty", testRemoveHandlerWhenBufferIsNotEmpty), - ("testCloseInChannelRead", testCloseInChannelRead), - ("testBasicVerification", testBasicVerification), - ("testMaximumAllowedLengthWith32BitFieldLength", testMaximumAllowedLengthWith32BitFieldLength), - ("testMaliciousLengthWith32BitFieldLength", testMaliciousLengthWith32BitFieldLength), - ("testMaximumAllowedLengthWith64BitFieldLength", testMaximumAllowedLengthWith64BitFieldLength), - ("testMaliciousLengthWith64BitFieldLength", testMaliciousLengthWith64BitFieldLength), - ] - } -} - diff --git a/Tests/NIOExtrasTests/LengthFieldPrependerTest+XCTest.swift b/Tests/NIOExtrasTests/LengthFieldPrependerTest+XCTest.swift deleted file mode 100644 index 7863568..0000000 --- a/Tests/NIOExtrasTests/LengthFieldPrependerTest+XCTest.swift +++ /dev/null @@ -1,45 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2019-2022 Apple Inc. and the SwiftNIO project authors -// Licensed under Apache License v2.0 -// -// See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of SwiftNIO project authors -// -// SPDX-License-Identifier: Apache-2.0 -// -//===----------------------------------------------------------------------===// -// -// LengthFieldPrependerTest+XCTest.swift -// -import XCTest - -/// -/// NOTE: This file was generated by generate_linux_tests.rb -/// -/// Do NOT edit this file directly as it will be regenerated automatically when needed. -/// - -extension LengthFieldPrependerTest { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (LengthFieldPrependerTest) -> () throws -> Void)] { - return [ - ("testWrite3BytesOfUInt32Write", testWrite3BytesOfUInt32Write), - ("testEncodeWithUInt8HeaderWithData", testEncodeWithUInt8HeaderWithData), - ("testEncodeWithUInt16HeaderWithString", testEncodeWithUInt16HeaderWithString), - ("testEncodeWithUInt24HeaderWithString", testEncodeWithUInt24HeaderWithString), - ("testEncodeWithUInt32HeaderWithString", testEncodeWithUInt32HeaderWithString), - ("testEncodeWithUInt64HeaderWithString", testEncodeWithUInt64HeaderWithString), - ("testEncodeWithInt64HeaderWithString", testEncodeWithInt64HeaderWithString), - ("testEncodeWithUInt64HeaderStringBigEndian", testEncodeWithUInt64HeaderStringBigEndian), - ("testEncodeWithInt64HeaderStringDefaultingToBigEndian", testEncodeWithInt64HeaderStringDefaultingToBigEndian), - ("testEmptyBuffer", testEmptyBuffer), - ("testLargeBuffer", testLargeBuffer), - ("testTooLargeForLengthField", testTooLargeForLengthField), - ] - } -} - diff --git a/Tests/NIOExtrasTests/LineBasedFrameDecoderTest+XCTest.swift b/Tests/NIOExtrasTests/LineBasedFrameDecoderTest+XCTest.swift deleted file mode 100644 index 7f051b2..0000000 --- a/Tests/NIOExtrasTests/LineBasedFrameDecoderTest+XCTest.swift +++ /dev/null @@ -1,42 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2018-2022 Apple Inc. and the SwiftNIO project authors -// Licensed under Apache License v2.0 -// -// See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of SwiftNIO project authors -// -// SPDX-License-Identifier: Apache-2.0 -// -//===----------------------------------------------------------------------===// -// -// LineBasedFrameDecoderTest+XCTest.swift -// -import XCTest - -/// -/// NOTE: This file was generated by generate_linux_tests.rb -/// -/// Do NOT edit this file directly as it will be regenerated automatically when needed. -/// - -extension LineBasedFrameDecoderTest { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (LineBasedFrameDecoderTest) -> () throws -> Void)] { - return [ - ("testDecodeOneCharacterAtATime", testDecodeOneCharacterAtATime), - ("testRemoveHandlerWhenBufferIsNotEmpty", testRemoveHandlerWhenBufferIsNotEmpty), - ("testRemoveHandlerWhenBufferIsEmpty", testRemoveHandlerWhenBufferIsEmpty), - ("testEmptyLine", testEmptyLine), - ("testEmptyBuffer", testEmptyBuffer), - ("testChannelInactiveWithLeftOverBytes", testChannelInactiveWithLeftOverBytes), - ("testMoreDataAvailableWhenChannelBecomesInactive", testMoreDataAvailableWhenChannelBecomesInactive), - ("testDripFedCRLN", testDripFedCRLN), - ("testBasicValidation", testBasicValidation), - ] - } -} - diff --git a/Tests/NIOExtrasTests/PCAPRingBufferTest+XCTest.swift b/Tests/NIOExtrasTests/PCAPRingBufferTest+XCTest.swift deleted file mode 100644 index d58f04e..0000000 --- a/Tests/NIOExtrasTests/PCAPRingBufferTest+XCTest.swift +++ /dev/null @@ -1,43 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2018-2022 Apple Inc. and the SwiftNIO project authors -// Licensed under Apache License v2.0 -// -// See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of SwiftNIO project authors -// -// SPDX-License-Identifier: Apache-2.0 -// -//===----------------------------------------------------------------------===// -// -// PCAPRingBufferTest+XCTest.swift -// -import XCTest - -/// -/// NOTE: This file was generated by generate_linux_tests.rb -/// -/// Do NOT edit this file directly as it will be regenerated automatically when needed. -/// - -extension PCAPRingBufferTest { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (PCAPRingBufferTest) -> () throws -> Void)] { - return [ - ("testNotLimited", testNotLimited), - ("testFragmentLimit", testFragmentLimit), - ("testByteLimit", testByteLimit), - ("testByteOnLimit", testByteOnLimit), - ("testExtremeByteLimit", testExtremeByteLimit), - ("testUnusedBuffer", testUnusedBuffer), - ("testDoubleEmitZero", testDoubleEmitZero), - ("testDoubleEmitSome", testDoubleEmitSome), - ("testAsHandlerSink", testAsHandlerSink), - ("testHandler", testHandler), - ] - } -} - diff --git a/Tests/NIOExtrasTests/QuiescingHelperTest+XCTest.swift b/Tests/NIOExtrasTests/QuiescingHelperTest+XCTest.swift deleted file mode 100644 index de40aef..0000000 --- a/Tests/NIOExtrasTests/QuiescingHelperTest+XCTest.swift +++ /dev/null @@ -1,42 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2018-2023 Apple Inc. and the SwiftNIO project authors -// Licensed under Apache License v2.0 -// -// See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of SwiftNIO project authors -// -// SPDX-License-Identifier: Apache-2.0 -// -//===----------------------------------------------------------------------===// -// -// QuiescingHelperTest+XCTest.swift -// -import XCTest - -/// -/// NOTE: This file was generated by generate_linux_tests.rb -/// -/// Do NOT edit this file directly as it will be regenerated automatically when needed. -/// - -extension QuiescingHelperTest { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (QuiescingHelperTest) -> () throws -> Void)] { - return [ - ("testShutdownIsImmediateWhenNoChannelsCollected", testShutdownIsImmediateWhenNoChannelsCollected), - ("testQuiesceUserEventReceivedOnShutdown", testQuiesceUserEventReceivedOnShutdown), - ("testQuiescingDoesNotSwallowCloseErrorsFromAcceptHandler", testQuiescingDoesNotSwallowCloseErrorsFromAcceptHandler), - ("testShutdownIsImmediateWhenPromiseDoesNotSucceed", testShutdownIsImmediateWhenPromiseDoesNotSucceed), - ("testShutdown_whenAlreadyShutdown", testShutdown_whenAlreadyShutdown), - ("testShutdown_whenNoOpenChild", testShutdown_whenNoOpenChild), - ("testChannelClose_whenRunning", testChannelClose_whenRunning), - ("testChannelAdded_whenShuttingDown", testChannelAdded_whenShuttingDown), - ("testChannelAdded_whenShutdown", testChannelAdded_whenShutdown), - ] - } -} - diff --git a/Tests/NIOExtrasTests/RequestResponseHandlerTest+XCTest.swift b/Tests/NIOExtrasTests/RequestResponseHandlerTest+XCTest.swift deleted file mode 100644 index 98a4ca5..0000000 --- a/Tests/NIOExtrasTests/RequestResponseHandlerTest+XCTest.swift +++ /dev/null @@ -1,38 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2018-2022 Apple Inc. and the SwiftNIO project authors -// Licensed under Apache License v2.0 -// -// See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of SwiftNIO project authors -// -// SPDX-License-Identifier: Apache-2.0 -// -//===----------------------------------------------------------------------===// -// -// RequestResponseHandlerTest+XCTest.swift -// -import XCTest - -/// -/// NOTE: This file was generated by generate_linux_tests.rb -/// -/// Do NOT edit this file directly as it will be regenerated automatically when needed. -/// - -extension RequestResponseHandlerTest { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (RequestResponseHandlerTest) -> () throws -> Void)] { - return [ - ("testSimpleRequestWorks", testSimpleRequestWorks), - ("testEnqueingMultipleRequestsWorks", testEnqueingMultipleRequestsWorks), - ("testRequestsEnqueuedAfterErrorAreFailed", testRequestsEnqueuedAfterErrorAreFailed), - ("testRequestsEnqueuedJustBeforeErrorAreFailed", testRequestsEnqueuedJustBeforeErrorAreFailed), - ("testClosedConnectionFailsOutstandingPromises", testClosedConnectionFailsOutstandingPromises), - ] - } -} - diff --git a/Tests/NIOExtrasTests/RequestResponseWithIDHandlerTest+XCTest.swift b/Tests/NIOExtrasTests/RequestResponseWithIDHandlerTest+XCTest.swift deleted file mode 100644 index d88e955..0000000 --- a/Tests/NIOExtrasTests/RequestResponseWithIDHandlerTest+XCTest.swift +++ /dev/null @@ -1,41 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2018-2023 Apple Inc. and the SwiftNIO project authors -// Licensed under Apache License v2.0 -// -// See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of SwiftNIO project authors -// -// SPDX-License-Identifier: Apache-2.0 -// -//===----------------------------------------------------------------------===// -// -// RequestResponseWithIDHandlerTest+XCTest.swift -// -import XCTest - -/// -/// NOTE: This file was generated by generate_linux_tests.rb -/// -/// Do NOT edit this file directly as it will be regenerated automatically when needed. -/// - -extension RequestResponseWithIDHandlerTest { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (RequestResponseWithIDHandlerTest) -> () throws -> Void)] { - return [ - ("testSimpleRequestWorks", testSimpleRequestWorks), - ("testEnqueingMultipleRequestsWorks", testEnqueingMultipleRequestsWorks), - ("testRequestsEnqueuedAfterErrorAreFailed", testRequestsEnqueuedAfterErrorAreFailed), - ("testRequestsEnqueuedJustBeforeErrorAreFailed", testRequestsEnqueuedJustBeforeErrorAreFailed), - ("testClosedConnectionFailsOutstandingPromises", testClosedConnectionFailsOutstandingPromises), - ("testOutOfOrderResponsesWork", testOutOfOrderResponsesWork), - ("testErrorOnResponseForNonExistantRequest", testErrorOnResponseForNonExistantRequest), - ("testMoreRequestsAfterChannelInactiveFail", testMoreRequestsAfterChannelInactiveFail), - ] - } -} - diff --git a/Tests/NIOExtrasTests/SynchronizedFileSinkTests+XCTest.swift b/Tests/NIOExtrasTests/SynchronizedFileSinkTests+XCTest.swift deleted file mode 100644 index 3ed6e8f..0000000 --- a/Tests/NIOExtrasTests/SynchronizedFileSinkTests+XCTest.swift +++ /dev/null @@ -1,35 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2018-2023 Apple Inc. and the SwiftNIO project authors -// Licensed under Apache License v2.0 -// -// See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of SwiftNIO project authors -// -// SPDX-License-Identifier: Apache-2.0 -// -//===----------------------------------------------------------------------===// -// -// SynchronizedFileSinkTests+XCTest.swift -// -import XCTest - -/// -/// NOTE: This file was generated by generate_linux_tests.rb -/// -/// Do NOT edit this file directly as it will be regenerated automatically when needed. -/// - -extension SynchronizedFileSinkTests { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (SynchronizedFileSinkTests) -> () throws -> Void)] { - return [ - ("testSimpleFileSink", testSimpleFileSink), - ("testSimpleFileSinkAsyncShutdown", testSimpleFileSinkAsyncShutdown), - ] - } -} - diff --git a/Tests/NIOExtrasTests/WritePCAPHandlerTest+XCTest.swift b/Tests/NIOExtrasTests/WritePCAPHandlerTest+XCTest.swift deleted file mode 100644 index 4e20fc6..0000000 --- a/Tests/NIOExtrasTests/WritePCAPHandlerTest+XCTest.swift +++ /dev/null @@ -1,48 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2019-2022 Apple Inc. and the SwiftNIO project authors -// Licensed under Apache License v2.0 -// -// See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of SwiftNIO project authors -// -// SPDX-License-Identifier: Apache-2.0 -// -//===----------------------------------------------------------------------===// -// -// WritePCAPHandlerTest+XCTest.swift -// -import XCTest - -/// -/// NOTE: This file was generated by generate_linux_tests.rb -/// -/// Do NOT edit this file directly as it will be regenerated automatically when needed. -/// - -extension WritePCAPHandlerTest { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (WritePCAPHandlerTest) -> () throws -> Void)] { - return [ - ("testConnectIssuesThreePacketsForIPv4", testConnectIssuesThreePacketsForIPv4), - ("testConnectIssuesThreePacketsForIPv6", testConnectIssuesThreePacketsForIPv6), - ("testAcceptConnectionFromRemote", testAcceptConnectionFromRemote), - ("testCloseOriginatingFromLocal", testCloseOriginatingFromLocal), - ("testCloseOriginatingFromRemote", testCloseOriginatingFromRemote), - ("testInboundData", testInboundData), - ("testOutboundData", testOutboundData), - ("testOversizedInboundDataComesAsTwoPacketsIPv4", testOversizedInboundDataComesAsTwoPacketsIPv4), - ("testOversizedInboundDataComesAsTwoPacketsIPv6", testOversizedInboundDataComesAsTwoPacketsIPv6), - ("testOversizedOutboundDataComesAsTwoPacketsIPv4", testOversizedOutboundDataComesAsTwoPacketsIPv4), - ("testOversizedOutboundDataComesAsTwoPacketsIPv6", testOversizedOutboundDataComesAsTwoPacketsIPv6), - ("testUnflushedOutboundDataIsNotWritten", testUnflushedOutboundDataIsNotWritten), - ("testDataWrittenAfterCloseIsDiscarded", testDataWrittenAfterCloseIsDiscarded), - ("testUnflushedOutboundDataIsWrittenWhenEmittingWritesOnIssue", testUnflushedOutboundDataIsWrittenWhenEmittingWritesOnIssue), - ("testWeDoNotCrashIfMoreThan4GBOfDataGoThrough", testWeDoNotCrashIfMoreThan4GBOfDataGoThrough), - ] - } -} - diff --git a/Tests/NIOHTTPCompressionTests/HTTPRequestCompressorTest+XCTest.swift b/Tests/NIOHTTPCompressionTests/HTTPRequestCompressorTest+XCTest.swift deleted file mode 100644 index 1846ac1..0000000 --- a/Tests/NIOHTTPCompressionTests/HTTPRequestCompressorTest+XCTest.swift +++ /dev/null @@ -1,43 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2020-2022 Apple Inc. and the SwiftNIO project authors -// Licensed under Apache License v2.0 -// -// See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of SwiftNIO project authors -// -// SPDX-License-Identifier: Apache-2.0 -// -//===----------------------------------------------------------------------===// -// -// HTTPRequestCompressorTest+XCTest.swift -// -import XCTest - -/// -/// NOTE: This file was generated by generate_linux_tests.rb -/// -/// Do NOT edit this file directly as it will be regenerated automatically when needed. -/// - -extension HTTPRequestCompressorTest { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (HTTPRequestCompressorTest) -> () throws -> Void)] { - return [ - ("testGzipContentEncoding", testGzipContentEncoding), - ("testDeflateContentEncoding", testDeflateContentEncoding), - ("testOneBuffer", testOneBuffer), - ("testMultipleBuffers", testMultipleBuffers), - ("testMultipleBuffersDeflate", testMultipleBuffersDeflate), - ("testMultipleBuffersWithFlushes", testMultipleBuffersWithFlushes), - ("testFlushAfterHead", testFlushAfterHead), - ("testFlushBeforeEnd", testFlushBeforeEnd), - ("testDoubleFlush", testDoubleFlush), - ("testNoBody", testNoBody), - ] - } -} - diff --git a/Tests/NIOHTTPCompressionTests/HTTPRequestDecompressorTest+XCTest.swift b/Tests/NIOHTTPCompressionTests/HTTPRequestDecompressorTest+XCTest.swift deleted file mode 100644 index fb7497a..0000000 --- a/Tests/NIOHTTPCompressionTests/HTTPRequestDecompressorTest+XCTest.swift +++ /dev/null @@ -1,39 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2018-2022 Apple Inc. and the SwiftNIO project authors -// Licensed under Apache License v2.0 -// -// See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of SwiftNIO project authors -// -// SPDX-License-Identifier: Apache-2.0 -// -//===----------------------------------------------------------------------===// -// -// HTTPRequestDecompressorTest+XCTest.swift -// -import XCTest - -/// -/// NOTE: This file was generated by generate_linux_tests.rb -/// -/// Do NOT edit this file directly as it will be regenerated automatically when needed. -/// - -extension HTTPRequestDecompressorTest { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (HTTPRequestDecompressorTest) -> () throws -> Void)] { - return [ - ("testDecompressionNoLimit", testDecompressionNoLimit), - ("testDecompressionLimitRatio", testDecompressionLimitRatio), - ("testDecompressionLimitSize", testDecompressionLimitSize), - ("testDecompression", testDecompression), - ("testDecompressionTrailingData", testDecompressionTrailingData), - ("testDecompressionTruncatedInput", testDecompressionTruncatedInput), - ] - } -} - diff --git a/Tests/NIOHTTPCompressionTests/HTTPResponseCompressorTest+XCTest.swift b/Tests/NIOHTTPCompressionTests/HTTPResponseCompressorTest+XCTest.swift deleted file mode 100644 index f1bf6ea..0000000 --- a/Tests/NIOHTTPCompressionTests/HTTPResponseCompressorTest+XCTest.swift +++ /dev/null @@ -1,60 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2019-2022 Apple Inc. and the SwiftNIO project authors -// Licensed under Apache License v2.0 -// -// See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of SwiftNIO project authors -// -// SPDX-License-Identifier: Apache-2.0 -// -//===----------------------------------------------------------------------===// -// -// HTTPResponseCompressorTest+XCTest.swift -// -import XCTest - -/// -/// NOTE: This file was generated by generate_linux_tests.rb -/// -/// Do NOT edit this file directly as it will be regenerated automatically when needed. -/// - -extension HTTPResponseCompressorTest { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (HTTPResponseCompressorTest) -> () throws -> Void)] { - return [ - ("testCanCompressSimpleBodies", testCanCompressSimpleBodies), - ("testCanCompressSimpleBodiesGzip", testCanCompressSimpleBodiesGzip), - ("testCanCompressDeflateWithAwkwardFlushes", testCanCompressDeflateWithAwkwardFlushes), - ("testCanCompressGzipWithAwkwardFlushes", testCanCompressGzipWithAwkwardFlushes), - ("testDoesNotCompressWithoutAcceptEncodingHeader", testDoesNotCompressWithoutAcceptEncodingHeader), - ("testHandlesPipelinedRequestsProperly", testHandlesPipelinedRequestsProperly), - ("testHandlesBasicQValues", testHandlesBasicQValues), - ("testAlwaysPrefersHighestQValue", testAlwaysPrefersHighestQValue), - ("testAsteriskMeansGzip", testAsteriskMeansGzip), - ("testIgnoresUnknownAlgorithms", testIgnoresUnknownAlgorithms), - ("testNonNumericQValuePreventsChoice", testNonNumericQValuePreventsChoice), - ("testNaNQValuePreventsChoice", testNaNQValuePreventsChoice), - ("testInfinityQValuePreventsChoice", testInfinityQValuePreventsChoice), - ("testNegativeInfinityQValuePreventsChoice", testNegativeInfinityQValuePreventsChoice), - ("testOutOfRangeQValuePreventsChoice", testOutOfRangeQValuePreventsChoice), - ("testOverridesContentEncodingHeader", testOverridesContentEncodingHeader), - ("testRemovingHandlerFailsPendingWrites", testRemovingHandlerFailsPendingWrites), - ("testDoesNotBufferWritesNoAlgorithm", testDoesNotBufferWritesNoAlgorithm), - ("testChunkedGzipResponseProducesCorrectNumberOfWrites", testChunkedGzipResponseProducesCorrectNumberOfWrites), - ("testStartsWithSameUnicodeScalarsWorksOnEmptyStrings", testStartsWithSameUnicodeScalarsWorksOnEmptyStrings), - ("testStartsWithSameUnicodeScalarsWorksOnLongerNeedleFalse", testStartsWithSameUnicodeScalarsWorksOnLongerNeedleFalse), - ("testStartsWithSameUnicodeScalarsWorksOnSameStrings", testStartsWithSameUnicodeScalarsWorksOnSameStrings), - ("testStartsWithSameUnicodeScalarsWorksOnPrefix", testStartsWithSameUnicodeScalarsWorksOnPrefix), - ("testStartsWithSameUnicodeScalarsSaysNoForTheSameStringInDifferentNormalisations", testStartsWithSameUnicodeScalarsSaysNoForTheSameStringInDifferentNormalisations), - ("testStartsWithSaysYesForTheSameStringInDifferentNormalisations", testStartsWithSaysYesForTheSameStringInDifferentNormalisations), - ("testCanBeRemoved", testCanBeRemoved), - ("testBypassCompressionWhenNoContent", testBypassCompressionWhenNoContent), - ] - } -} - diff --git a/Tests/NIOHTTPCompressionTests/HTTPResponseDecompressorTest+XCTest.swift b/Tests/NIOHTTPCompressionTests/HTTPResponseDecompressorTest+XCTest.swift deleted file mode 100644 index f015373..0000000 --- a/Tests/NIOHTTPCompressionTests/HTTPResponseDecompressorTest+XCTest.swift +++ /dev/null @@ -1,46 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2018-2022 Apple Inc. and the SwiftNIO project authors -// Licensed under Apache License v2.0 -// -// See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of SwiftNIO project authors -// -// SPDX-License-Identifier: Apache-2.0 -// -//===----------------------------------------------------------------------===// -// -// HTTPResponseDecompressorTest+XCTest.swift -// -import XCTest - -/// -/// NOTE: This file was generated by generate_linux_tests.rb -/// -/// Do NOT edit this file directly as it will be regenerated automatically when needed. -/// - -extension HTTPResponseDecompressorTest { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (HTTPResponseDecompressorTest) -> () throws -> Void)] { - return [ - ("testDecompressionNoLimit", testDecompressionNoLimit), - ("testDecompressionLimitSizeWithContentLenghtHeaderSucceeds", testDecompressionLimitSizeWithContentLenghtHeaderSucceeds), - ("testDecompressionLimitSizeWithContentLenghtHeaderFails", testDecompressionLimitSizeWithContentLenghtHeaderFails), - ("testDecompressionLimitSizeWithoutContentLenghtHeaderSucceeds", testDecompressionLimitSizeWithoutContentLenghtHeaderSucceeds), - ("testDecompressionLimitSizeWithoutContentLenghtHeaderFails", testDecompressionLimitSizeWithoutContentLenghtHeaderFails), - ("testDecompressionLimitRatioWithContentLenghtHeaderSucceeds", testDecompressionLimitRatioWithContentLenghtHeaderSucceeds), - ("testDecompressionLimitRatioWithContentLenghtHeaderFails", testDecompressionLimitRatioWithContentLenghtHeaderFails), - ("testDecompressionLimitRatioWithoutContentLenghtHeaderSucceeds", testDecompressionLimitRatioWithoutContentLenghtHeaderSucceeds), - ("testDecompressionLimitRatioWithoutContentLenghtHeaderFails", testDecompressionLimitRatioWithoutContentLenghtHeaderFails), - ("testDecompression", testDecompression), - ("testDecompressionWithoutContentLength", testDecompressionWithoutContentLength), - ("testDecompressionTrailingData", testDecompressionTrailingData), - ("testDecompressionTruncatedInput", testDecompressionTruncatedInput), - ] - } -} - diff --git a/Tests/NIONFS3Tests/NFS3FileSystemTests+XCTest.swift b/Tests/NIONFS3Tests/NFS3FileSystemTests+XCTest.swift deleted file mode 100644 index 78cacfe..0000000 --- a/Tests/NIONFS3Tests/NFS3FileSystemTests+XCTest.swift +++ /dev/null @@ -1,34 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2018-2023 Apple Inc. and the SwiftNIO project authors -// Licensed under Apache License v2.0 -// -// See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of SwiftNIO project authors -// -// SPDX-License-Identifier: Apache-2.0 -// -//===----------------------------------------------------------------------===// -// -// NFS3FileSystemTests+XCTest.swift -// -import XCTest - -/// -/// NOTE: This file was generated by generate_linux_tests.rb -/// -/// Do NOT edit this file directly as it will be regenerated automatically when needed. -/// - -extension NFS3FileSystemTests { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (NFS3FileSystemTests) -> () throws -> Void)] { - return [ - ("testReadDirDefaultImplementation", testReadDirDefaultImplementation), - ] - } -} - diff --git a/Tests/NIONFS3Tests/NFS3ReplyEncoderTest+XCTest.swift b/Tests/NIONFS3Tests/NFS3ReplyEncoderTest+XCTest.swift deleted file mode 100644 index 96148cb..0000000 --- a/Tests/NIONFS3Tests/NFS3ReplyEncoderTest+XCTest.swift +++ /dev/null @@ -1,35 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2018-2023 Apple Inc. and the SwiftNIO project authors -// Licensed under Apache License v2.0 -// -// See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of SwiftNIO project authors -// -// SPDX-License-Identifier: Apache-2.0 -// -//===----------------------------------------------------------------------===// -// -// NFS3ReplyEncoderTest+XCTest.swift -// -import XCTest - -/// -/// NOTE: This file was generated by generate_linux_tests.rb -/// -/// Do NOT edit this file directly as it will be regenerated automatically when needed. -/// - -extension NFS3ReplyEncoderTest { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (NFS3ReplyEncoderTest) -> () throws -> Void)] { - return [ - ("testPartialReadEncoding", testPartialReadEncoding), - ("testFullReadEncodingParses", testFullReadEncodingParses), - ] - } -} - diff --git a/Tests/NIONFS3Tests/NFS3RoundtripTests+XCTest.swift b/Tests/NIONFS3Tests/NFS3RoundtripTests+XCTest.swift deleted file mode 100644 index c23d70b..0000000 --- a/Tests/NIONFS3Tests/NFS3RoundtripTests+XCTest.swift +++ /dev/null @@ -1,36 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2018-2023 Apple Inc. and the SwiftNIO project authors -// Licensed under Apache License v2.0 -// -// See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of SwiftNIO project authors -// -// SPDX-License-Identifier: Apache-2.0 -// -//===----------------------------------------------------------------------===// -// -// NFS3RoundtripTests+XCTest.swift -// -import XCTest - -/// -/// NOTE: This file was generated by generate_linux_tests.rb -/// -/// Do NOT edit this file directly as it will be regenerated automatically when needed. -/// - -extension NFS3RoundtripTests { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (NFS3RoundtripTests) -> () throws -> Void)] { - return [ - ("testRegularCallsRoundtrip", testRegularCallsRoundtrip), - ("testCallsWithMaxIntegersRoundtrip", testCallsWithMaxIntegersRoundtrip), - ("testRegularOkayRepliesRoundtrip", testRegularOkayRepliesRoundtrip), - ] - } -} - diff --git a/Tests/NIOSOCKSTests/ClientGreeting+Tests+XCTest.swift b/Tests/NIOSOCKSTests/ClientGreeting+Tests+XCTest.swift deleted file mode 100644 index ec4afe9..0000000 --- a/Tests/NIOSOCKSTests/ClientGreeting+Tests+XCTest.swift +++ /dev/null @@ -1,35 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2018-2022 Apple Inc. and the SwiftNIO project authors -// Licensed under Apache License v2.0 -// -// See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of SwiftNIO project authors -// -// SPDX-License-Identifier: Apache-2.0 -// -//===----------------------------------------------------------------------===// -// -// ClientGreeting+Tests+XCTest.swift -// -import XCTest - -/// -/// NOTE: This file was generated by generate_linux_tests.rb -/// -/// Do NOT edit this file directly as it will be regenerated automatically when needed. -/// - -extension ClientGreetingTests { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (ClientGreetingTests) -> () throws -> Void)] { - return [ - ("testInitFromBuffer", testInitFromBuffer), - ("testWriting", testWriting), - ] - } -} - diff --git a/Tests/NIOSOCKSTests/ClientRequest+Tests+XCTest.swift b/Tests/NIOSOCKSTests/ClientRequest+Tests+XCTest.swift deleted file mode 100644 index ce0c090..0000000 --- a/Tests/NIOSOCKSTests/ClientRequest+Tests+XCTest.swift +++ /dev/null @@ -1,36 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2018-2022 Apple Inc. and the SwiftNIO project authors -// Licensed under Apache License v2.0 -// -// See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of SwiftNIO project authors -// -// SPDX-License-Identifier: Apache-2.0 -// -//===----------------------------------------------------------------------===// -// -// ClientRequest+Tests+XCTest.swift -// -import XCTest - -/// -/// NOTE: This file was generated by generate_linux_tests.rb -/// -/// Do NOT edit this file directly as it will be regenerated automatically when needed. -/// - -extension ClientRequestTests { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (ClientRequestTests) -> () throws -> Void)] { - return [ - ("testWriteClientRequest", testWriteClientRequest), - ("testReadAddressType", testReadAddressType), - ("testWriteAddressType", testWriteAddressType), - ] - } -} - diff --git a/Tests/NIOSOCKSTests/ClientStateMachine+Tests+XCTest.swift b/Tests/NIOSOCKSTests/ClientStateMachine+Tests+XCTest.swift deleted file mode 100644 index b7dc55e..0000000 --- a/Tests/NIOSOCKSTests/ClientStateMachine+Tests+XCTest.swift +++ /dev/null @@ -1,35 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2018-2022 Apple Inc. and the SwiftNIO project authors -// Licensed under Apache License v2.0 -// -// See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of SwiftNIO project authors -// -// SPDX-License-Identifier: Apache-2.0 -// -//===----------------------------------------------------------------------===// -// -// ClientStateMachine+Tests+XCTest.swift -// -import XCTest - -/// -/// NOTE: This file was generated by generate_linux_tests.rb -/// -/// Do NOT edit this file directly as it will be regenerated automatically when needed. -/// - -extension ClientStateMachineTests { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (ClientStateMachineTests) -> () throws -> Void)] { - return [ - ("testUsualWorkflow", testUsualWorkflow), - ("testErrorsAreHandled", testErrorsAreHandled), - ] - } -} - diff --git a/Tests/NIOSOCKSTests/Helpers+Tests+XCTest.swift b/Tests/NIOSOCKSTests/Helpers+Tests+XCTest.swift deleted file mode 100644 index f1609d0..0000000 --- a/Tests/NIOSOCKSTests/Helpers+Tests+XCTest.swift +++ /dev/null @@ -1,36 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2018-2022 Apple Inc. and the SwiftNIO project authors -// Licensed under Apache License v2.0 -// -// See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of SwiftNIO project authors -// -// SPDX-License-Identifier: Apache-2.0 -// -//===----------------------------------------------------------------------===// -// -// Helpers+Tests+XCTest.swift -// -import XCTest - -/// -/// NOTE: This file was generated by generate_linux_tests.rb -/// -/// Do NOT edit this file directly as it will be regenerated automatically when needed. -/// - -extension HelperTests { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (HelperTests) -> () throws -> Void)] { - return [ - ("testUnwindingReturnNil", testUnwindingReturnNil), - ("testUnwindingThrowError", testUnwindingThrowError), - ("testUnwindingNotRequired", testUnwindingNotRequired), - ] - } -} - diff --git a/Tests/NIOSOCKSTests/MethodSelection+Tests+XCTest.swift b/Tests/NIOSOCKSTests/MethodSelection+Tests+XCTest.swift deleted file mode 100644 index 2a70450..0000000 --- a/Tests/NIOSOCKSTests/MethodSelection+Tests+XCTest.swift +++ /dev/null @@ -1,35 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2018-2022 Apple Inc. and the SwiftNIO project authors -// Licensed under Apache License v2.0 -// -// See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of SwiftNIO project authors -// -// SPDX-License-Identifier: Apache-2.0 -// -//===----------------------------------------------------------------------===// -// -// MethodSelection+Tests+XCTest.swift -// -import XCTest - -/// -/// NOTE: This file was generated by generate_linux_tests.rb -/// -/// Do NOT edit this file directly as it will be regenerated automatically when needed. -/// - -extension MethodSelectionTests { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (MethodSelectionTests) -> () throws -> Void)] { - return [ - ("testReadFromByteBuffer", testReadFromByteBuffer), - ("testWriteToByteBuffer", testWriteToByteBuffer), - ] - } -} - diff --git a/Tests/NIOSOCKSTests/SOCKSServerHandshakeHandler+Tests+XCTest.swift b/Tests/NIOSOCKSTests/SOCKSServerHandshakeHandler+Tests+XCTest.swift deleted file mode 100644 index 2a113ac..0000000 --- a/Tests/NIOSOCKSTests/SOCKSServerHandshakeHandler+Tests+XCTest.swift +++ /dev/null @@ -1,44 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2018-2022 Apple Inc. and the SwiftNIO project authors -// Licensed under Apache License v2.0 -// -// See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of SwiftNIO project authors -// -// SPDX-License-Identifier: Apache-2.0 -// -//===----------------------------------------------------------------------===// -// -// SOCKSServerHandshakeHandler+Tests+XCTest.swift -// -import XCTest - -/// -/// NOTE: This file was generated by generate_linux_tests.rb -/// -/// Do NOT edit this file directly as it will be regenerated automatically when needed. -/// - -extension SOCKSServerHandlerTests { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (SOCKSServerHandlerTests) -> () throws -> Void)] { - return [ - ("testTypicalWorkflow", testTypicalWorkflow), - ("testTypicalWorkflowDripfeed", testTypicalWorkflowDripfeed), - ("testInboundErrorsAreHandled", testInboundErrorsAreHandled), - ("testOutboundErrorsAreHandled", testOutboundErrorsAreHandled), - ("testFlushOnHandlerRemoved", testFlushOnHandlerRemoved), - ("testForceHandlerRemovalAfterAuth", testForceHandlerRemovalAfterAuth), - ("testAutoAuthenticationComplete", testAutoAuthenticationComplete), - ("testAutoAuthenticationCompleteWithManualCompletion", testAutoAuthenticationCompleteWithManualCompletion), - ("testEagerClientRequestBeforeAuthenticationComplete", testEagerClientRequestBeforeAuthenticationComplete), - ("testManualAuthenticationFailureExtraBytes", testManualAuthenticationFailureExtraBytes), - ("testManualAuthenticationFailureInvalidCompletion", testManualAuthenticationFailureInvalidCompletion), - ] - } -} - diff --git a/Tests/NIOSOCKSTests/ServerResponse+Tests+XCTest.swift b/Tests/NIOSOCKSTests/ServerResponse+Tests+XCTest.swift deleted file mode 100644 index e3b9a47..0000000 --- a/Tests/NIOSOCKSTests/ServerResponse+Tests+XCTest.swift +++ /dev/null @@ -1,34 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2018-2022 Apple Inc. and the SwiftNIO project authors -// Licensed under Apache License v2.0 -// -// See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of SwiftNIO project authors -// -// SPDX-License-Identifier: Apache-2.0 -// -//===----------------------------------------------------------------------===// -// -// ServerResponse+Tests+XCTest.swift -// -import XCTest - -/// -/// NOTE: This file was generated by generate_linux_tests.rb -/// -/// Do NOT edit this file directly as it will be regenerated automatically when needed. -/// - -extension ServerResponseTests { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (ServerResponseTests) -> () throws -> Void)] { - return [ - ("testServerResponseReadFromByteBuffer", testServerResponseReadFromByteBuffer), - ] - } -} - diff --git a/Tests/NIOSOCKSTests/ServerStateMachine+Tests+XCTest.swift b/Tests/NIOSOCKSTests/ServerStateMachine+Tests+XCTest.swift deleted file mode 100644 index b3240ba..0000000 --- a/Tests/NIOSOCKSTests/ServerStateMachine+Tests+XCTest.swift +++ /dev/null @@ -1,36 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2018-2022 Apple Inc. and the SwiftNIO project authors -// Licensed under Apache License v2.0 -// -// See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of SwiftNIO project authors -// -// SPDX-License-Identifier: Apache-2.0 -// -//===----------------------------------------------------------------------===// -// -// ServerStateMachine+Tests+XCTest.swift -// -import XCTest - -/// -/// NOTE: This file was generated by generate_linux_tests.rb -/// -/// Do NOT edit this file directly as it will be regenerated automatically when needed. -/// - -extension ServerStateMachineTests { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (ServerStateMachineTests) -> () throws -> Void)] { - return [ - ("testUsualWorkflow", testUsualWorkflow), - ("testErrorsAreHandled", testErrorsAreHandled), - ("testBytesArentConsumedOnError", testBytesArentConsumedOnError), - ] - } -} - diff --git a/Tests/NIOSOCKSTests/SocksClientHandler+Tests+XCTest.swift b/Tests/NIOSOCKSTests/SocksClientHandler+Tests+XCTest.swift deleted file mode 100644 index 4bb23e7..0000000 --- a/Tests/NIOSOCKSTests/SocksClientHandler+Tests+XCTest.swift +++ /dev/null @@ -1,43 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2018-2022 Apple Inc. and the SwiftNIO project authors -// Licensed under Apache License v2.0 -// -// See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of SwiftNIO project authors -// -// SPDX-License-Identifier: Apache-2.0 -// -//===----------------------------------------------------------------------===// -// -// SocksClientHandler+Tests+XCTest.swift -// -import XCTest - -/// -/// NOTE: This file was generated by generate_linux_tests.rb -/// -/// Do NOT edit this file directly as it will be regenerated automatically when needed. -/// - -extension SocksClientHandlerTests { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (SocksClientHandlerTests) -> () throws -> Void)] { - return [ - ("testTypicalWorkflow", testTypicalWorkflow), - ("testThatBufferingWorks", testThatBufferingWorks), - ("testBufferingWithMark", testBufferingWithMark), - ("testTypicalWorkflowDripfeed", testTypicalWorkflowDripfeed), - ("testInvalidAuthenticationMethod", testInvalidAuthenticationMethod), - ("testProxyConnectionFailed", testProxyConnectionFailed), - ("testDelayedConnection", testDelayedConnection), - ("testDelayedHandlerAdded", testDelayedHandlerAdded), - ("testHandlerRemovalAfterEstablishEvent", testHandlerRemovalAfterEstablishEvent), - ("testHandlerRemovalBeforeConnectionIsEstablished", testHandlerRemovalBeforeConnectionIsEstablished), - ] - } -} - diff --git a/docker/docker-compose.2004.55.yaml b/docker/docker-compose.2004.55.yaml deleted file mode 100644 index 71fa29b..0000000 --- a/docker/docker-compose.2004.55.yaml +++ /dev/null @@ -1,19 +0,0 @@ -version: "3" - -services: - - runtime-setup: - image: swift-nio-extras:20.04-5.5 - build: - args: - ubuntu_version: "focal" - swift_version: "5.5" - - documentation-check: - image: swift-nio-extras:20.04-5.5 - - test: - image: swift-nio-extras:20.04-5.5 - - shell: - image: swift-nio-extras:20.04-5.5 diff --git a/scripts/generate_linux_tests.rb b/scripts/generate_linux_tests.rb deleted file mode 100755 index 4794f98..0000000 --- a/scripts/generate_linux_tests.rb +++ /dev/null @@ -1,290 +0,0 @@ -#!/usr/bin/env ruby - -# -# process_test_files.rb -# -# Copyright 2016 Tony Stone -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# Created by Tony Stone on 5/4/16. -# -require 'date' -require 'getoptlong' -require 'fileutils' -require 'pathname' - -include FileUtils - -# -# This ruby script will auto generate LinuxMain.swift and the +XCTest.swift extension files for Swift Package Manager on Linux platforms. -# -def extractCopyright(log) - startYear = 0 - endYear = 0 - - indices = log.enum_for(:scan, /(?=Date:)/).map do - Regexp.last_match.offset(0).first - end - - # If there are no years, assume this year. - if indices.count == 0 - return "#{Date.today.year}" - end - - # Return one year if there is only one year - if indices.count == 1 - year = log[indices[0]+27..indices[0]+31] - return "#{year}" - end - # Return a year range - indices.each_with_index do |ind, i| - year = log[ind+27..ind+31] - # Seed start year - if i == 0 - startYear = Integer(year) - end - - # For all other years following - if Integer(year) > endYear - endYear = Integer(year) - end - - if Integer(year) < startYear - startYear = Integer(year) - end - - end - - # If the years end up being the same - if startYear == endYear - return "#{startYear}" - end - # Otherwise, return the year range - return "#{startYear}-#{endYear}" -end - -def header(fileName) - log = %x(git log --follow -p #{fileName}) - copyrightYears = extractCopyright(log).strip - - string = <<-eos -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) #{copyrightYears} Apple Inc. and the SwiftNIO project authors -// Licensed under Apache License v2.0 -// -// See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of SwiftNIO project authors -// -// SPDX-License-Identifier: Apache-2.0 -// -//===----------------------------------------------------------------------===// -// -// -// -import XCTest - -/// -/// NOTE: This file was generated by generate_linux_tests.rb -/// -/// Do NOT edit this file directly as it will be regenerated automatically when needed. -/// - eos - - string - .sub('', File.basename(fileName)) - .sub('', Time.now.to_s) -end - -def createExtensionFile(fileName, classes) - extensionFile = fileName.sub! '.swift', '+XCTest.swift' - print 'Creating file: ' + extensionFile + "\n" - - File.open(extensionFile, 'w') do |file| - file.write header(extensionFile) - file.write "\n" - - for classArray in classes - file.write 'extension ' + classArray[0] + " {\n\n" - file.write ' @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings")' +"\n" - file.write ' static var allTests : [(String, (' + classArray[0] + ") -> () throws -> Void)] {\n" - file.write " return [\n" - - for funcName in classArray[1] - file.write ' ("' + funcName + '", ' + funcName + "),\n" - end - - file.write " ]\n" - file.write " }\n" - file.write "}\n\n" - end - end -end - -def createLinuxMain(testsDirectory, allTestSubDirectories, files) - fileName = testsDirectory + '/LinuxMain.swift' - print 'Creating file: ' + fileName + "\n" - - File.open(fileName, 'w') do |file| - file.write header(fileName) - file.write "\n" - - file.write "#if !compiler(>=5.5)\n" - file.write "#if os(Linux) || os(FreeBSD) || os(Android)\n" - for testSubDirectory in allTestSubDirectories.sort { |x, y| x <=> y } - file.write ' @testable import ' + testSubDirectory + "\n" - end - file.write "\n" - file.write '@available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings")' + "\n" - file.write "@main\n" - file.write "class LinuxMainRunner {\n" - file.write ' @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings")' + "\n" - file.write " static func main() {\n" - file.write " XCTMain([\n" - - testCases = [] - for classes in files - for classArray in classes - testCases << classArray[0] - end - end - - for testCase in testCases.sort { |x, y| x <=> y } - file.write ' testCase(' + testCase + ".allTests),\n" - end - file.write " ])\n" - file.write " }\n" - file.write "}\n" - file.write "#endif\n" - file.write "#else\n" - file.write "#error(\"on Swift 5.5 and newer, --enable-test-discovery is required\")\n" - file.write "#endif\n" - end -end - -def parseSourceFile(fileName) - puts 'Parsing file: ' + fileName + "\n" - - classes = [] - currentClass = nil - inIfLinux = false - inElse = false - ignore = false - - # - # Read the file line by line - # and parse to find the class - # names and func names - # - File.readlines(fileName).each do |line| - if inIfLinux - if /\#else/.match(line) - inElse = true - ignore = true - else - if /\#end/.match(line) - inElse = false - inIfLinux = false - ignore = false - end - end - else - if /\#if[ \t]+os\(Linux\)/.match(line) - inIfLinux = true - ignore = false - end - end - - next if ignore - # Match class or func - match = line[/class[ \t]+[a-zA-Z0-9_]*(?=[ \t]*:[ \t]*XCTestCase)|func[ \t]+test[a-zA-Z0-9_]*(?=[ \t]*\(\))/, 0] - if match - - if match[/class/, 0] == 'class' - className = match.sub(/^class[ \t]+/, '') - # - # Create a new class / func structure - # and add it to the classes array. - # - currentClass = [className, []] - classes << currentClass - else # Must be a func - funcName = match.sub(/^func[ \t]+/, '') - # - # Add each func name the the class / func - # structure created above. - # - currentClass[1] << funcName - end - end - end - classes -end - -# -# Main routine -# -# - -testsDirectory = 'Tests' - -options = GetoptLong.new(['--tests-dir', GetoptLong::OPTIONAL_ARGUMENT]) -options.quiet = true - -begin - options.each do |option, value| - case option - when '--tests-dir' - testsDirectory = value - end - end -rescue GetoptLong::InvalidOption -end - -allTestSubDirectories = [] -allFiles = [] - -Dir[testsDirectory + '/*'].each do |subDirectory| - next unless File.directory?(subDirectory) - directoryHasClasses = false - Dir[subDirectory + '/*Test{s,}.swift'].each do |fileName| - next unless File.file? fileName - fileClasses = parseSourceFile(fileName) - - # - # If there are classes in the - # test source file, create an extension - # file for it. - # - next unless fileClasses.count > 0 - createExtensionFile(fileName, fileClasses) - directoryHasClasses = true - allFiles << fileClasses - end - - if directoryHasClasses - allTestSubDirectories << Pathname.new(subDirectory).split.last.to_s - end -end - -# -# Last step is the create a LinuxMain.swift file that -# references all the classes and funcs in the source files. -# -if allFiles.count > 0 - createLinuxMain(testsDirectory, allTestSubDirectories, allFiles) -end -# eof diff --git a/scripts/soundness.sh b/scripts/soundness.sh index 59dc5ea..8ab4735 100755 --- a/scripts/soundness.sh +++ b/scripts/soundness.sh @@ -21,18 +21,6 @@ function replace_acceptable_years() { sed -e 's/20[12][7890123]-20[12][7890123]/YEARS/' -e 's/20[12][890123]/YEARS/' } -printf "=> Checking linux tests... " -FIRST_OUT="$(git status --porcelain)" -ruby "$here/../scripts/generate_linux_tests.rb" > /dev/null -SECOND_OUT="$(git status --porcelain)" -if [[ "$FIRST_OUT" != "$SECOND_OUT" ]]; then - printf "\033[0;31mmissing changes!\033[0m\n" - git --no-pager diff - exit 1 -else - printf "\033[0;32mokay.\033[0m\n" -fi - printf "=> Checking for unacceptable language... " # This greps for unacceptable terminology. The square bracket[s] are so that # "git grep" doesn't find the lines that greps :).