diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 403e210d..eab29e74 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -72,7 +72,7 @@ For this reason, whenever you add new tests **you have to run a script** that ge ### Make sure your patch works for all supported versions of swift -The CI will do this for you. You can use the docker-compose files included if you wish to check locally. Currently all versions of swift >= 5.5.2 are supported. For example usage of docker compose see the main [README](./README.md#an-alternative-using-docker-compose) +The CI will do this for you. You can use the docker-compose files included if you wish to check locally. Currently all versions of swift >= 5.6 are supported. For example usage of docker compose see the main [README](./README.md#an-alternative-using-docker-compose) ### Make sure your code is performant diff --git a/IntegrationTests/tests_02_syscall_wrappers/defines.sh b/IntegrationTests/tests_02_syscall_wrappers/defines.sh index 1f7823f1..ac7793b0 100644 --- a/IntegrationTests/tests_02_syscall_wrappers/defines.sh +++ b/IntegrationTests/tests_02_syscall_wrappers/defines.sh @@ -22,7 +22,7 @@ function make_package() { fi cat > "$tmpdir/syscallwrapper/Package.swift" <<"EOF" -// swift-tools-version:5.5 +// swift-tools-version:5.6 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription diff --git a/Package.swift b/Package.swift index 4048d590..332da91f 100644 --- a/Package.swift +++ b/Package.swift @@ -139,7 +139,7 @@ let package = Package( .library(name: "NIOTestUtils", targets: ["NIOTestUtils"]), ], dependencies: [ - .package(url: "https://github.com/apple/swift-atomics.git", from: "1.0.2"), + .package(url: "https://github.com/apple/swift-atomics.git", from: "1.1.0"), .package(url: "https://github.com/apple/swift-collections.git", from: "1.0.2"), .package(url: "https://github.com/apple/swift-docc-plugin", from: "1.0.0"), ], diff --git a/Package@swift-5.5.swift b/Package@swift-5.5.swift deleted file mode 100644 index fb7f87ac..00000000 --- a/Package@swift-5.5.swift +++ /dev/null @@ -1,145 +0,0 @@ -// swift-tools-version:5.5 -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2017-2021 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 - -let swiftAtomics: PackageDescription.Target.Dependency = .product(name: "Atomics", package: "swift-atomics") -let swiftCollections: PackageDescription.Target.Dependency = .product(name: "DequeModule", package: "swift-collections") - -var targets: [PackageDescription.Target] = [ - .target(name: "NIOCore", - dependencies: ["NIOConcurrencyHelpers", "CNIOLinux", "CNIOWindows", swiftCollections, swiftAtomics]), - .target(name: "_NIODataStructures"), - .target(name: "NIOEmbedded", - dependencies: ["NIOCore", - "NIOConcurrencyHelpers", - "_NIODataStructures", - swiftAtomics]), - .target(name: "NIOPosix", - dependencies: ["CNIOLinux", - "CNIODarwin", - "CNIOWindows", - "NIOConcurrencyHelpers", - "NIOCore", - "_NIODataStructures", - swiftAtomics]), - .target(name: "NIO", - dependencies: ["NIOCore", - "NIOEmbedded", - "NIOPosix"]), - .target(name: "_NIOConcurrency", - dependencies: ["NIO", "NIOCore"]), - .target(name: "NIOFoundationCompat", dependencies: ["NIO", "NIOCore"]), - .target(name: "CNIOAtomics", dependencies: []), - .target(name: "CNIOSHA1", dependencies: []), - .target(name: "CNIOLinux", dependencies: []), - .target(name: "CNIODarwin", dependencies: [], cSettings: [.define("__APPLE_USE_RFC_3542")]), - .target(name: "CNIOWindows", dependencies: []), - .target(name: "NIOConcurrencyHelpers", - dependencies: ["CNIOAtomics"]), - .target(name: "NIOHTTP1", - dependencies: ["NIO", "NIOCore", "NIOConcurrencyHelpers", "CNIOLLHTTP"]), - .executableTarget(name: "NIOEchoServer", - dependencies: ["NIOPosix", "NIOCore", "NIOConcurrencyHelpers"], - exclude: ["README.md"]), - .executableTarget(name: "NIOEchoClient", - dependencies: ["NIOPosix", "NIOCore", "NIOConcurrencyHelpers"], - exclude: ["README.md"]), - .executableTarget(name: "NIOHTTP1Server", - dependencies: ["NIOPosix", "NIOCore", "NIOHTTP1", "NIOConcurrencyHelpers"], - exclude: ["README.md"]), - .executableTarget(name: "NIOHTTP1Client", - dependencies: ["NIOPosix", "NIOCore", "NIOHTTP1", "NIOConcurrencyHelpers"], - exclude: ["README.md"]), - .target( - name: "CNIOLLHTTP", - cSettings: [.define("LLHTTP_STRICT_MODE")] - ), - .target(name: "NIOTLS", dependencies: ["NIO", "NIOCore"]), - .executableTarget(name: "NIOChatServer", - dependencies: ["NIOPosix", "NIOCore", "NIOConcurrencyHelpers"], - exclude: ["README.md"]), - .executableTarget(name: "NIOChatClient", - dependencies: ["NIOPosix", "NIOCore", "NIOConcurrencyHelpers"], - exclude: ["README.md"]), - .target(name: "NIOWebSocket", - dependencies: ["NIO", "NIOCore", "NIOHTTP1", "CNIOSHA1"]), - .executableTarget(name: "NIOWebSocketServer", - dependencies: ["NIOPosix", "NIOCore", "NIOHTTP1", "NIOWebSocket"], - exclude: ["README.md"]), - .executableTarget(name: "NIOWebSocketClient", - dependencies: ["NIOPosix", "NIOCore", "NIOHTTP1", "NIOWebSocket"], - exclude: ["README.md"]), - .executableTarget(name: "NIOPerformanceTester", - dependencies: ["NIOPosix", "NIOCore", "NIOEmbedded", "NIOHTTP1", "NIOFoundationCompat", "NIOWebSocket"]), - .executableTarget(name: "NIOMulticastChat", - dependencies: ["NIOPosix", "NIOCore"]), - .executableTarget(name: "NIOUDPEchoServer", - dependencies: ["NIOPosix", "NIOCore"], - exclude: ["README.md"]), - .executableTarget(name: "NIOUDPEchoClient", - dependencies: ["NIOPosix", "NIOCore"], - exclude: ["README.md"]), - .target(name: "NIOTestUtils", - dependencies: ["NIOPosix", "NIOCore", "NIOEmbedded", "NIOHTTP1", swiftAtomics]), - .executableTarget(name: "NIOCrashTester", - dependencies: ["NIOPosix", "NIOCore", "NIOEmbedded", "NIOHTTP1", "NIOWebSocket", "NIOFoundationCompat"]), - .executableTarget(name: "NIOAsyncAwaitDemo", - dependencies: ["NIOPosix", "NIOCore", "NIOHTTP1"]), - .testTarget(name: "NIOCoreTests", - dependencies: ["NIOCore", "NIOEmbedded", "NIOFoundationCompat"]), - .testTarget(name: "NIOEmbeddedTests", - dependencies: ["NIOConcurrencyHelpers", "NIOCore", "NIOEmbedded"]), - .testTarget(name: "NIOPosixTests", - dependencies: ["NIOPosix", "NIOCore", "NIOFoundationCompat", "NIOTestUtils", "NIOConcurrencyHelpers", "NIOEmbedded"]), - .testTarget(name: "NIOConcurrencyHelpersTests", - dependencies: ["NIOConcurrencyHelpers", "NIOCore"]), - .testTarget(name: "NIODataStructuresTests", - dependencies: ["_NIODataStructures"]), - .testTarget(name: "NIOHTTP1Tests", - dependencies: ["NIOCore", "NIOEmbedded", "NIOPosix", "NIOHTTP1", "NIOFoundationCompat", "NIOTestUtils"]), - .testTarget(name: "NIOTLSTests", - dependencies: ["NIOCore", "NIOEmbedded", "NIOTLS", "NIOFoundationCompat"]), - .testTarget(name: "NIOWebSocketTests", - dependencies: ["NIOCore", "NIOEmbedded", "NIOWebSocket"]), - .testTarget(name: "NIOTestUtilsTests", - dependencies: ["NIOTestUtils", "NIOCore", "NIOEmbedded", "NIOPosix"]), - .testTarget(name: "NIOFoundationCompatTests", - dependencies: ["NIOCore", "NIOFoundationCompat"]), - .testTarget(name: "NIOTests", - dependencies: ["NIO"]), -] - -let package = Package( - name: "swift-nio", - products: [ - .library(name: "NIOCore", targets: ["NIOCore"]), - .library(name: "NIO", targets: ["NIO"]), - .library(name: "NIOEmbedded", targets: ["NIOEmbedded"]), - .library(name: "NIOPosix", targets: ["NIOPosix"]), - .library(name: "_NIOConcurrency", targets: ["_NIOConcurrency"]), - .library(name: "NIOTLS", targets: ["NIOTLS"]), - .library(name: "NIOHTTP1", targets: ["NIOHTTP1"]), - .library(name: "NIOConcurrencyHelpers", targets: ["NIOConcurrencyHelpers"]), - .library(name: "NIOFoundationCompat", targets: ["NIOFoundationCompat"]), - .library(name: "NIOWebSocket", targets: ["NIOWebSocket"]), - .library(name: "NIOTestUtils", targets: ["NIOTestUtils"]), - ], - dependencies: [ - .package(url: "https://github.com/apple/swift-atomics.git", from: "1.0.2"), - .package(url: "https://github.com/apple/swift-collections.git", from: "1.0.2"), - ], - targets: targets -) diff --git a/README.md b/README.md index 14cbe04d..7352b280 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ It's like [Netty](https://netty.io), but written for Swift. The SwiftNIO project is split across multiple repositories: -Repository | NIO 2 (Swift 5.5.2+) +Repository | NIO 2 (Swift 5.6+) --- | --- [https://github.com/apple/swift-nio][repo-nio]
SwiftNIO core | `from: "2.0.0"` [https://github.com/apple/swift-nio-ssl][repo-nio-ssl]
TLS (SSL) support | `from: "2.0.0"` @@ -70,14 +70,15 @@ Redis | ✅ | ❌ | [mordil/swift-redi-stack](https://gitlab.com/Mordil/swift-re This is the current version of SwiftNIO and will be supported for the foreseeable future. -The most recent versions of SwiftNIO support Swift 5.5.2 and newer. The minimum Swift version supported by SwiftNIO releases are detailed below: +The most recent versions of SwiftNIO support Swift 5.6 and newer. The minimum Swift version supported by SwiftNIO releases are detailed below: SwiftNIO | Minimum Swift Version --------------------|---------------------- `2.0.0 ..< 2.30.0` | 5.0 `2.30.0 ..< 2.40.0` | 5.2 `2.40.0 ..< 2.43.0` | 5.4 -`2.43.0 ...` | 5.5.2 +`2.43.0 ..< 2.51.0` | 5.5.2 +`2.51.0 ...` | 5.6 ### SwiftNIO 1 SwiftNIO 1 is considered end of life - it is strongly recommended that you move to a newer version. The Core NIO team does not actively work on this version. No new features will be added to this version but PRs which fix bugs or security vulnerabilities will be accepted until the end of May 2022. @@ -331,7 +332,7 @@ have a few prerequisites installed on your system. ### Linux -- Swift 5.5.2 or newer from [swift.org/download](https://swift.org/download/#releases). We always recommend to use the latest released version. +- Swift 5.6 or newer from [swift.org/download](https://swift.org/download/#releases). We always recommend to use the latest released version. - netcat (for integration tests only) - lsof (for integration tests only) - shasum (for integration tests only) diff --git a/SECURITY.md b/SECURITY.md index 9dcaeb79..d1e7b82c 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -17,8 +17,10 @@ team would create the following patch releases: Swift 5.2 and 5.3 * NIO 2.42. + plus next patch release to address the issue for projects that support Swift 5.4 and later -* mainline + plus next patch release to address the issue for projects that support +* NIO 2.50. + plus next patch release to address the issue for projects that support Swift 5.5.2 and later +* mainline + plus next patch release to address the issue for projects that support + Swift 5.6 and later SwiftNIO 1.x is considered end of life and will not receive any security patches. diff --git a/Sources/NIOCore/AsyncChannel/AsyncChannel.swift b/Sources/NIOCore/AsyncChannel/AsyncChannel.swift index 9bac4d9f..a78e5e67 100644 --- a/Sources/NIOCore/AsyncChannel/AsyncChannel.swift +++ b/Sources/NIOCore/AsyncChannel/AsyncChannel.swift @@ -11,7 +11,7 @@ // SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// -#if swift(>=5.6) + /// Wraps a NIO ``Channel`` object into a form suitable for use in Swift Concurrency. /// /// ``NIOAsyncChannel`` abstracts the notion of a NIO ``Channel`` into something that @@ -130,4 +130,3 @@ extension Channel { return (inboundStream, writer) } } -#endif diff --git a/Sources/NIOCore/AsyncChannel/AsyncChannelInboundStream.swift b/Sources/NIOCore/AsyncChannel/AsyncChannelInboundStream.swift index 6d25b910..28e65be9 100644 --- a/Sources/NIOCore/AsyncChannel/AsyncChannelInboundStream.swift +++ b/Sources/NIOCore/AsyncChannel/AsyncChannelInboundStream.swift @@ -11,7 +11,7 @@ // SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// -#if swift(>=5.6) + /// The inbound message asynchronous sequence of a ``NIOAsyncChannel``. /// /// This is a unicast async sequence that allows a single iterator to be created. @@ -87,4 +87,4 @@ extension NIOAsyncChannelInboundStream: AsyncSequence { @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) @available(*, unavailable) extension NIOAsyncChannelInboundStream.AsyncIterator: Sendable {} -#endif + diff --git a/Sources/NIOCore/AsyncChannel/AsyncChannelInboundStreamChannelHandler.swift b/Sources/NIOCore/AsyncChannel/AsyncChannelInboundStreamChannelHandler.swift index c581b8c1..b4956363 100644 --- a/Sources/NIOCore/AsyncChannel/AsyncChannelInboundStreamChannelHandler.swift +++ b/Sources/NIOCore/AsyncChannel/AsyncChannelInboundStreamChannelHandler.swift @@ -11,7 +11,7 @@ // SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// -#if swift(>=5.6) + /// A ``ChannelHandler`` that is used to transform the inbound portion of a NIO /// ``Channel`` into an asynchronous sequence that supports back-pressure. @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) @@ -249,4 +249,4 @@ extension NIOAsyncChannelInboundStreamChannelHandler { @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) @available(*, unavailable) extension NIOAsyncChannelInboundStreamChannelHandler: Sendable {} -#endif + diff --git a/Sources/NIOCore/AsyncChannel/AsyncChannelOutboundWriter.swift b/Sources/NIOCore/AsyncChannel/AsyncChannelOutboundWriter.swift index 0831687b..57939b50 100644 --- a/Sources/NIOCore/AsyncChannel/AsyncChannelOutboundWriter.swift +++ b/Sources/NIOCore/AsyncChannel/AsyncChannelOutboundWriter.swift @@ -12,7 +12,7 @@ // //===----------------------------------------------------------------------===// -#if swift(>=5.6) + /// A ``NIOAsyncChannelWriter`` is used to write and flush new outbound messages in a channel. /// /// The writer acts as a bridge between the Concurrency and NIO world. It allows to write and flush messages into the @@ -90,4 +90,4 @@ public struct NIOAsyncChannelOutboundWriter: Sendable { self._outboundWriter.finish() } } -#endif + diff --git a/Sources/NIOCore/AsyncChannel/AsyncChannelOutboundWriterHandler.swift b/Sources/NIOCore/AsyncChannel/AsyncChannelOutboundWriterHandler.swift index bbbf8dec..047b16be 100644 --- a/Sources/NIOCore/AsyncChannel/AsyncChannelOutboundWriterHandler.swift +++ b/Sources/NIOCore/AsyncChannel/AsyncChannelOutboundWriterHandler.swift @@ -11,7 +11,7 @@ // SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// -#if swift(>=5.6) + import DequeModule /// A ``ChannelHandler`` that is used to write the outbound portion of a NIO @@ -172,4 +172,4 @@ extension NIOAsyncChannelOutboundWriterHandler { @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) @available(*, unavailable) extension NIOAsyncChannelOutboundWriterHandler: Sendable {} -#endif + diff --git a/Sources/NIOCore/AsyncChannel/CloseRatchet.swift b/Sources/NIOCore/AsyncChannel/CloseRatchet.swift index 11845f28..c8efd4d2 100644 --- a/Sources/NIOCore/AsyncChannel/CloseRatchet.swift +++ b/Sources/NIOCore/AsyncChannel/CloseRatchet.swift @@ -11,7 +11,7 @@ // SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// -#if swift(>=5.6) + /// A helper type that lets ``NIOAsyncChannelAdapterHandler`` and ``NIOAsyncChannelWriterHandler`` collude /// to ensure that the ``Channel`` they share is closed appropriately. /// @@ -91,4 +91,4 @@ final class CloseRatchet { return self._state.closeWrite() } } -#endif + diff --git a/Sources/NIOCore/Channel.swift b/Sources/NIOCore/Channel.swift index 9cac2056..d61e3b7d 100644 --- a/Sources/NIOCore/Channel.swift +++ b/Sources/NIOCore/Channel.swift @@ -102,7 +102,7 @@ public protocol ChannelCore: AnyObject { /// passed to or returned by the operations are used to retrieve the result of an operation after it has completed. /// /// A `Channel` owns its `ChannelPipeline` which handles all I/O events and requests associated with the `Channel`. -public protocol Channel: AnyObject, ChannelOutboundInvoker, NIOPreconcurrencySendable { +public protocol Channel: AnyObject, ChannelOutboundInvoker, _NIOPreconcurrencySendable { /// The `Channel`'s `ByteBuffer` allocator. This is _the only_ supported way of allocating `ByteBuffer`s to be used with this `Channel`. var allocator: ByteBufferAllocator { get } diff --git a/Sources/NIOCore/ChannelOption.swift b/Sources/NIOCore/ChannelOption.swift index 7ab8bcf9..690c03f0 100644 --- a/Sources/NIOCore/ChannelOption.swift +++ b/Sources/NIOCore/ChannelOption.swift @@ -13,7 +13,7 @@ //===----------------------------------------------------------------------===// /// A configuration option that can be set on a `Channel` to configure different behaviour. -public protocol ChannelOption: Equatable, NIOPreconcurrencySendable { +public protocol ChannelOption: Equatable, _NIOPreconcurrencySendable { /// The type of the `ChannelOption`'s value. associatedtype Value } @@ -437,6 +437,4 @@ extension ChannelOptions { } } -#if swift(>=5.6) extension ChannelOptions.Storage: @unchecked Sendable {} -#endif diff --git a/Sources/NIOCore/EventLoop.swift b/Sources/NIOCore/EventLoop.swift index b74d0fa0..445bb811 100644 --- a/Sources/NIOCore/EventLoop.swift +++ b/Sources/NIOCore/EventLoop.swift @@ -1153,7 +1153,7 @@ extension EventLoop { } /// Provides an endless stream of `EventLoop`s to use. -public protocol EventLoopGroup: AnyObject, NIOPreconcurrencySendable { +public protocol EventLoopGroup: AnyObject, _NIOPreconcurrencySendable { /// Returns the next `EventLoop` to use, this is useful for load balancing. /// /// The algorithm that is used to select the next `EventLoop` is specific to each `EventLoopGroup`. A common choice diff --git a/Sources/NIOCore/EventLoopFuture+WithEventLoop.swift b/Sources/NIOCore/EventLoopFuture+WithEventLoop.swift index 703f097d..4d105fa6 100644 --- a/Sources/NIOCore/EventLoopFuture+WithEventLoop.swift +++ b/Sources/NIOCore/EventLoopFuture+WithEventLoop.swift @@ -13,7 +13,6 @@ //===----------------------------------------------------------------------===// extension EventLoopFuture { - #if swift(>=5.6) /// When the current `EventLoopFuture` is fulfilled, run the provided callback, /// which will provide a new `EventLoopFuture` alongside the `EventLoop` associated with this future. /// @@ -43,45 +42,6 @@ extension EventLoopFuture { @inlinable @preconcurrency public func flatMapWithEventLoop(_ callback: @escaping @Sendable (Value, EventLoop) -> EventLoopFuture) -> EventLoopFuture { - self._flatMapWithEventLoop(callback) - } - @usableFromInline typealias FlatMapWithEventLoopCallback = @Sendable (Value, EventLoop) -> EventLoopFuture - #else - /// When the current `EventLoopFuture` is fulfilled, run the provided callback, - /// which will provide a new `EventLoopFuture` alongside the `EventLoop` associated with this future. - /// - /// This allows you to dynamically dispatch new asynchronous tasks as phases in a - /// longer series of processing steps. Note that you can use the results of the - /// current `EventLoopFuture` when determining how to dispatch the next operation. - /// - /// This works well when you have APIs that already know how to return `EventLoopFuture`s. - /// You can do something with the result of one and just return the next future: - /// - /// ``` - /// let d1 = networkRequest(args).future() - /// let d2 = d1.flatMapWithEventLoop { t, eventLoop -> EventLoopFuture in - /// eventLoop.makeSucceededFuture(t + 1) - /// } - /// d2.whenSuccess { u in - /// NSLog("Result of second request: \(u)") - /// } - /// ``` - /// - /// Note: In a sense, the `EventLoopFuture` is returned before it's created. - /// - /// - parameters: - /// - callback: Function that will receive the value of this `EventLoopFuture` and return - /// a new `EventLoopFuture`. - /// - returns: A future that will receive the eventual value. - @inlinable - public func flatMapWithEventLoop(_ callback: @escaping (Value, EventLoop) -> EventLoopFuture) -> EventLoopFuture { - self._flatMapWithEventLoop(callback) - } - @usableFromInline typealias FlatMapWithEventLoopCallback = (Value, EventLoop) -> EventLoopFuture - #endif - - @inlinable - func _flatMapWithEventLoop(_ callback: @escaping FlatMapWithEventLoopCallback) -> EventLoopFuture { let next = EventLoopPromise.makeUnleakablePromise(eventLoop: self.eventLoop) self._whenComplete { [eventLoop = self.eventLoop] in switch self._value! { @@ -102,7 +62,6 @@ extension EventLoopFuture { return next.futureResult } - #if swift(>=5.6) /// When the current `EventLoopFuture` is in an error state, run the provided callback, which /// may recover from the error by returning an `EventLoopFuture`. The callback is intended to potentially /// recover from the error by returning a new `EventLoopFuture` that will eventually contain the recovered @@ -117,30 +76,6 @@ extension EventLoopFuture { @inlinable @preconcurrency public func flatMapErrorWithEventLoop(_ callback: @escaping @Sendable (Error, EventLoop) -> EventLoopFuture) -> EventLoopFuture { - self._flatMapErrorWithEventLoop(callback) - } - @usableFromInline typealias FlatMapWithErrorWithEventLoopCallback = @Sendable (Error, EventLoop) -> EventLoopFuture - #else - /// When the current `EventLoopFuture` is in an error state, run the provided callback, which - /// may recover from the error by returning an `EventLoopFuture`. The callback is intended to potentially - /// recover from the error by returning a new `EventLoopFuture` that will eventually contain the recovered - /// result. - /// - /// If the callback cannot recover it should return a failed `EventLoopFuture`. - /// - /// - parameters: - /// - callback: Function that will receive the error value of this `EventLoopFuture` and return - /// a new value lifted into a new `EventLoopFuture`. - /// - returns: A future that will receive the recovered value. - @inlinable - public func flatMapErrorWithEventLoop(_ callback: @escaping (Error, EventLoop) -> EventLoopFuture) -> EventLoopFuture { - self._flatMapErrorWithEventLoop(callback) - } - @usableFromInline typealias FlatMapWithErrorWithEventLoopCallback = (Error, EventLoop) -> EventLoopFuture - #endif - - @inlinable - func _flatMapErrorWithEventLoop(_ callback: @escaping FlatMapWithErrorWithEventLoopCallback) -> EventLoopFuture { let next = EventLoopPromise.makeUnleakablePromise(eventLoop: self.eventLoop) self._whenComplete { [eventLoop = self.eventLoop] in switch self._value! { @@ -161,7 +96,6 @@ extension EventLoopFuture { return next.futureResult } - #if swift(>=5.6) /// Returns a new `EventLoopFuture` that fires only when this `EventLoopFuture` and /// all the provided `futures` complete. It then provides the result of folding the value of this /// `EventLoopFuture` with the values of all the provided `futures`. @@ -197,62 +131,6 @@ extension EventLoopFuture { return body } - if self.eventLoop.inEventLoop { - return fold0(eventLoop: self.eventLoop) - } else { - let promise = self.eventLoop.makePromise(of: Value.self) - self.eventLoop.execute { [eventLoop = self.eventLoop] in - fold0(eventLoop: eventLoop).cascade(to: promise) - } - return promise.futureResult - } - } - @usableFromInline typealias FoldWithEventLoop = @Sendable (Value, OtherValue, EventLoop) -> EventLoopFuture - #else - /// Returns a new `EventLoopFuture` that fires only when this `EventLoopFuture` and - /// all the provided `futures` complete. It then provides the result of folding the value of this - /// `EventLoopFuture` with the values of all the provided `futures`. - /// - /// This function is suited when you have APIs that already know how to return `EventLoopFuture`s. - /// - /// The returned `EventLoopFuture` will fail as soon as the a failure is encountered in any of the - /// `futures` (or in this one). However, the failure will not occur until all preceding - /// `EventLoopFutures` have completed. At the point the failure is encountered, all subsequent - /// `EventLoopFuture` objects will no longer be waited for. This function therefore fails fast: once - /// a failure is encountered, it will immediately fail the overall EventLoopFuture. - /// - /// - parameters: - /// - futures: An array of `EventLoopFuture` to wait for. - /// - with: A function that will be used to fold the values of two `EventLoopFuture`s and return a new value wrapped in an `EventLoopFuture`. - /// - returns: A new `EventLoopFuture` with the folded value whose callbacks run on `self.eventLoop`. - @inlinable - public func foldWithEventLoop( - _ futures: [EventLoopFuture], - with combiningFunction: @escaping (Value, OtherValue, EventLoop) -> EventLoopFuture - ) -> EventLoopFuture { - self._foldWithEventLoop(futures, with: combiningFunction) - } - @usableFromInline typealias FoldWithEventLoop = (Value, OtherValue, EventLoop) -> EventLoopFuture - #endif - - @inlinable - func _foldWithEventLoop( - _ futures: [EventLoopFuture], - with combiningFunction: @escaping FoldWithEventLoop - ) -> EventLoopFuture { - func fold0(eventLoop: EventLoop) -> EventLoopFuture { - let body = futures.reduce(self) { (f1: EventLoopFuture, f2: EventLoopFuture) -> EventLoopFuture in - let newFuture = f1.and(f2).flatMap { (args: (Value, OtherValue)) -> EventLoopFuture in - let (f1Value, f2Value) = args - self.eventLoop.assertInEventLoop() - return combiningFunction(f1Value, f2Value, eventLoop) - } - assert(newFuture.eventLoop === self.eventLoop) - return newFuture - } - return body - } - if self.eventLoop.inEventLoop { return fold0(eventLoop: self.eventLoop) } else { diff --git a/Sources/NIOCore/FileRegion.swift b/Sources/NIOCore/FileRegion.swift index a8675c79..d86adcdd 100644 --- a/Sources/NIOCore/FileRegion.swift +++ b/Sources/NIOCore/FileRegion.swift @@ -82,10 +82,8 @@ public struct FileRegion { } } -#if swift(>=5.6) @available(*, unavailable) extension FileRegion: Sendable {} -#endif extension FileRegion { /// Create a new `FileRegion` forming a complete file. diff --git a/Sources/NIOCore/IOData.swift b/Sources/NIOCore/IOData.swift index 6ad7268f..293ad9b0 100644 --- a/Sources/NIOCore/IOData.swift +++ b/Sources/NIOCore/IOData.swift @@ -30,10 +30,8 @@ public enum IOData { /// `IOData` objects are comparable just like the values they wrap. extension IOData: Equatable {} -#if swift(>=5.6) @available(*, unavailable) extension IOData: Sendable {} -#endif /// `IOData` provide a number of readable bytes. extension IOData { diff --git a/Sources/NIOCore/NIOAny.swift b/Sources/NIOCore/NIOAny.swift index e1ecfec3..634b8146 100644 --- a/Sources/NIOCore/NIOAny.swift +++ b/Sources/NIOCore/NIOAny.swift @@ -257,10 +257,8 @@ public struct NIOAny { } } -#if swift(>=5.6) @available(*, unavailable) extension NIOAny: Sendable {} -#endif extension NIOAny: CustomStringConvertible { public var description: String { diff --git a/Sources/NIOCore/NIOSendable.swift b/Sources/NIOCore/NIOSendable.swift index 1b277724..8d7cc66b 100644 --- a/Sources/NIOCore/NIOSendable.swift +++ b/Sources/NIOCore/NIOSendable.swift @@ -15,11 +15,10 @@ @available(*, deprecated, renamed: "Sendable") public typealias NIOSendable = Swift.Sendable -#if swift(>=5.6) -@preconcurrency public protocol NIOPreconcurrencySendable: Sendable {} -#else -public protocol NIOPreconcurrencySendable {} -#endif +@preconcurrency public protocol _NIOPreconcurrencySendable: Sendable {} + +@available(*, deprecated, message: "use @preconcurrency and Sendable directly") +public typealias NIOPreconcurrencySendable = _NIOPreconcurrencySendable /// ``UnsafeTransfer`` can be used to make non-`Sendable` values `Sendable`. /// As the name implies, the usage of this is unsafe because it disables the sendable checking of the compiler. diff --git a/Sources/NIOCore/RecvByteBufferAllocator.swift b/Sources/NIOCore/RecvByteBufferAllocator.swift index 6825a1e7..6521fe4a 100644 --- a/Sources/NIOCore/RecvByteBufferAllocator.swift +++ b/Sources/NIOCore/RecvByteBufferAllocator.swift @@ -13,7 +13,7 @@ //===----------------------------------------------------------------------===// /// Allocates `ByteBuffer`s to be used to read bytes from a `Channel` and records the number of the actual bytes that were used. -public protocol RecvByteBufferAllocator: NIOPreconcurrencySendable { +public protocol RecvByteBufferAllocator: _NIOPreconcurrencySendable { /// Allocates a new `ByteBuffer` that will be used to read bytes from a `Channel`. func buffer(allocator: ByteBufferAllocator) -> ByteBuffer diff --git a/Sources/NIOCore/SocketOptionProvider.swift b/Sources/NIOCore/SocketOptionProvider.swift index dab896c8..e138f0d0 100644 --- a/Sources/NIOCore/SocketOptionProvider.swift +++ b/Sources/NIOCore/SocketOptionProvider.swift @@ -47,7 +47,7 @@ import WinSDK /// /// - note: Like the `Channel` protocol, all methods in this protocol are /// thread-safe. -public protocol SocketOptionProvider: NIOPreconcurrencySendable { +public protocol SocketOptionProvider: _NIOPreconcurrencySendable { /// The `EventLoop` which is used by this `SocketOptionProvider` for execution. var eventLoop: EventLoop { get } diff --git a/Sources/NIOEmbedded/Embedded.swift b/Sources/NIOEmbedded/Embedded.swift index 59f60107..f4c339a6 100644 --- a/Sources/NIOEmbedded/Embedded.swift +++ b/Sources/NIOEmbedded/Embedded.swift @@ -848,7 +848,5 @@ extension EmbeddedChannel { } } -#if swift(>=5.6) @available(*, unavailable) extension EmbeddedChannel.SynchronousOptions: Sendable {} -#endif diff --git a/Sources/NIOHTTP1/HTTPDecoder.swift b/Sources/NIOHTTP1/HTTPDecoder.swift index 71e525b6..b37c99a9 100644 --- a/Sources/NIOHTTP1/HTTPDecoder.swift +++ b/Sources/NIOHTTP1/HTTPDecoder.swift @@ -744,10 +744,8 @@ public final class HTTPDecoder: ByteToMessageDecoder, HTTPDecoderDelega } } -#if swift(>=5.6) @available(*, unavailable) extension HTTPDecoder: Sendable {} -#endif /// Strategy to use when a HTTPDecoder is removed from a pipeline after a HTTP upgrade was detected. public enum RemoveAfterUpgradeStrategy: Sendable { diff --git a/Sources/NIOHTTP1/HTTPEncoder.swift b/Sources/NIOHTTP1/HTTPEncoder.swift index 810618f4..5744b66f 100644 --- a/Sources/NIOHTTP1/HTTPEncoder.swift +++ b/Sources/NIOHTTP1/HTTPEncoder.swift @@ -166,10 +166,8 @@ public final class HTTPRequestEncoder: ChannelOutboundHandler, RemovableChannelH } } -#if swift(>=5.6) @available(*, unavailable) extension HTTPRequestEncoder: Sendable {} -#endif /// A `ChannelOutboundHandler` that can serialize HTTP responses. /// @@ -203,10 +201,8 @@ public final class HTTPResponseEncoder: ChannelOutboundHandler, RemovableChannel } } -#if swift(>=5.6) @available(*, unavailable) extension HTTPResponseEncoder: Sendable {} -#endif private extension ByteBuffer { private mutating func write(status: HTTPResponseStatus) { diff --git a/Sources/NIOHTTP1/HTTPHeaderValidator.swift b/Sources/NIOHTTP1/HTTPHeaderValidator.swift index e6123eba..157475ff 100644 --- a/Sources/NIOHTTP1/HTTPHeaderValidator.swift +++ b/Sources/NIOHTTP1/HTTPHeaderValidator.swift @@ -88,10 +88,8 @@ public final class NIOHTTPResponseHeadersValidator: ChannelOutboundHandler, Remo } } -#if swift(>=5.6) @available(*, unavailable) extension NIOHTTPRequestHeadersValidator: Sendable {} @available(*, unavailable) extension NIOHTTPResponseHeadersValidator: Sendable {} -#endif diff --git a/Sources/NIOHTTP1/HTTPServerPipelineHandler.swift b/Sources/NIOHTTP1/HTTPServerPipelineHandler.swift index 509402c6..47ba1bf4 100644 --- a/Sources/NIOHTTP1/HTTPServerPipelineHandler.swift +++ b/Sources/NIOHTTP1/HTTPServerPipelineHandler.swift @@ -471,7 +471,5 @@ public final class HTTPServerPipelineHandler: ChannelDuplexHandler, RemovableCha } } -#if swift(>=5.6) @available(*, unavailable) extension HTTPServerPipelineHandler: Sendable {} -#endif diff --git a/Sources/NIOHTTP1/HTTPServerProtocolErrorHandler.swift b/Sources/NIOHTTP1/HTTPServerProtocolErrorHandler.swift index 1ef25994..eb985eec 100644 --- a/Sources/NIOHTTP1/HTTPServerProtocolErrorHandler.swift +++ b/Sources/NIOHTTP1/HTTPServerProtocolErrorHandler.swift @@ -72,7 +72,5 @@ public final class HTTPServerProtocolErrorHandler: ChannelDuplexHandler, Removab } } -#if swift(>=5.6) @available(*, unavailable) extension HTTPServerProtocolErrorHandler: Sendable {} -#endif diff --git a/Sources/NIOHTTP1/NIOHTTPObjectAggregator.swift b/Sources/NIOHTTP1/NIOHTTPObjectAggregator.swift index 96c84a0c..d9992961 100644 --- a/Sources/NIOHTTP1/NIOHTTPObjectAggregator.swift +++ b/Sources/NIOHTTP1/NIOHTTPObjectAggregator.swift @@ -301,10 +301,8 @@ public final class NIOHTTPServerRequestAggregator: ChannelInboundHandler, Remova } } -#if swift(>=5.6) @available(*, unavailable) extension NIOHTTPServerRequestAggregator: Sendable {} -#endif /// A `ChannelInboundHandler` that handles HTTP chunked `HTTPClientResponsePart` /// messages by aggregating individual message chunks into a single @@ -403,7 +401,5 @@ public final class NIOHTTPClientResponseAggregator: ChannelInboundHandler, Remov } } -#if swift(>=5.6) @available(*, unavailable) extension NIOHTTPClientResponseAggregator: Sendable {} -#endif diff --git a/Sources/NIOPosix/Bootstrap.swift b/Sources/NIOPosix/Bootstrap.swift index 52f7dcde..fb13e465 100644 --- a/Sources/NIOPosix/Bootstrap.swift +++ b/Sources/NIOPosix/Bootstrap.swift @@ -482,10 +482,8 @@ public final class ServerBootstrap { } } -#if swift(>=5.6) @available(*, unavailable) extension ServerBootstrap: Sendable {} -#endif private extension Channel { func registerAndDoSynchronously(_ body: @escaping (Channel) -> EventLoopFuture) -> EventLoopFuture { @@ -905,10 +903,8 @@ public final class ClientBootstrap: NIOClientTCPBootstrapProtocol { } } -#if swift(>=5.6) @available(*, unavailable) extension ClientBootstrap: Sendable {} -#endif /// A `DatagramBootstrap` is an easy way to bootstrap a `DatagramChannel` when creating datagram clients /// and servers. @@ -1179,10 +1175,8 @@ public final class DatagramBootstrap { } } -#if swift(>=5.6) @available(*, unavailable) extension DatagramBootstrap: Sendable {} -#endif /// A `NIOPipeBootstrap` is an easy way to bootstrap a `PipeChannel` which uses two (uni-directional) UNIX pipes @@ -1395,7 +1389,5 @@ public final class NIOPipeBootstrap { } } -#if swift(>=5.6) @available(*, unavailable) extension NIOPipeBootstrap: Sendable {} -#endif diff --git a/Sources/NIOPosix/RawSocketBootstrap.swift b/Sources/NIOPosix/RawSocketBootstrap.swift index 2ab19640..544b738e 100644 --- a/Sources/NIOPosix/RawSocketBootstrap.swift +++ b/Sources/NIOPosix/RawSocketBootstrap.swift @@ -191,7 +191,5 @@ public final class NIORawSocketBootstrap { } } -#if swift(>=5.6) @available(*, unavailable) extension NIORawSocketBootstrap: Sendable {} -#endif diff --git a/Sources/NIOTLS/ApplicationProtocolNegotiationHandler.swift b/Sources/NIOTLS/ApplicationProtocolNegotiationHandler.swift index ebdba09a..7270b847 100644 --- a/Sources/NIOTLS/ApplicationProtocolNegotiationHandler.swift +++ b/Sources/NIOTLS/ApplicationProtocolNegotiationHandler.swift @@ -141,7 +141,5 @@ public final class ApplicationProtocolNegotiationHandler: ChannelInboundHandler, } } -#if swift(>=5.6) @available(*, unavailable) extension ApplicationProtocolNegotiationHandler: Sendable {} -#endif diff --git a/Sources/NIOTLS/SNIHandler.swift b/Sources/NIOTLS/SNIHandler.swift index 97a781b3..a522fb54 100644 --- a/Sources/NIOTLS/SNIHandler.swift +++ b/Sources/NIOTLS/SNIHandler.swift @@ -427,7 +427,5 @@ public final class SNIHandler: ByteToMessageDecoder { } } -#if swift(>=5.6) @available(*, unavailable) extension SNIHandler: Sendable {} -#endif diff --git a/Sources/NIOTestUtils/EventCounterHandler.swift b/Sources/NIOTestUtils/EventCounterHandler.swift index ecb05ceb..cef809cc 100644 --- a/Sources/NIOTestUtils/EventCounterHandler.swift +++ b/Sources/NIOTestUtils/EventCounterHandler.swift @@ -14,11 +14,7 @@ import NIOCore import NIOConcurrencyHelpers -#if compiler(>=5.6) -@preconcurrency import Atomics -#else import Atomics -#endif /// `EventCounterHandler` is a `ChannelHandler` that counts and forwards all the events that it sees coming through /// the `ChannelPipeline`. @@ -28,7 +24,7 @@ import Atomics /// /// - note: Contrary to most `ChannelHandler`s, all of `EventCounterHandler`'s API is thread-safe meaning that you can /// query the events received from any thread. -public final class EventCounterHandler { +public final class EventCounterHandler: Sendable { private let _channelRegisteredCalls = ManagedAtomic(0) private let _channelUnregisteredCalls = ManagedAtomic(0) private let _channelActiveCalls = ManagedAtomic(0) @@ -369,11 +365,3 @@ extension EventCounterHandler: ChannelDuplexHandler { context.triggerUserOutboundEvent(event, promise: promise) } } - -#if compiler(>=5.6) && canImport(_Concurrency) -// This is a workaround before ManagedAtomic gets Sendable conformance. Once the support -// is ready, we should remove '@preconcurrency import' and declare Sendable directly. -extension EventCounterHandler: Sendable { - -} -#endif diff --git a/Sources/NIOWebSocket/NIOWebSocketClientUpgrader.swift b/Sources/NIOWebSocket/NIOWebSocketClientUpgrader.swift index 4abd353b..ad0c75f2 100644 --- a/Sources/NIOWebSocket/NIOWebSocketClientUpgrader.swift +++ b/Sources/NIOWebSocket/NIOWebSocketClientUpgrader.swift @@ -99,10 +99,8 @@ public final class NIOWebSocketClientUpgrader: NIOHTTPClientProtocolUpgrader { } } -#if swift(>=5.6) @available(*, unavailable) extension NIOWebSocketClientUpgrader: Sendable {} -#endif extension NIOWebSocketClientUpgrader { /// Generates a random WebSocket Request Key by generating 16 bytes randomly and encoding them as a base64 string as defined in RFC6455 https://tools.ietf.org/html/rfc6455#section-4.1 diff --git a/Sources/NIOWebSocket/NIOWebSocketFrameAggregator.swift b/Sources/NIOWebSocket/NIOWebSocketFrameAggregator.swift index 5af8861e..c02093cb 100644 --- a/Sources/NIOWebSocket/NIOWebSocketFrameAggregator.swift +++ b/Sources/NIOWebSocket/NIOWebSocketFrameAggregator.swift @@ -137,7 +137,5 @@ public final class NIOWebSocketFrameAggregator: ChannelInboundHandler { } } -#if swift(>=5.6) @available(*, unavailable) extension NIOWebSocketFrameAggregator: Sendable {} -#endif diff --git a/Sources/NIOWebSocket/WebSocketFrame.swift b/Sources/NIOWebSocket/WebSocketFrame.swift index 9568c7c9..f9f625c5 100644 --- a/Sources/NIOWebSocket/WebSocketFrame.swift +++ b/Sources/NIOWebSocket/WebSocketFrame.swift @@ -344,10 +344,8 @@ extension WebSocketFrame { } } -#if swift(>=5.6) @available(*, unavailable) extension WebSocketFrame._Storage: Sendable {} -#endif extension WebSocketFrame._Storage: Equatable { static func ==(lhs: WebSocketFrame._Storage, rhs: WebSocketFrame._Storage) -> Bool { diff --git a/Sources/NIOWebSocket/WebSocketFrameDecoder.swift b/Sources/NIOWebSocket/WebSocketFrameDecoder.swift index 7237d8e4..2f364021 100644 --- a/Sources/NIOWebSocket/WebSocketFrameDecoder.swift +++ b/Sources/NIOWebSocket/WebSocketFrameDecoder.swift @@ -270,7 +270,5 @@ public final class WebSocketFrameDecoder: ByteToMessageDecoder { } } -#if swift(>=5.6) @available(*, unavailable) extension WebSocketFrameDecoder: Sendable {} -#endif diff --git a/Sources/NIOWebSocket/WebSocketFrameEncoder.swift b/Sources/NIOWebSocket/WebSocketFrameEncoder.swift index 1736db1f..9b558314 100644 --- a/Sources/NIOWebSocket/WebSocketFrameEncoder.swift +++ b/Sources/NIOWebSocket/WebSocketFrameEncoder.swift @@ -115,10 +115,8 @@ public final class WebSocketFrameEncoder: ChannelOutboundHandler { } } -#if swift(>=5.6) @available(*, unavailable) extension WebSocketFrameEncoder: Sendable {} -#endif extension ByteBuffer { fileprivate mutating func prependFrameHeaderIfPossible(_ frameHeader: FrameHeader) -> Bool { diff --git a/Sources/NIOWebSocket/WebSocketProtocolErrorHandler.swift b/Sources/NIOWebSocket/WebSocketProtocolErrorHandler.swift index 7162b1f1..0ae103f0 100644 --- a/Sources/NIOWebSocket/WebSocketProtocolErrorHandler.swift +++ b/Sources/NIOWebSocket/WebSocketProtocolErrorHandler.swift @@ -43,7 +43,5 @@ public final class WebSocketProtocolErrorHandler: ChannelInboundHandler { } } -#if swift(>=5.6) @available(*, unavailable) extension WebSocketProtocolErrorHandler: Sendable {} -#endif diff --git a/Tests/LinuxMain.swift b/Tests/LinuxMain.swift deleted file mode 100644 index 57b3511d..00000000 --- a/Tests/LinuxMain.swift +++ /dev/null @@ -1,152 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2017-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 NIOConcurrencyHelpersTests - @testable import NIOCoreTests - @testable import NIODataStructuresTests - @testable import NIOEmbeddedTests - @testable import NIOFoundationCompatTests - @testable import NIOHTTP1Tests - @testable import NIOPosixTests - @testable import NIOTLSTests - @testable import NIOTestUtilsTests - @testable import NIOTests - @testable import NIOWebSocketTests - -@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(AcceptBackoffHandlerTest.allTests), - testCase(AdaptiveRecvByteBufferAllocatorTest.allTests), - testCase(AddressedEnvelopeTests.allTests), - testCase(ApplicationProtocolNegotiationHandlerTests.allTests), - testCase(AsyncSequenceCollectTests.allTests), - testCase(AsyncTestingChannelTests.allTests), - testCase(Base64Test.allTests), - testCase(BaseObjectTest.allTests), - testCase(BlockingIOThreadPoolTest.allTests), - testCase(BootstrapTest.allTests), - testCase(ByteBufferDataProtocolTests.allTests), - testCase(ByteBufferLengthPrefixTests.allTests), - testCase(ByteBufferTest.allTests), - testCase(ByteBufferUUIDTests.allTests), - testCase(ByteBufferUtilsTest.allTests), - testCase(ByteBufferViewDataProtocolTests.allTests), - testCase(ByteToMessageDecoderTest.allTests), - testCase(ByteToMessageDecoderVerifierTest.allTests), - testCase(ChannelNotificationTest.allTests), - testCase(ChannelOptionStorageTest.allTests), - testCase(ChannelPipelineTest.allTests), - testCase(ChannelTests.allTests), - testCase(CircularBufferTests.allTests), - testCase(CodableByteBufferTest.allTests), - testCase(ControlMessageTests.allTests), - testCase(CustomChannelTests.allTests), - testCase(DatagramChannelTests.allTests), - testCase(DispatchQueueWithFutureTest.allTests), - testCase(EchoServerClientTest.allTests), - testCase(EmbeddedChannelTest.allTests), - testCase(EmbeddedEventLoopTest.allTests), - testCase(EventCounterHandlerTest.allTests), - testCase(EventLoopFutureTest.allTests), - testCase(EventLoopTest.allTests), - testCase(FileRegionTest.allTests), - testCase(GetaddrinfoResolverTest.allTests), - testCase(HTTPClientUpgradeTestCase.allTests), - testCase(HTTPDecoderLengthTest.allTests), - testCase(HTTPDecoderTest.allTests), - testCase(HTTPHeaderValidationTests.allTests), - testCase(HTTPHeadersTest.allTests), - testCase(HTTPRequestEncoderTests.allTests), - testCase(HTTPResponseEncoderTests.allTests), - testCase(HTTPResponseStatusTests.allTests), - testCase(HTTPServerClientTest.allTests), - testCase(HTTPServerPipelineHandlerTest.allTests), - testCase(HTTPServerProtocolErrorHandlerTest.allTests), - testCase(HTTPServerUpgradeTestCase.allTests), - testCase(HTTPTest.allTests), - testCase(HTTPTypesTest.allTests), - testCase(HappyEyeballsTest.allTests), - testCase(HeapTests.allTests), - testCase(IOErrorTest.allTests), - testCase(IdleStateHandlerTest.allTests), - testCase(IntegerBitPackingTests.allTests), - testCase(IntegerTypesTest.allTests), - testCase(JSONSerializationByteBufferTest.allTests), - testCase(LinuxTest.allTests), - testCase(MarkedCircularBufferTests.allTests), - testCase(MessageToByteEncoderTest.allTests), - testCase(MessageToByteHandlerTest.allTests), - testCase(MulticastTest.allTests), - testCase(NIOAnyDebugTest.allTests), - testCase(NIOAsyncTestingEventLoopTests.allTests), - testCase(NIOCloseOnErrorHandlerTest.allTests), - testCase(NIOConcurrencyHelpersTests.allTests), - testCase(NIOHTTP1TestServerTest.allTests), - testCase(NIOHTTPClientResponseAggregatorTest.allTests), - testCase(NIOHTTPServerRequestAggregatorTest.allTests), - testCase(NIOLoopBoundTests.allTests), - testCase(NIOSingleStepByteToMessageDecoderTest.allTests), - testCase(NIOTests.allTests), - testCase(NIOThreadPoolTest.allTests), - testCase(NIOWebSocketClientUpgraderTests.allTests), - testCase(NIOWebSocketFrameAggregatorTests.allTests), - testCase(NonBlockingFileIOTest.allTests), - testCase(PendingDatagramWritesManagerTests.allTests), - testCase(PipeChannelTest.allTests), - testCase(PooledRecvBufferAllocatorTests.allTests), - testCase(PriorityQueueTest.allTests), - testCase(RawSocketBootstrapTests.allTests), - testCase(SALChannelTest.allTests), - testCase(SALEventLoopTests.allTests), - testCase(SNIHandlerTest.allTests), - testCase(SelectorTest.allTests), - testCase(SocketAddressTest.allTests), - testCase(SocketChannelTest.allTests), - testCase(SocketOptionProviderTest.allTests), - testCase(StreamChannelTest.allTests), - testCase(SystemTest.allTests), - testCase(ThreadTest.allTests), - testCase(TimeAmountDurationTests.allTests), - testCase(TimeAmountTests.allTests), - testCase(TypeAssistedChannelHandlerTest.allTests), - testCase(UniversalBootstrapSupportTest.allTests), - testCase(UtilitiesTest.allTests), - testCase(WebSocketClientEndToEndTests.allTests), - testCase(WebSocketFrameDecoderTest.allTests), - testCase(WebSocketFrameEncoderTest.allTests), - testCase(WebSocketMaskingKeyTests.allTests), - testCase(WebSocketServerEndToEndTests.allTests), - ]) - } -} -#endif -#else -#error("on Swift 5.5 and newer, --enable-test-discovery is required") -#endif diff --git a/Tests/NIOConcurrencyHelpersTests/NIOConcurrencyHelpersTests+XCTest.swift b/Tests/NIOConcurrencyHelpersTests/NIOConcurrencyHelpersTests+XCTest.swift deleted file mode 100644 index 0ef53301..00000000 --- a/Tests/NIOConcurrencyHelpersTests/NIOConcurrencyHelpersTests+XCTest.swift +++ /dev/null @@ -1,67 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2017-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 -// -//===----------------------------------------------------------------------===// -// -// NIOConcurrencyHelpersTests+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 NIOConcurrencyHelpersTests { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (NIOConcurrencyHelpersTests) -> () throws -> Void)] { - return [ - ("testLargeContendedAtomicSum", testLargeContendedAtomicSum), - ("testCompareAndExchangeBool", testCompareAndExchangeBool), - ("testAllOperationsBool", testAllOperationsBool), - ("testCompareAndExchangeUInts", testCompareAndExchangeUInts), - ("testCompareAndExchangeInts", testCompareAndExchangeInts), - ("testAddSub", testAddSub), - ("testExchange", testExchange), - ("testLoadStore", testLoadStore), - ("testLargeContendedNIOAtomicSum", testLargeContendedNIOAtomicSum), - ("testCompareAndExchangeBoolNIOAtomic", testCompareAndExchangeBoolNIOAtomic), - ("testAllOperationsBoolNIOAtomic", testAllOperationsBoolNIOAtomic), - ("testCompareAndExchangeUIntsNIOAtomic", testCompareAndExchangeUIntsNIOAtomic), - ("testCompareAndExchangeIntsNIOAtomic", testCompareAndExchangeIntsNIOAtomic), - ("testAddSubNIOAtomic", testAddSubNIOAtomic), - ("testExchangeNIOAtomic", testExchangeNIOAtomic), - ("testLoadStoreNIOAtomic", testLoadStoreNIOAtomic), - ("testLockMutualExclusion", testLockMutualExclusion), - ("testWithLockMutualExclusion", testWithLockMutualExclusion), - ("testConditionLockMutualExclusion", testConditionLockMutualExclusion), - ("testConditionLock", testConditionLock), - ("testConditionLockWithDifferentConditions", testConditionLockWithDifferentConditions), - ("testAtomicBoxDoesNotTriviallyLeak", testAtomicBoxDoesNotTriviallyLeak), - ("testAtomicBoxCompareAndExchangeWorksIfEqual", testAtomicBoxCompareAndExchangeWorksIfEqual), - ("testAtomicBoxCompareAndExchangeWorksIfNotEqual", testAtomicBoxCompareAndExchangeWorksIfNotEqual), - ("testAtomicBoxStoreWorks", testAtomicBoxStoreWorks), - ("testAtomicBoxCompareAndExchangeOntoItselfWorks", testAtomicBoxCompareAndExchangeOntoItselfWorks), - ("testAtomicLoadMassLoadAndStore", testAtomicLoadMassLoadAndStore), - ("testAtomicBoxCompareAndExchangeOntoItself", testAtomicBoxCompareAndExchangeOntoItself), - ("testLoadAndExchangeHammering", testLoadAndExchangeHammering), - ("testLoadAndStoreHammering", testLoadAndStoreHammering), - ("testLoadAndCASHammering", testLoadAndCASHammering), - ("testMultipleLoadsRacingWhilstStoresAreGoingOn", testMultipleLoadsRacingWhilstStoresAreGoingOn), - ("testNIOLockedValueBox", testNIOLockedValueBox), - ("testNIOLockedValueBoxHandlesThingsWithTransitiveClassesProperly", testNIOLockedValueBoxHandlesThingsWithTransitiveClassesProperly), - ] - } -} - diff --git a/Tests/NIOCoreTests/AddressedEnvelopeTests+XCTest.swift b/Tests/NIOCoreTests/AddressedEnvelopeTests+XCTest.swift deleted file mode 100644 index c3374692..00000000 --- a/Tests/NIOCoreTests/AddressedEnvelopeTests+XCTest.swift +++ /dev/null @@ -1,40 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2021 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 -// -//===----------------------------------------------------------------------===// -// -// AddressedEnvelopeTests+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 AddressedEnvelopeTests { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (AddressedEnvelopeTests) -> () throws -> Void)] { - return [ - ("testHashable_whenEqual", testHashable_whenEqual), - ("testHashable_whenDifferentData", testHashable_whenDifferentData), - ("testHashable_whenDifferentAddress", testHashable_whenDifferentAddress), - ("testHashable_whenDifferentMetadata", testHashable_whenDifferentMetadata), - ("testHashable_whenDifferentData_andDifferentAddress", testHashable_whenDifferentData_andDifferentAddress), - ("testHashable_whenDifferentData_andDifferentMetadata", testHashable_whenDifferentData_andDifferentMetadata), - ("testHashable_whenDifferentAddress_andDifferentMetadata", testHashable_whenDifferentAddress_andDifferentMetadata), - ] - } -} - diff --git a/Tests/NIOCoreTests/AsyncChannel/AsyncChannelTests.swift b/Tests/NIOCoreTests/AsyncChannel/AsyncChannelTests.swift index 8a06c296..0f804b18 100644 --- a/Tests/NIOCoreTests/AsyncChannel/AsyncChannelTests.swift +++ b/Tests/NIOCoreTests/AsyncChannel/AsyncChannelTests.swift @@ -19,7 +19,6 @@ import XCTest final class AsyncChannelTests: XCTestCase { func testAsyncChannelBasicFunctionality() { - #if swift(>=5.6) guard #available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) else { return } XCTAsyncTest(timeout: 5) { let channel = NIOAsyncTestingChannel() @@ -45,11 +44,9 @@ final class AsyncChannelTests: XCTestCase { try await channel.close() } - #endif } func testAsyncChannelBasicWrites() { - #if swift(>=5.6) guard #available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) else { return } XCTAsyncTest(timeout: 5) { let channel = NIOAsyncTestingChannel() @@ -68,11 +65,9 @@ final class AsyncChannelTests: XCTestCase { try await channel.close() } - #endif } func testDroppingTheWriterClosesTheWriteSideOfTheChannel() { - #if swift(>=5.6) guard #available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) else { return } XCTAsyncTest(timeout: 5) { let channel = NIOAsyncTestingChannel() @@ -100,11 +95,9 @@ final class AsyncChannelTests: XCTestCase { withExtendedLifetime(inboundReader) {} channel.close(promise: nil) } - #endif } func testDroppingTheWriterDoesntCloseTheWriteSideOfTheChannelIfHalfClosureIsDisabled() { - #if swift(>=5.6) guard #available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) else { return } XCTAsyncTest(timeout: 5) { let channel = NIOAsyncTestingChannel() @@ -132,11 +125,9 @@ final class AsyncChannelTests: XCTestCase { withExtendedLifetime(inboundReader) {} channel.close(promise: nil) } - #endif } func testDroppingTheWriterFirstLeadsToChannelClosureWhenReaderIsAlsoDropped() { - #if swift(>=5.6) guard #available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) else { return } XCTAsyncTest(timeout: 5) { let channel = NIOAsyncTestingChannel() @@ -174,11 +165,9 @@ final class AsyncChannelTests: XCTestCase { try await channel.closeIgnoringSuppression() } - #endif } func testDroppingEverythingClosesTheChannel() { - #if swift(>=5.6) guard #available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) else { return } XCTAsyncTest(timeout: 5) { let channel = NIOAsyncTestingChannel() @@ -206,11 +195,9 @@ final class AsyncChannelTests: XCTestCase { try await channel.closeIgnoringSuppression() } - #endif } func testReadsArePropagated() { - #if swift(>=5.6) guard #available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) else { return } XCTAsyncTest(timeout: 5) { let channel = NIOAsyncTestingChannel() @@ -227,11 +214,9 @@ final class AsyncChannelTests: XCTestCase { let reads = try await Array(wrapped.inboundStream) XCTAssertEqual(reads, ["hello"]) } - #endif } func testErrorsArePropagatedButAfterReads() { - #if swift(>=5.6) guard #available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) else { return } XCTAsyncTest(timeout: 5) { let channel = NIOAsyncTestingChannel() @@ -252,11 +237,9 @@ final class AsyncChannelTests: XCTestCase { XCTAssertEqual(error as? TestError, .bang) } } - #endif } func testErrorsArePropagatedToWriters() { - #if swift(>=5.6) guard #available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) else { return } XCTAsyncTest(timeout: 5) { let channel = NIOAsyncTestingChannel() @@ -272,11 +255,9 @@ final class AsyncChannelTests: XCTestCase { XCTAssertEqual(error as? TestError, .bang) } } - #endif } func testChannelBecomingNonWritableDelaysWriters() { - #if swift(>=5.6) guard #available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) else { return } XCTAsyncTest(timeout: 5) { let channel = NIOAsyncTestingChannel() @@ -313,11 +294,9 @@ final class AsyncChannelTests: XCTestCase { try await channel.close().get() } - #endif } func testBufferDropsReadsIfTheReaderIsGone() { - #if swift(>=5.6) guard #available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) else { return } XCTAsyncTest(timeout: 5) { let channel = NIOAsyncTestingChannel() @@ -342,11 +321,9 @@ final class AsyncChannelTests: XCTestCase { try await channel.closeIgnoringSuppression() } - #endif } func testManagingBackpressure() { - #if swift(>=5.6) guard #available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) else { return } XCTAsyncTest(timeout: 5) { let channel = NIOAsyncTestingChannel() @@ -452,11 +429,9 @@ final class AsyncChannelTests: XCTestCase { } XCTAssertEqual(readCounter.readCount, 16) } - #endif } func testCanWrapAChannelSynchronously() throws { - #if swift(>=5.6) guard #available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) else { return } XCTAsyncTest(timeout: 5) { let channel = NIOAsyncTestingChannel() @@ -482,7 +457,6 @@ final class AsyncChannelTests: XCTestCase { try await channel.close() } - #endif } } diff --git a/Tests/NIOCoreTests/AsyncSequenceTests+XCTest.swift b/Tests/NIOCoreTests/AsyncSequenceTests+XCTest.swift deleted file mode 100644 index fc108794..00000000 --- a/Tests/NIOCoreTests/AsyncSequenceTests+XCTest.swift +++ /dev/null @@ -1,34 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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 -// -//===----------------------------------------------------------------------===// -// -// AsyncSequenceTests+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 AsyncSequenceCollectTests { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (AsyncSequenceCollectTests) -> () throws -> Void)] { - return [ - ("testAsyncSequenceCollect", testAsyncSequenceCollect), - ] - } -} - diff --git a/Tests/NIOCoreTests/BaseObjectsTest+XCTest.swift b/Tests/NIOCoreTests/BaseObjectsTest+XCTest.swift deleted file mode 100644 index d03965f2..00000000 --- a/Tests/NIOCoreTests/BaseObjectsTest+XCTest.swift +++ /dev/null @@ -1,40 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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 -// -//===----------------------------------------------------------------------===// -// -// BaseObjectsTest+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 BaseObjectTest { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (BaseObjectTest) -> () throws -> Void)] { - return [ - ("testNIOByteBufferConversion", testNIOByteBufferConversion), - ("testNIOIODataConversion", testNIOIODataConversion), - ("testNIOFileRegionConversion", testNIOFileRegionConversion), - ("testBadConversions", testBadConversions), - ("testByteBufferFromIOData", testByteBufferFromIOData), - ("testFileRegionFromIOData", testFileRegionFromIOData), - ("testIODataEquals", testIODataEquals), - ] - } -} - diff --git a/Tests/NIOCoreTests/ByteBufferLengthPrefixTests+XCTest.swift b/Tests/NIOCoreTests/ByteBufferLengthPrefixTests+XCTest.swift deleted file mode 100644 index e81f091b..00000000 --- a/Tests/NIOCoreTests/ByteBufferLengthPrefixTests+XCTest.swift +++ /dev/null @@ -1,54 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2021-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 -// -//===----------------------------------------------------------------------===// -// -// ByteBufferLengthPrefixTests+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 ByteBufferLengthPrefixTests { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (ByteBufferLengthPrefixTests) -> () throws -> Void)] { - return [ - ("testWriteMessageWithLengthOfZero", testWriteMessageWithLengthOfZero), - ("testWriteMessageWithLengthOfOne", testWriteMessageWithLengthOfOne), - ("testWriteMessageWithMultipleWrites", testWriteMessageWithMultipleWrites), - ("testWriteMessageWithMaxLength", testWriteMessageWithMaxLength), - ("testWriteTooLongMessage", testWriteTooLongMessage), - ("testWriteMessageWithBigEndianInteger", testWriteMessageWithBigEndianInteger), - ("testWriteMessageWithLittleEndianInteger", testWriteMessageWithLittleEndianInteger), - ("testReadMessageWithLengthOfZero", testReadMessageWithLengthOfZero), - ("testReadMessageWithLengthOfOne", testReadMessageWithLengthOfOne), - ("testReadMessageWithLengthOfTen", testReadMessageWithLengthOfTen), - ("testReadMessageWithMaxLength", testReadMessageWithMaxLength), - ("testReadOneByteTooMuch", testReadOneByteTooMuch), - ("testReadOneByteTooFew", testReadOneByteTooFew), - ("testReadMessageWithBigEndianInteger", testReadMessageWithBigEndianInteger), - ("testReadMessageWithLittleEndianInteger", testReadMessageWithLittleEndianInteger), - ("testReadMessageWithMaliciousLength", testReadMessageWithMaliciousLength), - ("testReadMessageWithNegativeLength", testReadMessageWithNegativeLength), - ("testReadSliceWithBigEndianInteger", testReadSliceWithBigEndianInteger), - ("testReadSliceWithLittleEndianInteger", testReadSliceWithLittleEndianInteger), - ("testGetSliceWithBigEndianInteger", testGetSliceWithBigEndianInteger), - ("testGetSliceWithLittleEndianInteger", testGetSliceWithLittleEndianInteger), - ] - } -} - diff --git a/Tests/NIOCoreTests/ByteBufferTest+XCTest.swift b/Tests/NIOCoreTests/ByteBufferTest+XCTest.swift deleted file mode 100644 index 8703baa6..00000000 --- a/Tests/NIOCoreTests/ByteBufferTest+XCTest.swift +++ /dev/null @@ -1,237 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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 -// -//===----------------------------------------------------------------------===// -// -// ByteBufferTest+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 ByteBufferTest { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (ByteBufferTest) -> () throws -> Void)] { - return [ - ("testAllocateAndCount", testAllocateAndCount), - ("testEqualsComparesReadBuffersOnly", testEqualsComparesReadBuffersOnly), - ("testHasherUsesReadBuffersOnly", testHasherUsesReadBuffersOnly), - ("testSimpleReadTest", testSimpleReadTest), - ("testSimpleWrites", testSimpleWrites), - ("testMakeSureUniquelyOwnedSliceDoesNotGetReallocatedOnWrite", testMakeSureUniquelyOwnedSliceDoesNotGetReallocatedOnWrite), - ("testWriteToUniquelyOwnedSliceWhichTriggersAReallocation", testWriteToUniquelyOwnedSliceWhichTriggersAReallocation), - ("testReadWrite", testReadWrite), - ("testStaticStringReadTests", testStaticStringReadTests), - ("testString", testString), - ("testNullTerminatedString", testNullTerminatedString), - ("testReadNullTerminatedStringWithoutNullTermination", testReadNullTerminatedStringWithoutNullTermination), - ("testGetNullTerminatedStringOutOfRangeTests", testGetNullTerminatedStringOutOfRangeTests), - ("testWriteSubstring", testWriteSubstring), - ("testSetSubstring", testSetSubstring), - ("testSliceEasy", testSliceEasy), - ("testWriteStringMovesWriterIndex", testWriteStringMovesWriterIndex), - ("testSetExpandsBufferOnUpperBoundsCheckFailure", testSetExpandsBufferOnUpperBoundsCheckFailure), - ("testCoWWorks", testCoWWorks), - ("testWithMutableReadPointerMovesReaderIndexAndReturnsNumBytesConsumed", testWithMutableReadPointerMovesReaderIndexAndReturnsNumBytesConsumed), - ("testWithMutableWritePointerMovesWriterIndexAndReturnsNumBytesWritten", testWithMutableWritePointerMovesWriterIndexAndReturnsNumBytesWritten), - ("testWithMutableWritePointerWithMinimumSpecifiedAdjustsCapacity", testWithMutableWritePointerWithMinimumSpecifiedAdjustsCapacity), - ("testWithMutableWritePointerWithMinimumSpecifiedWhileAtMaxCapacity", testWithMutableWritePointerWithMinimumSpecifiedWhileAtMaxCapacity), - ("testSetGetInt8", testSetGetInt8), - ("testSetGetInt16", testSetGetInt16), - ("testSetGetInt32", testSetGetInt32), - ("testSetGetInt64", testSetGetInt64), - ("testSetGetUInt8", testSetGetUInt8), - ("testSetGetUInt16", testSetGetUInt16), - ("testSetGetUInt32", testSetGetUInt32), - ("testSetGetUInt64", testSetGetUInt64), - ("testWriteReadInt8", testWriteReadInt8), - ("testWriteReadInt16", testWriteReadInt16), - ("testWriteReadInt32", testWriteReadInt32), - ("testWriteReadInt64", testWriteReadInt64), - ("testWriteReadUInt8", testWriteReadUInt8), - ("testWriteReadUInt16", testWriteReadUInt16), - ("testWriteReadUInt32", testWriteReadUInt32), - ("testWriteReadUInt64", testWriteReadUInt64), - ("testSlice", testSlice), - ("testSliceWithParams", testSliceWithParams), - ("testReadSlice", testReadSlice), - ("testSliceNoCopy", testSliceNoCopy), - ("testSetGetData", testSetGetData), - ("testWriteReadData", testWriteReadData), - ("testDiscardReadBytes", testDiscardReadBytes), - ("testDiscardReadBytesCoW", testDiscardReadBytesCoW), - ("testDiscardReadBytesSlice", testDiscardReadBytesSlice), - ("testWithDataSlices", testWithDataSlices), - ("testEndianness", testEndianness), - ("testExpansion", testExpansion), - ("testExpansion2", testExpansion2), - ("testNotEnoughBytesToReadForIntegers", testNotEnoughBytesToReadForIntegers), - ("testNotEnoughBytesToReadForData", testNotEnoughBytesToReadForData), - ("testSlicesThatAreOutOfBands", testSlicesThatAreOutOfBands), - ("testMutableBytesCoW", testMutableBytesCoW), - ("testWritableBytesTriggersCoW", testWritableBytesTriggersCoW), - ("testBufferWithZeroBytes", testBufferWithZeroBytes), - ("testPastEnd", testPastEnd), - ("testReadDataNotEnoughAvailable", testReadDataNotEnoughAvailable), - ("testReadSliceNotEnoughAvailable", testReadSliceNotEnoughAvailable), - ("testSetBuffer", testSetBuffer), - ("testWriteBuffer", testWriteBuffer), - ("testMisalignedIntegerRead", testMisalignedIntegerRead), - ("testSetAndWriteBytes", testSetAndWriteBytes), - ("testCopyBytesWithNegativeLength", testCopyBytesWithNegativeLength), - ("testCopyBytesNonReadable", testCopyBytesNonReadable), - ("testCopyBytes", testCopyBytes), - ("testCopyZeroBytesOutOfBoundsIsOk", testCopyZeroBytesOutOfBoundsIsOk), - ("testCopyBytesBeyondWriterIndex", testCopyBytesBeyondWriterIndex), - ("testCopyBytesOverSelf", testCopyBytesOverSelf), - ("testCopyBytesCoWs", testCopyBytesCoWs), - ("testWriteABunchOfCollections", testWriteABunchOfCollections), - ("testSetABunchOfCollections", testSetABunchOfCollections), - ("testTryStringTooLong", testTryStringTooLong), - ("testSetGetBytesAllFine", testSetGetBytesAllFine), - ("testGetBytesTooLong", testGetBytesTooLong), - ("testReadWriteBytesOkay", testReadWriteBytesOkay), - ("testReadTooLong", testReadTooLong), - ("testReadWithUnsafeReadableBytesVariantsNothingToRead", testReadWithUnsafeReadableBytesVariantsNothingToRead), - ("testReadWithUnsafeReadableBytesVariantsSomethingToRead", testReadWithUnsafeReadableBytesVariantsSomethingToRead), - ("testSomePotentialIntegerUnderOrOverflows", testSomePotentialIntegerUnderOrOverflows), - ("testWriteForContiguousCollections", testWriteForContiguousCollections), - ("testWriteForNonContiguousCollections", testWriteForNonContiguousCollections), - ("testReadStringOkay", testReadStringOkay), - ("testReadStringTooMuch", testReadStringTooMuch), - ("testSetIntegerBeyondCapacity", testSetIntegerBeyondCapacity), - ("testGetIntegerBeyondCapacity", testGetIntegerBeyondCapacity), - ("testSetStringBeyondCapacity", testSetStringBeyondCapacity), - ("testGetStringBeyondCapacity", testGetStringBeyondCapacity), - ("testAllocationOfReallyBigByteBuffer", testAllocationOfReallyBigByteBuffer), - ("testWritableBytesAccountsForSlicing", testWritableBytesAccountsForSlicing), - ("testClearDupesStorageIfTheresTwoBuffersSharingStorage", testClearDupesStorageIfTheresTwoBuffersSharingStorage), - ("testClearDoesNotDupeStorageIfTheresOnlyOneBuffer", testClearDoesNotDupeStorageIfTheresOnlyOneBuffer), - ("testClearWithBiggerMinimumCapacityDupesStorageIfTheresTwoBuffersSharingStorage", testClearWithBiggerMinimumCapacityDupesStorageIfTheresTwoBuffersSharingStorage), - ("testClearWithSmallerMinimumCapacityDupesStorageIfTheresTwoBuffersSharingStorage", testClearWithSmallerMinimumCapacityDupesStorageIfTheresTwoBuffersSharingStorage), - ("testClearWithBiggerMinimumCapacityDoesNotDupeStorageIfTheresOnlyOneBuffer", testClearWithBiggerMinimumCapacityDoesNotDupeStorageIfTheresOnlyOneBuffer), - ("testClearWithSmallerMinimumCapacityDoesNotDupeStorageIfTheresOnlyOneBuffer", testClearWithSmallerMinimumCapacityDoesNotDupeStorageIfTheresOnlyOneBuffer), - ("testClearWithBiggerCapacityDoesReallocateStorageCorrectlyIfTheresOnlyOneBuffer", testClearWithBiggerCapacityDoesReallocateStorageCorrectlyIfTheresOnlyOneBuffer), - ("testClearWithSmallerCapacityDoesReallocateStorageCorrectlyIfTheresOnlyOneBuffer", testClearWithSmallerCapacityDoesReallocateStorageCorrectlyIfTheresOnlyOneBuffer), - ("testClearDoesAllocateStorageCorrectlyIfTheresTwoBuffersSharingStorage", testClearDoesAllocateStorageCorrectlyIfTheresTwoBuffersSharingStorage), - ("testClearResetsTheSliceCapacityIfTheresOnlyOneBuffer", testClearResetsTheSliceCapacityIfTheresOnlyOneBuffer), - ("testClearResetsTheSliceCapacityIfTheresTwoSlicesSharingStorage", testClearResetsTheSliceCapacityIfTheresTwoSlicesSharingStorage), - ("testWeUseFastWriteForContiguousCollections", testWeUseFastWriteForContiguousCollections), - ("testUnderestimatingSequenceWorks", testUnderestimatingSequenceWorks), - ("testZeroSizeByteBufferResizes", testZeroSizeByteBufferResizes), - ("testSpecifyTypesAndEndiannessForIntegerMethods", testSpecifyTypesAndEndiannessForIntegerMethods), - ("testByteBufferFitsInACoupleOfEnums", testByteBufferFitsInACoupleOfEnums), - ("testLargeSliceBegin16MBIsOkayAndDoesNotCopy", testLargeSliceBegin16MBIsOkayAndDoesNotCopy), - ("testLargeSliceBeginMoreThan16MBIsOkay", testLargeSliceBeginMoreThan16MBIsOkay), - ("testSliceOfMassiveBufferWithAdvancedReaderIndexIsOk", testSliceOfMassiveBufferWithAdvancedReaderIndexIsOk), - ("testSliceOnSliceAfterHitting16MBMark", testSliceOnSliceAfterHitting16MBMark), - ("testDiscardReadBytesOnConsumedBuffer", testDiscardReadBytesOnConsumedBuffer), - ("testDumpBytesFormat", testDumpBytesFormat), - ("testReadableBytesView", testReadableBytesView), - ("testReadableBytesViewNoReadableBytes", testReadableBytesViewNoReadableBytes), - ("testBytesView", testBytesView), - ("testViewsStartIndexIsStable", testViewsStartIndexIsStable), - ("testSlicesOfByteBufferViewsAreByteBufferViews", testSlicesOfByteBufferViewsAreByteBufferViews), - ("testReadableBufferViewRangeEqualCapacity", testReadableBufferViewRangeEqualCapacity), - ("testBufferViewCoWs", testBufferViewCoWs), - ("testBufferViewMutationViaSubscriptIndex", testBufferViewMutationViaSubscriptIndex), - ("testBufferViewReplaceBeyondEndOfRange", testBufferViewReplaceBeyondEndOfRange), - ("testBufferViewReplaceWithSubrangeOfSelf", testBufferViewReplaceWithSubrangeOfSelf), - ("testBufferViewMutationViaSubscriptRange", testBufferViewMutationViaSubscriptRange), - ("testBufferViewReplaceSubrangeWithEqualLengthBytes", testBufferViewReplaceSubrangeWithEqualLengthBytes), - ("testBufferViewReplaceSubrangeWithFewerBytes", testBufferViewReplaceSubrangeWithFewerBytes), - ("testBufferViewReplaceSubrangeWithMoreBytes", testBufferViewReplaceSubrangeWithMoreBytes), - ("testBufferViewAppend", testBufferViewAppend), - ("testBufferViewAppendContentsOf", testBufferViewAppendContentsOf), - ("testBufferViewEmpty", testBufferViewEmpty), - ("testBufferViewFirstIndex", testBufferViewFirstIndex), - ("testBufferViewLastIndex", testBufferViewLastIndex), - ("testBufferViewContains", testBufferViewContains), - ("testByteBuffersCanBeInitializedFromByteBufferViews", testByteBuffersCanBeInitializedFromByteBufferViews), - ("testReserveCapacityWhenOversize", testReserveCapacityWhenOversize), - ("testReserveCapacitySameCapacity", testReserveCapacitySameCapacity), - ("testReserveCapacityLargerUniquelyReferencedCallsRealloc", testReserveCapacityLargerUniquelyReferencedCallsRealloc), - ("testReserveCapacityLargerMultipleReferenceCallsMalloc", testReserveCapacityLargerMultipleReferenceCallsMalloc), - ("testReserveCapacityWithMinimumWritableBytesWhenNotEnoughWritableBytes", testReserveCapacityWithMinimumWritableBytesWhenNotEnoughWritableBytes), - ("testReserveCapacityWithMinimumWritableBytesWhenEnoughWritableBytes", testReserveCapacityWithMinimumWritableBytesWhenEnoughWritableBytes), - ("testReserveCapacityWithMinimumWritableBytesWhenSameWritableBytes", testReserveCapacityWithMinimumWritableBytesWhenSameWritableBytes), - ("testReadWithFunctionsThatReturnNumberOfReadBytesAreDiscardable", testReadWithFunctionsThatReturnNumberOfReadBytesAreDiscardable), - ("testWriteAndSetAndGetAndReadEncoding", testWriteAndSetAndGetAndReadEncoding), - ("testPossiblyLazilyBridgedString", testPossiblyLazilyBridgedString), - ("testWithVeryUnsafeMutableBytesWorksOnEmptyByteBuffer", testWithVeryUnsafeMutableBytesWorksOnEmptyByteBuffer), - ("testWithVeryUnsafeMutableBytesYieldsPointerToWholeStorage", testWithVeryUnsafeMutableBytesYieldsPointerToWholeStorage), - ("testWithVeryUnsafeMutableBytesYieldsPointerToWholeStorageAndCanBeWritenTo", testWithVeryUnsafeMutableBytesYieldsPointerToWholeStorageAndCanBeWritenTo), - ("testWithVeryUnsafeMutableBytesDoesCoW", testWithVeryUnsafeMutableBytesDoesCoW), - ("testWithVeryUnsafeMutableBytesDoesCoWonSlices", testWithVeryUnsafeMutableBytesDoesCoWonSlices), - ("testGetDispatchDataWorks", testGetDispatchDataWorks), - ("testGetDispatchDataReadWrite", testGetDispatchDataReadWrite), - ("testVariousContiguousStorageAccessors", testVariousContiguousStorageAccessors), - ("testGetBytesThatAreNotReadable", testGetBytesThatAreNotReadable), - ("testByteBufferViewAsDataProtocol", testByteBufferViewAsDataProtocol), - ("testDataByteTransferStrategyNoCopy", testDataByteTransferStrategyNoCopy), - ("testDataByteTransferStrategyCopy", testDataByteTransferStrategyCopy), - ("testDataByteTransferStrategyAutomaticMayNotCopy", testDataByteTransferStrategyAutomaticMayNotCopy), - ("testDataByteTransferStrategyAutomaticMayCopy", testDataByteTransferStrategyAutomaticMayCopy), - ("testViewBytesIsHappyWithNegativeValues", testViewBytesIsHappyWithNegativeValues), - ("testByteBufferAllocatorSize1Capacity", testByteBufferAllocatorSize1Capacity), - ("testByteBufferModifiedWithoutAllocationLogic", testByteBufferModifiedWithoutAllocationLogic), - ("testByteBufferModifyIfUniquelyOwnedMayThrow", testByteBufferModifyIfUniquelyOwnedMayThrow), - ("testDeprecatedSetBytes", testDeprecatedSetBytes), - ("testWriteRepeatingBytes", testWriteRepeatingBytes), - ("testSetRepeatingBytes", testSetRepeatingBytes), - ("testSetRepeatingBytes_unqiueReference", testSetRepeatingBytes_unqiueReference), - ("testWriteOptionalWorksForNilCase", testWriteOptionalWorksForNilCase), - ("testWriteOptionalWorksForNonNilCase", testWriteOptionalWorksForNonNilCase), - ("testWriteImmutableOptionalWorksForNilCase", testWriteImmutableOptionalWorksForNilCase), - ("testWriteImmutableOptionalWorksForNonNilCase", testWriteImmutableOptionalWorksForNonNilCase), - ("testWritingToEmptyDoesNotCauseTrouble", testWritingToEmptyDoesNotCauseTrouble), - ("testReadEmptySliceFromEmpty", testReadEmptySliceFromEmpty), - ("testConvenienceStringInitWorks", testConvenienceStringInitWorks), - ("testConvenienceCreateUInt64", testConvenienceCreateUInt64), - ("testConvenienceCreateUInt8", testConvenienceCreateUInt8), - ("testConvenienceCreateBuffer", testConvenienceCreateBuffer), - ("testConvenienceCreateRepeatingByte", testConvenienceCreateRepeatingByte), - ("testConvenienceCreateData", testConvenienceCreateData), - ("testConvenienceCreateDispatchData", testConvenienceCreateDispatchData), - ("testConvenienceCreateStaticString", testConvenienceCreateStaticString), - ("testConvenienceCreateSubstring", testConvenienceCreateSubstring), - ("testConvenienceCreateBytes", testConvenienceCreateBytes), - ("testAllocatorGivesStableZeroSizedBuffers", testAllocatorGivesStableZeroSizedBuffers), - ("testClearOnZeroCapacityActuallyAllocates", testClearOnZeroCapacityActuallyAllocates), - ("testCreateBufferFromSequence", testCreateBufferFromSequence), - ("testWeDoNotResizeIfWeHaveExactlyTheRightCapacityAvailable", testWeDoNotResizeIfWeHaveExactlyTheRightCapacityAvailable), - ("testWithUnsafeMutableReadableBytesNoCoW", testWithUnsafeMutableReadableBytesNoCoW), - ("testWithUnsafeMutableReadableBytesCoWOfNonSlice", testWithUnsafeMutableReadableBytesCoWOfNonSlice), - ("testWithUnsafeMutableReadableBytesCoWOfSlice", testWithUnsafeMutableReadableBytesCoWOfSlice), - ("testWithUnsafeMutableReadableBytesAllThingsNonZero", testWithUnsafeMutableReadableBytesAllThingsNonZero), - ("testCreateArrayFromBuffer", testCreateArrayFromBuffer), - ("testCreateStringFromBuffer", testCreateStringFromBuffer), - ("testCreateDispatchDataFromBuffer", testCreateDispatchDataFromBuffer), - ("testCreateBufferFromArray", testCreateBufferFromArray), - ("testByteBufferViewEqualityWithRange", testByteBufferViewEqualityWithRange), - ("testInvalidBufferEqualityWithDifferentRange", testInvalidBufferEqualityWithDifferentRange), - ("testInvalidBufferEqualityWithDifferentContent", testInvalidBufferEqualityWithDifferentContent), - ("testHashableConformance", testHashableConformance), - ("testInvalidHash", testInvalidHash), - ("testValidHashFromSlice", testValidHashFromSlice), - ("testWritingMultipleIntegers", testWritingMultipleIntegers), - ("testReadAndWriteMultipleIntegers", testReadAndWriteMultipleIntegers), - ("testAllByteBufferMultiByteVersions", testAllByteBufferMultiByteVersions), - ] - } -} - diff --git a/Tests/NIOCoreTests/ChannelOptionStorageTest+XCTest.swift b/Tests/NIOCoreTests/ChannelOptionStorageTest+XCTest.swift deleted file mode 100644 index 66539e25..00000000 --- a/Tests/NIOCoreTests/ChannelOptionStorageTest+XCTest.swift +++ /dev/null @@ -1,38 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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 -// -//===----------------------------------------------------------------------===// -// -// ChannelOptionStorageTest+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 ChannelOptionStorageTest { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (ChannelOptionStorageTest) -> () throws -> Void)] { - return [ - ("testWeStartWithNoOptions", testWeStartWithNoOptions), - ("testSetTwoOptionsOfDifferentType", testSetTwoOptionsOfDifferentType), - ("testSetTwoOptionsOfSameType", testSetTwoOptionsOfSameType), - ("testSetOneOptionTwice", testSetOneOptionTwice), - ("testClearingOptions", testClearingOptions), - ] - } -} - diff --git a/Tests/NIOCoreTests/CircularBufferTests+XCTest.swift b/Tests/NIOCoreTests/CircularBufferTests+XCTest.swift deleted file mode 100644 index 0fea87a1..00000000 --- a/Tests/NIOCoreTests/CircularBufferTests+XCTest.swift +++ /dev/null @@ -1,87 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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 -// -//===----------------------------------------------------------------------===// -// -// CircularBufferTests+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 CircularBufferTests { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (CircularBufferTests) -> () throws -> Void)] { - return [ - ("testTrivial", testTrivial), - ("testAddRemoveInALoop", testAddRemoveInALoop), - ("testAddAllRemoveAll", testAddAllRemoveAll), - ("testRemoveAt", testRemoveAt), - ("testRemoveAtLastPosition", testRemoveAtLastPosition), - ("testRemoveAtTailIdx0", testRemoveAtTailIdx0), - ("testRemoveAtFirstPosition", testRemoveAtFirstPosition), - ("testHarderExpansion", testHarderExpansion), - ("testCollection", testCollection), - ("testReplaceSubrange5ElementsWith1", testReplaceSubrange5ElementsWith1), - ("testReplaceSubrangeAllElementsWithFewerElements", testReplaceSubrangeAllElementsWithFewerElements), - ("testReplaceSubrangeEmptyRange", testReplaceSubrangeEmptyRange), - ("testReplaceSubrangeWithSubrangeLargerThanTargetRange", testReplaceSubrangeWithSubrangeLargerThanTargetRange), - ("testReplaceSubrangeSameSize", testReplaceSubrangeSameSize), - ("testReplaceSubrangeReplaceBufferWithEmptyArray", testReplaceSubrangeReplaceBufferWithEmptyArray), - ("testRangeSubscriptExpanding", testRangeSubscriptExpanding), - ("testWeCanDistinguishBetweenEmptyAndFull", testWeCanDistinguishBetweenEmptyAndFull), - ("testExpandZeroBasedRingWorks", testExpandZeroBasedRingWorks), - ("testExpandNonZeroBasedRingWorks", testExpandNonZeroBasedRingWorks), - ("testEmptyingExpandedRingWorks", testEmptyingExpandedRingWorks), - ("testChangeElements", testChangeElements), - ("testSliceTheRing", testSliceTheRing), - ("testCount", testCount), - ("testFirst", testFirst), - ("testLast", testLast), - ("testRemoveLast", testRemoveLast), - ("testRemoveLastCountElements", testRemoveLastCountElements), - ("testRemoveLastElements", testRemoveLastElements), - ("testOperateOnBothSides", testOperateOnBothSides), - ("testPrependExpandBuffer", testPrependExpandBuffer), - ("testRemoveAllKeepingCapacity", testRemoveAllKeepingCapacity), - ("testRemoveAllNotKeepingCapacity", testRemoveAllNotKeepingCapacity), - ("testBufferManaged", testBufferManaged), - ("testDoesNotExpandCapacityNeedlesslyWhenInserting", testDoesNotExpandCapacityNeedlesslyWhenInserting), - ("testDoesNotExpandCapacityNeedlesslyWhenAppending", testDoesNotExpandCapacityNeedlesslyWhenAppending), - ("testExpandRemoveAllKeepingAndNotKeepingCapacityAndExpandAgain", testExpandRemoveAllKeepingAndNotKeepingCapacityAndExpandAgain), - ("testRemoveAllNilsOutTheContents", testRemoveAllNilsOutTheContents), - ("testIntIndexing", testIntIndexing), - ("testIndexDistance", testIndexDistance), - ("testIndexAdvancing", testIndexAdvancing), - ("testPopFirst", testPopFirst), - ("testSlicing", testSlicing), - ("testRemoveInMiddle", testRemoveInMiddle), - ("testLotsOfPrepending", testLotsOfPrepending), - ("testLotsOfInsertAtStart", testLotsOfInsertAtStart), - ("testLotsOfInsertAtEnd", testLotsOfInsertAtEnd), - ("testPopLast", testPopLast), - ("testModify", testModify), - ("testEquality", testEquality), - ("testHash", testHash), - ("testArrayLiteralInit", testArrayLiteralInit), - ("testFirstWorks", testFirstWorks), - ("testReserveCapacityActuallyDoesSomething", testReserveCapacityActuallyDoesSomething), - ("testCopyContents", testCopyContents), - ] - } -} - diff --git a/Tests/NIOCoreTests/CustomChannelTests+XCTest.swift b/Tests/NIOCoreTests/CustomChannelTests+XCTest.swift deleted file mode 100644 index 70c014e6..00000000 --- a/Tests/NIOCoreTests/CustomChannelTests+XCTest.swift +++ /dev/null @@ -1,34 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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 -// -//===----------------------------------------------------------------------===// -// -// CustomChannelTests+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 CustomChannelTests { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (CustomChannelTests) -> () throws -> Void)] { - return [ - ("testWritingIntToSpecialChannel", testWritingIntToSpecialChannel), - ] - } -} - diff --git a/Tests/NIOCoreTests/DispatchQueue+WithFutureTest+XCTest.swift b/Tests/NIOCoreTests/DispatchQueue+WithFutureTest+XCTest.swift deleted file mode 100644 index 45e30efb..00000000 --- a/Tests/NIOCoreTests/DispatchQueue+WithFutureTest+XCTest.swift +++ /dev/null @@ -1,35 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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 -// -//===----------------------------------------------------------------------===// -// -// DispatchQueue+WithFutureTest+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 DispatchQueueWithFutureTest { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (DispatchQueueWithFutureTest) -> () throws -> Void)] { - return [ - ("testDispatchQueueAsyncWithFuture", testDispatchQueueAsyncWithFuture), - ("testDispatchQueueAsyncWithFutureThrows", testDispatchQueueAsyncWithFutureThrows), - ] - } -} - diff --git a/Tests/NIOCoreTests/IOErrorTest+XCTest.swift b/Tests/NIOCoreTests/IOErrorTest+XCTest.swift deleted file mode 100644 index e0423e13..00000000 --- a/Tests/NIOCoreTests/IOErrorTest+XCTest.swift +++ /dev/null @@ -1,35 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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 -// -//===----------------------------------------------------------------------===// -// -// IOErrorTest+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 IOErrorTest { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (IOErrorTest) -> () throws -> Void)] { - return [ - ("testMemoryLayoutBelowThreshold", testMemoryLayoutBelowThreshold), - ("testDeprecatedAPIStillFunctional", testDeprecatedAPIStillFunctional), - ] - } -} - diff --git a/Tests/NIOCoreTests/IntegerTypesTest+XCTest.swift b/Tests/NIOCoreTests/IntegerTypesTest+XCTest.swift deleted file mode 100644 index 46e57686..00000000 --- a/Tests/NIOCoreTests/IntegerTypesTest+XCTest.swift +++ /dev/null @@ -1,41 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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 -// -//===----------------------------------------------------------------------===// -// -// IntegerTypesTest+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 IntegerTypesTest { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (IntegerTypesTest) -> () throws -> Void)] { - return [ - ("testNextPowerOfOfTwoZero", testNextPowerOfOfTwoZero), - ("testNextPowerOfTwoOfOne", testNextPowerOfTwoOfOne), - ("testNextPowerOfTwoOfTwo", testNextPowerOfTwoOfTwo), - ("testNextPowerOfTwoOfThree", testNextPowerOfTwoOfThree), - ("testNextPowerOfTwoOfFour", testNextPowerOfTwoOfFour), - ("testNextPowerOfTwoOfFive", testNextPowerOfTwoOfFive), - ("testDescriptionUInt24", testDescriptionUInt24), - ("testDescriptionUInt56", testDescriptionUInt56), - ] - } -} - diff --git a/Tests/NIOCoreTests/LinuxTest+XCTest.swift b/Tests/NIOCoreTests/LinuxTest+XCTest.swift deleted file mode 100644 index cfc9be1f..00000000 --- a/Tests/NIOCoreTests/LinuxTest+XCTest.swift +++ /dev/null @@ -1,35 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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 -// -//===----------------------------------------------------------------------===// -// -// LinuxTest+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 LinuxTest { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (LinuxTest) -> () throws -> Void)] { - return [ - ("testCoreCountQuota", testCoreCountQuota), - ("testCoreCountCpuset", testCoreCountCpuset), - ] - } -} - diff --git a/Tests/NIOCoreTests/MarkedCircularBufferTests+XCTest.swift b/Tests/NIOCoreTests/MarkedCircularBufferTests+XCTest.swift deleted file mode 100644 index e037c21c..00000000 --- a/Tests/NIOCoreTests/MarkedCircularBufferTests+XCTest.swift +++ /dev/null @@ -1,44 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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 -// -//===----------------------------------------------------------------------===// -// -// MarkedCircularBufferTests+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 MarkedCircularBufferTests { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (MarkedCircularBufferTests) -> () throws -> Void)] { - return [ - ("testEmptyMark", testEmptyMark), - ("testSimpleMark", testSimpleMark), - ("testPassingTheMark", testPassingTheMark), - ("testMovingTheMark", testMovingTheMark), - ("testIndices", testIndices), - ("testFirst", testFirst), - ("testCount", testCount), - ("testSubscript", testSubscript), - ("testRangeSubscript", testRangeSubscript), - ("testIsEmpty", testIsEmpty), - ("testPopFirst", testPopFirst), - ] - } -} - diff --git a/Tests/NIOCoreTests/NIOAnyDebugTest+XCTest.swift b/Tests/NIOCoreTests/NIOAnyDebugTest+XCTest.swift deleted file mode 100644 index 81027446..00000000 --- a/Tests/NIOCoreTests/NIOAnyDebugTest+XCTest.swift +++ /dev/null @@ -1,34 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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 -// -//===----------------------------------------------------------------------===// -// -// NIOAnyDebugTest+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 NIOAnyDebugTest { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (NIOAnyDebugTest) -> () throws -> Void)] { - return [ - ("testCustomStringConvertible", testCustomStringConvertible), - ] - } -} - diff --git a/Tests/NIOCoreTests/NIOCloseOnErrorHandlerTest+XCTest.swift b/Tests/NIOCoreTests/NIOCloseOnErrorHandlerTest+XCTest.swift deleted file mode 100644 index 0670d9da..00000000 --- a/Tests/NIOCoreTests/NIOCloseOnErrorHandlerTest+XCTest.swift +++ /dev/null @@ -1,34 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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 -// -//===----------------------------------------------------------------------===// -// -// NIOCloseOnErrorHandlerTest+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 NIOCloseOnErrorHandlerTest { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (NIOCloseOnErrorHandlerTest) -> () throws -> Void)] { - return [ - ("testChannelCloseOnError", testChannelCloseOnError), - ] - } -} - diff --git a/Tests/NIOCoreTests/RecvByteBufAllocatorTest+XCTest.swift b/Tests/NIOCoreTests/RecvByteBufAllocatorTest+XCTest.swift deleted file mode 100644 index 1d1f1e1d..00000000 --- a/Tests/NIOCoreTests/RecvByteBufAllocatorTest+XCTest.swift +++ /dev/null @@ -1,38 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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 -// -//===----------------------------------------------------------------------===// -// -// RecvByteBufAllocatorTest+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 AdaptiveRecvByteBufferAllocatorTest { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (AdaptiveRecvByteBufferAllocatorTest) -> () throws -> Void)] { - return [ - ("testAdaptive", testAdaptive), - ("testFixed", testFixed), - ("testMaxAllocSizeIsIntMax", testMaxAllocSizeIsIntMax), - ("testAdaptiveRoundsValues", testAdaptiveRoundsValues), - ("testSettingMinimumAboveMaxAllowed", testSettingMinimumAboveMaxAllowed), - ] - } -} - diff --git a/Tests/NIOCoreTests/SingleStepByteToMessageDecoderTest+XCTest.swift b/Tests/NIOCoreTests/SingleStepByteToMessageDecoderTest+XCTest.swift deleted file mode 100644 index 9bddad8b..00000000 --- a/Tests/NIOCoreTests/SingleStepByteToMessageDecoderTest+XCTest.swift +++ /dev/null @@ -1,43 +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 -// -//===----------------------------------------------------------------------===// -// -// SingleStepByteToMessageDecoderTest+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 NIOSingleStepByteToMessageDecoderTest { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (NIOSingleStepByteToMessageDecoderTest) -> () throws -> Void)] { - return [ - ("testDecoder", testDecoder), - ("testMemoryIsReclaimedIfMostIsConsumed", testMemoryIsReclaimedIfMostIsConsumed), - ("testMemoryIsReclaimedIfLotsIsAvailable", testMemoryIsReclaimedIfLotsIsAvailable), - ("testLeftOversMakeDecodeLastCalled", testLeftOversMakeDecodeLastCalled), - ("testStructsWorkAsOSBTMDecoders", testStructsWorkAsOSBTMDecoders), - ("testDecodeLastIsInvokedOnceEvenIfNothingEverArrivedOnChannelClosed", testDecodeLastIsInvokedOnceEvenIfNothingEverArrivedOnChannelClosed), - ("testPayloadTooLarge", testPayloadTooLarge), - ("testPayloadTooLargeButHandlerOk", testPayloadTooLargeButHandlerOk), - ("testReentrancy", testReentrancy), - ("testWeDoNotCallShouldReclaimMemoryAsLongAsFramesAreProduced", testWeDoNotCallShouldReclaimMemoryAsLongAsFramesAreProduced), - ] - } -} - diff --git a/Tests/NIOCoreTests/TimeAmount+DurationTests+XCTest.swift b/Tests/NIOCoreTests/TimeAmount+DurationTests+XCTest.swift deleted file mode 100644 index 783ada72..00000000 --- a/Tests/NIOCoreTests/TimeAmount+DurationTests+XCTest.swift +++ /dev/null @@ -1,36 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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 -// -//===----------------------------------------------------------------------===// -// -// TimeAmount+DurationTests+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 TimeAmountDurationTests { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (TimeAmountDurationTests) -> () throws -> Void)] { - return [ - ("testTimeAmountFromDurationConversion", testTimeAmountFromDurationConversion), - ("testTimeAmountToDurationLosslessRountTrip", testTimeAmountToDurationLosslessRountTrip), - ("testDurationToTimeAmountLossyRoundTrip", testDurationToTimeAmountLossyRoundTrip), - ] - } -} - diff --git a/Tests/NIOCoreTests/TimeAmountTests+XCTest.swift b/Tests/NIOCoreTests/TimeAmountTests+XCTest.swift deleted file mode 100644 index 4b0e43ce..00000000 --- a/Tests/NIOCoreTests/TimeAmountTests+XCTest.swift +++ /dev/null @@ -1,37 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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 -// -//===----------------------------------------------------------------------===// -// -// TimeAmountTests+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 TimeAmountTests { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (TimeAmountTests) -> () throws -> Void)] { - return [ - ("testTimeAmountConversion", testTimeAmountConversion), - ("testTimeAmountIsHashable", testTimeAmountIsHashable), - ("testTimeAmountDoesAddTime", testTimeAmountDoesAddTime), - ("testTimeAmountDoesSubtractTime", testTimeAmountDoesSubtractTime), - ] - } -} - diff --git a/Tests/NIOCoreTests/TypeAssistedChannelHandlerTests+XCTest.swift b/Tests/NIOCoreTests/TypeAssistedChannelHandlerTests+XCTest.swift deleted file mode 100644 index 64be2b36..00000000 --- a/Tests/NIOCoreTests/TypeAssistedChannelHandlerTests+XCTest.swift +++ /dev/null @@ -1,34 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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 -// -//===----------------------------------------------------------------------===// -// -// TypeAssistedChannelHandlerTests+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 TypeAssistedChannelHandlerTest { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (TypeAssistedChannelHandlerTest) -> () throws -> Void)] { - return [ - ("testCanDefineBothInboundAndOutbound", testCanDefineBothInboundAndOutbound), - ] - } -} - diff --git a/Tests/NIOCoreTests/UtilitiesTest+XCTest.swift b/Tests/NIOCoreTests/UtilitiesTest+XCTest.swift deleted file mode 100644 index d11f0455..00000000 --- a/Tests/NIOCoreTests/UtilitiesTest+XCTest.swift +++ /dev/null @@ -1,36 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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 -// -//===----------------------------------------------------------------------===// -// -// UtilitiesTest+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 UtilitiesTest { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (UtilitiesTest) -> () throws -> Void)] { - return [ - ("testCoreCountWorks", testCoreCountWorks), - ("testEnumeratingInterfaces", testEnumeratingInterfaces), - ("testEnumeratingDevices", testEnumeratingDevices), - ] - } -} - diff --git a/Tests/NIODataStructuresTests/HeapTests+XCTest.swift b/Tests/NIODataStructuresTests/HeapTests+XCTest.swift deleted file mode 100644 index 374c19a7..00000000 --- a/Tests/NIODataStructuresTests/HeapTests+XCTest.swift +++ /dev/null @@ -1,38 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2017-2021 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 -// -//===----------------------------------------------------------------------===// -// -// HeapTests+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 HeapTests { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (HeapTests) -> () throws -> Void)] { - return [ - ("testSimple", testSimple), - ("testSortedDesc", testSortedDesc), - ("testSortedAsc", testSortedAsc), - ("testAddAndRemoveRandomNumbers", testAddAndRemoveRandomNumbers), - ("testRemoveElement", testRemoveElement), - ] - } -} - diff --git a/Tests/NIODataStructuresTests/PriorityQueueTests+XCTest.swift b/Tests/NIODataStructuresTests/PriorityQueueTests+XCTest.swift deleted file mode 100644 index da5b4b37..00000000 --- a/Tests/NIODataStructuresTests/PriorityQueueTests+XCTest.swift +++ /dev/null @@ -1,39 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2017-2021 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 -// -//===----------------------------------------------------------------------===// -// -// PriorityQueueTests+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 PriorityQueueTest { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (PriorityQueueTest) -> () throws -> Void)] { - return [ - ("testSomeStringsAsc", testSomeStringsAsc), - ("testRemoveNonExisting", testRemoveNonExisting), - ("testRemoveFromEmpty", testRemoveFromEmpty), - ("testBuildAndRemoveFromRandomPriorityQueues", testBuildAndRemoveFromRandomPriorityQueues), - ("testPartialOrder", testPartialOrder), - ("testDescription", testDescription), - ] - } -} - diff --git a/Tests/NIOEmbeddedTests/AsyncTestingChannelTests+XCTest.swift b/Tests/NIOEmbeddedTests/AsyncTestingChannelTests+XCTest.swift deleted file mode 100644 index c8d45304..00000000 --- a/Tests/NIOEmbeddedTests/AsyncTestingChannelTests+XCTest.swift +++ /dev/null @@ -1,63 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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 -// -//===----------------------------------------------------------------------===// -// -// AsyncTestingChannelTests+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 AsyncTestingChannelTests { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (AsyncTestingChannelTests) -> () throws -> Void)] { - return [ - ("testSingleHandlerInit", testSingleHandlerInit), - ("testEmptyInit", testEmptyInit), - ("testMultipleHandlerInit", testMultipleHandlerInit), - ("testWaitForInboundWrite", testWaitForInboundWrite), - ("testWaitForMultipleInboundWritesInParallel", testWaitForMultipleInboundWritesInParallel), - ("testWaitForOutboundWrite", testWaitForOutboundWrite), - ("testWaitForMultipleOutboundWritesInParallel", testWaitForMultipleOutboundWritesInParallel), - ("testWriteOutboundByteBuffer", testWriteOutboundByteBuffer), - ("testWriteOutboundByteBufferMultipleTimes", testWriteOutboundByteBufferMultipleTimes), - ("testWriteInboundByteBuffer", testWriteInboundByteBuffer), - ("testWriteInboundByteBufferMultipleTimes", testWriteInboundByteBufferMultipleTimes), - ("testWriteInboundByteBufferReThrow", testWriteInboundByteBufferReThrow), - ("testWriteOutboundByteBufferReThrow", testWriteOutboundByteBufferReThrow), - ("testReadOutboundWrongTypeThrows", testReadOutboundWrongTypeThrows), - ("testReadInboundWrongTypeThrows", testReadInboundWrongTypeThrows), - ("testWrongTypesWithFastpathTypes", testWrongTypesWithFastpathTypes), - ("testCloseMultipleTimesThrows", testCloseMultipleTimesThrows), - ("testCloseOnInactiveIsOk", testCloseOnInactiveIsOk), - ("testEmbeddedLifecycle", testEmbeddedLifecycle), - ("testEmbeddedChannelAndPipelineAndChannelCoreShareTheEventLoop", testEmbeddedChannelAndPipelineAndChannelCoreShareTheEventLoop), - ("testSendingAnythingOnEmbeddedChannel", testSendingAnythingOnEmbeddedChannel), - ("testActiveWhenConnectPromiseFiresAndInactiveWhenClosePromiseFires", testActiveWhenConnectPromiseFiresAndInactiveWhenClosePromiseFires), - ("testWriteWithoutFlushDoesNotWrite", testWriteWithoutFlushDoesNotWrite), - ("testSetLocalAddressAfterSuccessfulBind", testSetLocalAddressAfterSuccessfulBind), - ("testSetRemoteAddressAfterSuccessfulConnect", testSetRemoteAddressAfterSuccessfulConnect), - ("testUnprocessedOutboundUserEventFailsOnEmbeddedChannel", testUnprocessedOutboundUserEventFailsOnEmbeddedChannel), - ("testEmbeddedChannelWritabilityIsWritable", testEmbeddedChannelWritabilityIsWritable), - ("testFinishWithRecursivelyScheduledTasks", testFinishWithRecursivelyScheduledTasks), - ("testSyncOptionsAreSupported", testSyncOptionsAreSupported), - ("testSecondFinishThrows", testSecondFinishThrows), - ] - } -} - diff --git a/Tests/NIOEmbeddedTests/AsyncTestingEventLoopTests+XCTest.swift b/Tests/NIOEmbeddedTests/AsyncTestingEventLoopTests+XCTest.swift deleted file mode 100644 index 2d61c790..00000000 --- a/Tests/NIOEmbeddedTests/AsyncTestingEventLoopTests+XCTest.swift +++ /dev/null @@ -1,57 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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 -// -//===----------------------------------------------------------------------===// -// -// AsyncTestingEventLoopTests+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 NIOAsyncTestingEventLoopTests { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (NIOAsyncTestingEventLoopTests) -> () throws -> Void)] { - return [ - ("testExecuteDoesNotImmediatelyRunTasks", testExecuteDoesNotImmediatelyRunTasks), - ("testExecuteWillRunAllTasks", testExecuteWillRunAllTasks), - ("testExecuteWillRunTasksAddedRecursively", testExecuteWillRunTasksAddedRecursively), - ("testExecuteRunsImmediately", testExecuteRunsImmediately), - ("testTasksScheduledAfterRunDontRun", testTasksScheduledAfterRunDontRun), - ("testSubmitRunsImmediately", testSubmitRunsImmediately), - ("testSyncShutdownGracefullyRunsTasks", testSyncShutdownGracefullyRunsTasks), - ("testShutdownGracefullyRunsTasks", testShutdownGracefullyRunsTasks), - ("testCanControlTime", testCanControlTime), - ("testCanScheduleMultipleTasks", testCanScheduleMultipleTasks), - ("testExecutedTasksFromScheduledOnesAreRun", testExecutedTasksFromScheduledOnesAreRun), - ("testScheduledTasksFromScheduledTasksProperlySchedule", testScheduledTasksFromScheduledTasksProperlySchedule), - ("testScheduledTasksFromExecutedTasks", testScheduledTasksFromExecutedTasks), - ("testCancellingScheduledTasks", testCancellingScheduledTasks), - ("testScheduledTasksFuturesFire", testScheduledTasksFuturesFire), - ("testScheduledTasksFuturesError", testScheduledTasksFuturesError), - ("testTaskOrdering", testTaskOrdering), - ("testCancelledScheduledTasksDoNotHoldOnToRunClosure", testCancelledScheduledTasksDoNotHoldOnToRunClosure), - ("testDrainScheduledTasks", testDrainScheduledTasks), - ("testDrainScheduledTasksDoesNotRunNewlyScheduledTasks", testDrainScheduledTasksDoesNotRunNewlyScheduledTasks), - ("testAdvanceTimeToDeadline", testAdvanceTimeToDeadline), - ("testWeCantTimeTravelByAdvancingTimeToThePast", testWeCantTimeTravelByAdvancingTimeToThePast), - ("testExecuteInOrder", testExecuteInOrder), - ("testScheduledTasksInOrder", testScheduledTasksInOrder), - ] - } -} - diff --git a/Tests/NIOEmbeddedTests/AsyncTestingEventLoopTests.swift b/Tests/NIOEmbeddedTests/AsyncTestingEventLoopTests.swift index 0028555f..c2927db1 100644 --- a/Tests/NIOEmbeddedTests/AsyncTestingEventLoopTests.swift +++ b/Tests/NIOEmbeddedTests/AsyncTestingEventLoopTests.swift @@ -15,11 +15,7 @@ import NIOCore @testable import NIOEmbedded import XCTest import NIOConcurrencyHelpers -#if compiler(>=5.6) -@preconcurrency import Atomics -#else import Atomics -#endif private class EmbeddedTestError: Error { } diff --git a/Tests/NIOEmbeddedTests/EmbeddedChannelTest+XCTest.swift b/Tests/NIOEmbeddedTests/EmbeddedChannelTest+XCTest.swift deleted file mode 100644 index f20465f6..00000000 --- a/Tests/NIOEmbeddedTests/EmbeddedChannelTest+XCTest.swift +++ /dev/null @@ -1,60 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2017-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 -// -//===----------------------------------------------------------------------===// -// -// EmbeddedChannelTest+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 EmbeddedChannelTest { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (EmbeddedChannelTest) -> () throws -> Void)] { - return [ - ("testSingleHandlerInit", testSingleHandlerInit), - ("testSingleHandlerInitNil", testSingleHandlerInitNil), - ("testMultipleHandlerInit", testMultipleHandlerInit), - ("testWriteOutboundByteBuffer", testWriteOutboundByteBuffer), - ("testWriteOutboundByteBufferMultipleTimes", testWriteOutboundByteBufferMultipleTimes), - ("testWriteInboundByteBuffer", testWriteInboundByteBuffer), - ("testWriteInboundByteBufferMultipleTimes", testWriteInboundByteBufferMultipleTimes), - ("testWriteInboundByteBufferReThrow", testWriteInboundByteBufferReThrow), - ("testWriteOutboundByteBufferReThrow", testWriteOutboundByteBufferReThrow), - ("testReadOutboundWrongTypeThrows", testReadOutboundWrongTypeThrows), - ("testReadInboundWrongTypeThrows", testReadInboundWrongTypeThrows), - ("testWrongTypesWithFastpathTypes", testWrongTypesWithFastpathTypes), - ("testCloseMultipleTimesThrows", testCloseMultipleTimesThrows), - ("testCloseOnInactiveIsOk", testCloseOnInactiveIsOk), - ("testEmbeddedLifecycle", testEmbeddedLifecycle), - ("testEmbeddedChannelAndPipelineAndChannelCoreShareTheEventLoop", testEmbeddedChannelAndPipelineAndChannelCoreShareTheEventLoop), - ("testSendingAnythingOnEmbeddedChannel", testSendingAnythingOnEmbeddedChannel), - ("testActiveWhenConnectPromiseFiresAndInactiveWhenClosePromiseFires", testActiveWhenConnectPromiseFiresAndInactiveWhenClosePromiseFires), - ("testWriteWithoutFlushDoesNotWrite", testWriteWithoutFlushDoesNotWrite), - ("testSetLocalAddressAfterSuccessfulBind", testSetLocalAddressAfterSuccessfulBind), - ("testSetRemoteAddressAfterSuccessfulConnect", testSetRemoteAddressAfterSuccessfulConnect), - ("testUnprocessedOutboundUserEventFailsOnEmbeddedChannel", testUnprocessedOutboundUserEventFailsOnEmbeddedChannel), - ("testEmbeddedChannelWritabilityIsWritable", testEmbeddedChannelWritabilityIsWritable), - ("testFinishWithRecursivelyScheduledTasks", testFinishWithRecursivelyScheduledTasks), - ("testSyncOptionsAreSupported", testSyncOptionsAreSupported), - ("testLocalAddress0", testLocalAddress0), - ("testRemoteAddress0", testRemoteAddress0), - ] - } -} - diff --git a/Tests/NIOEmbeddedTests/EmbeddedEventLoopTest+XCTest.swift b/Tests/NIOEmbeddedTests/EmbeddedEventLoopTest+XCTest.swift deleted file mode 100644 index 9967d60d..00000000 --- a/Tests/NIOEmbeddedTests/EmbeddedEventLoopTest+XCTest.swift +++ /dev/null @@ -1,54 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2017-2021 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 -// -//===----------------------------------------------------------------------===// -// -// EmbeddedEventLoopTest+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 EmbeddedEventLoopTest { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (EmbeddedEventLoopTest) -> () throws -> Void)] { - return [ - ("testExecuteDoesNotImmediatelyRunTasks", testExecuteDoesNotImmediatelyRunTasks), - ("testExecuteWillRunAllTasks", testExecuteWillRunAllTasks), - ("testExecuteWillRunTasksAddedRecursively", testExecuteWillRunTasksAddedRecursively), - ("testTasksSubmittedAfterRunDontRun", testTasksSubmittedAfterRunDontRun), - ("testShutdownGracefullyRunsTasks", testShutdownGracefullyRunsTasks), - ("testCanControlTime", testCanControlTime), - ("testCanScheduleMultipleTasks", testCanScheduleMultipleTasks), - ("testExecutedTasksFromScheduledOnesAreRun", testExecutedTasksFromScheduledOnesAreRun), - ("testScheduledTasksFromScheduledTasksProperlySchedule", testScheduledTasksFromScheduledTasksProperlySchedule), - ("testScheduledTasksFromExecutedTasks", testScheduledTasksFromExecutedTasks), - ("testCancellingScheduledTasks", testCancellingScheduledTasks), - ("testScheduledTasksFuturesFire", testScheduledTasksFuturesFire), - ("testScheduledTasksFuturesError", testScheduledTasksFuturesError), - ("testTaskOrdering", testTaskOrdering), - ("testCancelledScheduledTasksDoNotHoldOnToRunClosure", testCancelledScheduledTasksDoNotHoldOnToRunClosure), - ("testDrainScheduledTasks", testDrainScheduledTasks), - ("testDrainScheduledTasksDoesNotRunNewlyScheduledTasks", testDrainScheduledTasksDoesNotRunNewlyScheduledTasks), - ("testAdvanceTimeToDeadline", testAdvanceTimeToDeadline), - ("testWeCantTimeTravelByAdvancingTimeToThePast", testWeCantTimeTravelByAdvancingTimeToThePast), - ("testExecuteInOrder", testExecuteInOrder), - ("testScheduledTasksInOrder", testScheduledTasksInOrder), - ] - } -} - diff --git a/Tests/NIOFoundationCompatTests/ByteBuffer+UUIDTests+XCTest.swift b/Tests/NIOFoundationCompatTests/ByteBuffer+UUIDTests+XCTest.swift deleted file mode 100644 index caed7ae9..00000000 --- a/Tests/NIOFoundationCompatTests/ByteBuffer+UUIDTests+XCTest.swift +++ /dev/null @@ -1,41 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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 -// -//===----------------------------------------------------------------------===// -// -// ByteBuffer+UUIDTests+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 ByteBufferUUIDTests { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (ByteBufferUUIDTests) -> () throws -> Void)] { - return [ - ("testSetUUIDBytes", testSetUUIDBytes), - ("testSetUUIDBytesBlatsExistingBytes", testSetUUIDBytesBlatsExistingBytes), - ("testGetUUIDEmptyBuffer", testGetUUIDEmptyBuffer), - ("testGetUUIDAfterSet", testGetUUIDAfterSet), - ("testWriteUUIDBytesIntoEmptyBuffer", testWriteUUIDBytesIntoEmptyBuffer), - ("testWriteUUIDBytesIntoNonEmptyBuffer", testWriteUUIDBytesIntoNonEmptyBuffer), - ("testReadUUID", testReadUUID), - ("testReadUUIDNotEnoughBytes", testReadUUIDNotEnoughBytes), - ] - } -} - diff --git a/Tests/NIOFoundationCompatTests/ByteBufferDataProtocolTests+XCTest.swift b/Tests/NIOFoundationCompatTests/ByteBufferDataProtocolTests+XCTest.swift deleted file mode 100644 index aa840b12..00000000 --- a/Tests/NIOFoundationCompatTests/ByteBufferDataProtocolTests+XCTest.swift +++ /dev/null @@ -1,39 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2017-2021 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 -// -//===----------------------------------------------------------------------===// -// -// ByteBufferDataProtocolTests+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 ByteBufferDataProtocolTests { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (ByteBufferDataProtocolTests) -> () throws -> Void)] { - return [ - ("testWritingData", testWritingData), - ("testWritingDispatchDataThoughDataProtocol", testWritingDispatchDataThoughDataProtocol), - ("testSettingData", testSettingData), - ("testSettingDispatchDataThoughDataProtocol", testSettingDispatchDataThoughDataProtocol), - ("testWriteContiguousBytes", testWriteContiguousBytes), - ("testSetContiguousBytes", testSetContiguousBytes), - ] - } -} - diff --git a/Tests/NIOFoundationCompatTests/ByteBufferView+MutableDataProtocolTest+XCTest.swift b/Tests/NIOFoundationCompatTests/ByteBufferView+MutableDataProtocolTest+XCTest.swift deleted file mode 100644 index 10776823..00000000 --- a/Tests/NIOFoundationCompatTests/ByteBufferView+MutableDataProtocolTest+XCTest.swift +++ /dev/null @@ -1,35 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2017-2021 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 -// -//===----------------------------------------------------------------------===// -// -// ByteBufferView+MutableDataProtocolTest+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 ByteBufferViewDataProtocolTests { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (ByteBufferViewDataProtocolTests) -> () throws -> Void)] { - return [ - ("testResetBytes", testResetBytes), - ("testCreateDataFromBuffer", testCreateDataFromBuffer), - ] - } -} - diff --git a/Tests/NIOFoundationCompatTests/Codable+ByteBufferTest+XCTest.swift b/Tests/NIOFoundationCompatTests/Codable+ByteBufferTest+XCTest.swift deleted file mode 100644 index 7eb16bdb..00000000 --- a/Tests/NIOFoundationCompatTests/Codable+ByteBufferTest+XCTest.swift +++ /dev/null @@ -1,46 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2019-2021 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 -// -//===----------------------------------------------------------------------===// -// -// Codable+ByteBufferTest+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 CodableByteBufferTest { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (CodableByteBufferTest) -> () throws -> Void)] { - return [ - ("testSimpleDecode", testSimpleDecode), - ("testSimpleEncodeIntoBuffer", testSimpleEncodeIntoBuffer), - ("testSimpleEncodeToFreshByteBuffer", testSimpleEncodeToFreshByteBuffer), - ("testGetJSONDecodableFromBufferWorks", testGetJSONDecodableFromBufferWorks), - ("testGetJSONDecodableFromBufferFailsBecauseShort", testGetJSONDecodableFromBufferFailsBecauseShort), - ("testReadJSONDecodableFromBufferWorks", testReadJSONDecodableFromBufferWorks), - ("testReadJSONDecodableFromBufferFailsBecauseShort", testReadJSONDecodableFromBufferFailsBecauseShort), - ("testReadWriteJSONDecodableWorks", testReadWriteJSONDecodableWorks), - ("testGetSetJSONDecodableWorks", testGetSetJSONDecodableWorks), - ("testFailingReadsDoNotChangeReaderIndex", testFailingReadsDoNotChangeReaderIndex), - ("testCustomEncoderIsRespected", testCustomEncoderIsRespected), - ("testCustomDecoderIsRespected", testCustomDecoderIsRespected), - ("testCustomCodersAreRespectedWhenUsingReadWriteJSONDecodable", testCustomCodersAreRespectedWhenUsingReadWriteJSONDecodable), - ] - } -} - diff --git a/Tests/NIOFoundationCompatTests/JSONSerialization+ByteBufferTest+XCTest.swift b/Tests/NIOFoundationCompatTests/JSONSerialization+ByteBufferTest+XCTest.swift deleted file mode 100644 index 0fb016aa..00000000 --- a/Tests/NIOFoundationCompatTests/JSONSerialization+ByteBufferTest+XCTest.swift +++ /dev/null @@ -1,34 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2017-2021 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 -// -//===----------------------------------------------------------------------===// -// -// JSONSerialization+ByteBufferTest+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 JSONSerializationByteBufferTest { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (JSONSerializationByteBufferTest) -> () throws -> Void)] { - return [ - ("testSerializationRoundTrip", testSerializationRoundTrip), - ] - } -} - diff --git a/Tests/NIOHTTP1Tests/ByteBufferUtilsTest+XCTest.swift b/Tests/NIOHTTP1Tests/ByteBufferUtilsTest+XCTest.swift deleted file mode 100644 index 4e6096d4..00000000 --- a/Tests/NIOHTTP1Tests/ByteBufferUtilsTest+XCTest.swift +++ /dev/null @@ -1,35 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2017-2021 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 -// -//===----------------------------------------------------------------------===// -// -// ByteBufferUtilsTest+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 ByteBufferUtilsTest { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (ByteBufferUtilsTest) -> () throws -> Void)] { - return [ - ("testComparators", testComparators), - ("testTrimming", testTrimming), - ] - } -} - diff --git a/Tests/NIOHTTP1Tests/HTTPClientUpgradeTests+XCTest.swift b/Tests/NIOHTTP1Tests/HTTPClientUpgradeTests+XCTest.swift deleted file mode 100644 index f44a7cdb..00000000 --- a/Tests/NIOHTTP1Tests/HTTPClientUpgradeTests+XCTest.swift +++ /dev/null @@ -1,46 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2019-2021 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 -// -//===----------------------------------------------------------------------===// -// -// HTTPClientUpgradeTests+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 HTTPClientUpgradeTestCase { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (HTTPClientUpgradeTestCase) -> () throws -> Void)] { - return [ - ("testSimpleUpgradeSucceeds", testSimpleUpgradeSucceeds), - ("testUpgradeWithRequiredHeadersShowsInRequest", testUpgradeWithRequiredHeadersShowsInRequest), - ("testSimpleUpgradeSucceedsWhenMultipleAvailableProtocols", testSimpleUpgradeSucceedsWhenMultipleAvailableProtocols), - ("testUpgradeCompleteFlush", testUpgradeCompleteFlush), - ("testNoUpgradeAsNoServerUpgrade", testNoUpgradeAsNoServerUpgrade), - ("testFirstResponseReturnsServerError", testFirstResponseReturnsServerError), - ("testUpgradeResponseMissingAllProtocols", testUpgradeResponseMissingAllProtocols), - ("testUpgradeOnlyHandlesKnownProtocols", testUpgradeOnlyHandlesKnownProtocols), - ("testUpgradeResponseCanBeRejectedByClientUpgrader", testUpgradeResponseCanBeRejectedByClientUpgrader), - ("testUpgradeIsCaseInsensitive", testUpgradeIsCaseInsensitive), - ("testBuffersInboundDataDuringAddingHandlers", testBuffersInboundDataDuringAddingHandlers), - ("testFiresOutboundErrorDuringAddingHandlers", testFiresOutboundErrorDuringAddingHandlers), - ("testFiresInboundErrorBeforeSendsRequestUpgrade", testFiresInboundErrorBeforeSendsRequestUpgrade), - ] - } -} - diff --git a/Tests/NIOHTTP1Tests/HTTPDecoderLengthTest+XCTest.swift b/Tests/NIOHTTP1Tests/HTTPDecoderLengthTest+XCTest.swift deleted file mode 100644 index 604bbdd0..00000000 --- a/Tests/NIOHTTP1Tests/HTTPDecoderLengthTest+XCTest.swift +++ /dev/null @@ -1,69 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2018-2021 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 -// -//===----------------------------------------------------------------------===// -// -// HTTPDecoderLengthTest+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 HTTPDecoderLengthTest { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (HTTPDecoderLengthTest) -> () throws -> Void)] { - return [ - ("testHTTP11SemanticEOFOnChannelInactive", testHTTP11SemanticEOFOnChannelInactive), - ("testHTTP10SemanticEOFOnChannelInactive", testHTTP10SemanticEOFOnChannelInactive), - ("testHTTP11SemanticEOFOnHalfClosure", testHTTP11SemanticEOFOnHalfClosure), - ("testHTTP10SemanticEOFOnHalfClosure", testHTTP10SemanticEOFOnHalfClosure), - ("testIgnoresTransferEncodingFieldOnCONNECTResponses", testIgnoresTransferEncodingFieldOnCONNECTResponses), - ("testIgnoresContentLengthFieldOnCONNECTResponses", testIgnoresContentLengthFieldOnCONNECTResponses), - ("testEarlyFinishWithoutLengthAtAllOnCONNECTResponses", testEarlyFinishWithoutLengthAtAllOnCONNECTResponses), - ("testIgnoresTransferEncodingFieldOnHEADResponses", testIgnoresTransferEncodingFieldOnHEADResponses), - ("testIgnoresContentLengthFieldOnHEADResponses", testIgnoresContentLengthFieldOnHEADResponses), - ("testEarlyFinishWithoutLengthAtAllOnHEADResponses", testEarlyFinishWithoutLengthAtAllOnHEADResponses), - ("testIgnoresTransferEncodingFieldOn1XXResponses", testIgnoresTransferEncodingFieldOn1XXResponses), - ("testIgnoresContentLengthFieldOn1XXResponses", testIgnoresContentLengthFieldOn1XXResponses), - ("testEarlyFinishWithoutLengthAtAllOn1XXResponses", testEarlyFinishWithoutLengthAtAllOn1XXResponses), - ("testIgnoresTransferEncodingFieldOn204Responses", testIgnoresTransferEncodingFieldOn204Responses), - ("testIgnoresContentLengthFieldOn204Responses", testIgnoresContentLengthFieldOn204Responses), - ("testEarlyFinishWithoutLengthAtAllOn204Responses", testEarlyFinishWithoutLengthAtAllOn204Responses), - ("testIgnoresTransferEncodingFieldOn304Responses", testIgnoresTransferEncodingFieldOn304Responses), - ("testIgnoresContentLengthFieldOn304Responses", testIgnoresContentLengthFieldOn304Responses), - ("testEarlyFinishWithoutLengthAtAllOn304Responses", testEarlyFinishWithoutLengthAtAllOn304Responses), - ("testMultipleTEWithChunkedLastWorksFine", testMultipleTEWithChunkedLastWorksFine), - ("testMultipleTEWithChunkedFirstHasNoBodyOnRequest", testMultipleTEWithChunkedFirstHasNoBodyOnRequest), - ("testMultipleTEWithChunkedInTheMiddleHasNoBodyOnRequest", testMultipleTEWithChunkedInTheMiddleHasNoBodyOnRequest), - ("testMultipleTEWithChunkedLastHasEOFBodyOnResponseWithChannelInactive", testMultipleTEWithChunkedLastHasEOFBodyOnResponseWithChannelInactive), - ("testMultipleTEWithChunkedFirstHasEOFBodyOnResponseWithChannelInactive", testMultipleTEWithChunkedFirstHasEOFBodyOnResponseWithChannelInactive), - ("testMultipleTEWithChunkedInTheMiddleHasEOFBodyOnResponseWithChannelInactive", testMultipleTEWithChunkedInTheMiddleHasEOFBodyOnResponseWithChannelInactive), - ("testMultipleTEWithChunkedLastHasEOFBodyOnResponseWithHalfClosure", testMultipleTEWithChunkedLastHasEOFBodyOnResponseWithHalfClosure), - ("testMultipleTEWithChunkedFirstHasEOFBodyOnResponseWithHalfClosure", testMultipleTEWithChunkedFirstHasEOFBodyOnResponseWithHalfClosure), - ("testMultipleTEWithChunkedInTheMiddleHasEOFBodyOnResponseWithHalfClosure", testMultipleTEWithChunkedInTheMiddleHasEOFBodyOnResponseWithHalfClosure), - ("testRequestWithTEAndContentLengthErrors", testRequestWithTEAndContentLengthErrors), - ("testResponseWithTEAndContentLengthErrors", testResponseWithTEAndContentLengthErrors), - ("testRequestWithMultipleDifferentContentLengthsFails", testRequestWithMultipleDifferentContentLengthsFails), - ("testRequestWithMultipleDifferentContentLengthsOnDifferentLinesFails", testRequestWithMultipleDifferentContentLengthsOnDifferentLinesFails), - ("testRequestWithInvalidContentLengthFails", testRequestWithInvalidContentLengthFails), - ("testRequestWithIdenticalContentLengthRepeatedErrors", testRequestWithIdenticalContentLengthRepeatedErrors), - ("testRequestWithMultipleIdenticalContentLengthFieldsErrors", testRequestWithMultipleIdenticalContentLengthFieldsErrors), - ("testRequestWithoutExplicitLengthIsZeroLength", testRequestWithoutExplicitLengthIsZeroLength), - ] - } -} - diff --git a/Tests/NIOHTTP1Tests/HTTPDecoderTest+XCTest.swift b/Tests/NIOHTTP1Tests/HTTPDecoderTest+XCTest.swift deleted file mode 100644 index 3a9f7d5e..00000000 --- a/Tests/NIOHTTP1Tests/HTTPDecoderTest+XCTest.swift +++ /dev/null @@ -1,74 +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 -// -//===----------------------------------------------------------------------===// -// -// HTTPDecoderTest+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 HTTPDecoderTest { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (HTTPDecoderTest) -> () throws -> Void)] { - return [ - ("testDoesNotDecodeRealHTTP09Request", testDoesNotDecodeRealHTTP09Request), - ("testDoesNotDecodeFakeHTTP09Request", testDoesNotDecodeFakeHTTP09Request), - ("testDoesNotDecodeHTTP2XRequest", testDoesNotDecodeHTTP2XRequest), - ("testDoesNotDecodeRealHTTP09Response", testDoesNotDecodeRealHTTP09Response), - ("testDoesNotDecodeFakeHTTP09Response", testDoesNotDecodeFakeHTTP09Response), - ("testDoesNotDecodeHTTP2XResponse", testDoesNotDecodeHTTP2XResponse), - ("testCorrectlyMaintainIndicesWhenDiscardReadBytes", testCorrectlyMaintainIndicesWhenDiscardReadBytes), - ("testDropExtraBytes", testDropExtraBytes), - ("testDontDropExtraBytesRequest", testDontDropExtraBytesRequest), - ("testDontDropExtraBytesResponse", testDontDropExtraBytesResponse), - ("testExtraCRLF", testExtraCRLF), - ("testSOURCEDoesntExplodeUs", testSOURCEDoesntExplodeUs), - ("testExtraCarriageReturnBetweenSubsequentRequests", testExtraCarriageReturnBetweenSubsequentRequests), - ("testIllegalHeaderNamesCauseError", testIllegalHeaderNamesCauseError), - ("testNonASCIIWorksAsHeaderValue", testNonASCIIWorksAsHeaderValue), - ("testDoesNotDeliverLeftoversUnnecessarily", testDoesNotDeliverLeftoversUnnecessarily), - ("testHTTPResponseWithoutHeaders", testHTTPResponseWithoutHeaders), - ("testBasicVerifications", testBasicVerifications), - ("testNothingHappensOnEOFForLeftOversInAllLeftOversModes", testNothingHappensOnEOFForLeftOversInAllLeftOversModes), - ("testBytesCanBeForwardedWhenHandlerRemoved", testBytesCanBeForwardedWhenHandlerRemoved), - ("testBytesCanBeFiredAsErrorWhenHandlerRemoved", testBytesCanBeFiredAsErrorWhenHandlerRemoved), - ("testBytesCanBeDroppedWhenHandlerRemoved", testBytesCanBeDroppedWhenHandlerRemoved), - ("testAppropriateErrorWhenReceivingUnsolicitedResponse", testAppropriateErrorWhenReceivingUnsolicitedResponse), - ("testAppropriateErrorWhenReceivingUnsolicitedResponseDoesNotRecover", testAppropriateErrorWhenReceivingUnsolicitedResponseDoesNotRecover), - ("testOneRequestTwoResponses", testOneRequestTwoResponses), - ("testForwardContinueThenResponse", testForwardContinueThenResponse), - ("testForwardMultipleContinuesThenResponse", testForwardMultipleContinuesThenResponse), - ("testDropContinueThanForwardResponse", testDropContinueThanForwardResponse), - ("testRefusesRequestSmugglingAttempt", testRefusesRequestSmugglingAttempt), - ("testTrimsTrailingOWS", testTrimsTrailingOWS), - ("testMassiveChunkDoesNotBufferAndGivesUsHoweverMuchIsAvailable", testMassiveChunkDoesNotBufferAndGivesUsHoweverMuchIsAvailable), - ("testDecodingLongHeaderFieldNames", testDecodingLongHeaderFieldNames), - ("testDecodingLongHeaderFieldValues", testDecodingLongHeaderFieldValues), - ("testDecodingLongURLs", testDecodingLongURLs), - ("testDecodingRTSPQueries", testDecodingRTSPQueries), - ("testDecodingInvalidHeaderFieldNames", testDecodingInvalidHeaderFieldNames), - ("testDecodingInvalidTrailerFieldNames", testDecodingInvalidTrailerFieldNames), - ("testDecodingInvalidHeaderFieldValues", testDecodingInvalidHeaderFieldValues), - ("testDecodingInvalidTrailerFieldValues", testDecodingInvalidTrailerFieldValues), - ("testDecodeAfterHEADResponse", testDecodeAfterHEADResponse), - ("testDecodeAfterHEADResponseChunked", testDecodeAfterHEADResponseChunked), - ] - } -} - diff --git a/Tests/NIOHTTP1Tests/HTTPHeaderValidationTests+XCTest.swift b/Tests/NIOHTTP1Tests/HTTPHeaderValidationTests+XCTest.swift deleted file mode 100644 index 37860d8c..00000000 --- a/Tests/NIOHTTP1Tests/HTTPHeaderValidationTests+XCTest.swift +++ /dev/null @@ -1,43 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 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 -// -//===----------------------------------------------------------------------===// -// -// HTTPHeaderValidationTests+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 HTTPHeaderValidationTests { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (HTTPHeaderValidationTests) -> () throws -> Void)] { - return [ - ("testEncodingInvalidHeaderFieldNamesInRequests", testEncodingInvalidHeaderFieldNamesInRequests), - ("testEncodingInvalidTrailerFieldNamesInRequests", testEncodingInvalidTrailerFieldNamesInRequests), - ("testEncodingInvalidHeaderFieldValuesInRequests", testEncodingInvalidHeaderFieldValuesInRequests), - ("testEncodingInvalidTrailerFieldValuesInRequests", testEncodingInvalidTrailerFieldValuesInRequests), - ("testEncodingInvalidHeaderFieldNamesInResponses", testEncodingInvalidHeaderFieldNamesInResponses), - ("testEncodingInvalidTrailerFieldNamesInResponses", testEncodingInvalidTrailerFieldNamesInResponses), - ("testEncodingInvalidHeaderFieldValuesInResponses", testEncodingInvalidHeaderFieldValuesInResponses), - ("testEncodingInvalidTrailerFieldValuesInResponses", testEncodingInvalidTrailerFieldValuesInResponses), - ("testDisablingValidationClientSide", testDisablingValidationClientSide), - ("testDisablingValidationServerSide", testDisablingValidationServerSide), - ] - } -} - diff --git a/Tests/NIOHTTP1Tests/HTTPHeadersTest+XCTest.swift b/Tests/NIOHTTP1Tests/HTTPHeadersTest+XCTest.swift deleted file mode 100644 index 44634327..00000000 --- a/Tests/NIOHTTP1Tests/HTTPHeadersTest+XCTest.swift +++ /dev/null @@ -1,58 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2017-2021 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 -// -//===----------------------------------------------------------------------===// -// -// HTTPHeadersTest+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 HTTPHeadersTest { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (HTTPHeadersTest) -> () throws -> Void)] { - return [ - ("testCasePreservedButInsensitiveLookup", testCasePreservedButInsensitiveLookup), - ("testDictionaryLiteralAlternative", testDictionaryLiteralAlternative), - ("testWriteHeadersSeparately", testWriteHeadersSeparately), - ("testRevealHeadersSeparately", testRevealHeadersSeparately), - ("testSubscriptDoesntSplitHeaders", testSubscriptDoesntSplitHeaders), - ("testCanonicalisationDoesntHappenForSetCookie", testCanonicalisationDoesntHappenForSetCookie), - ("testTrimWhitespaceWorksOnEmptyString", testTrimWhitespaceWorksOnEmptyString), - ("testTrimWhitespaceWorksOnOnlyWhitespace", testTrimWhitespaceWorksOnOnlyWhitespace), - ("testTrimWorksWithCharactersInTheMiddleAndWhitespaceAround", testTrimWorksWithCharactersInTheMiddleAndWhitespaceAround), - ("testContains", testContains), - ("testFirst", testFirst), - ("testKeepAliveStateStartsWithClose", testKeepAliveStateStartsWithClose), - ("testKeepAliveStateStartsWithKeepAlive", testKeepAliveStateStartsWithKeepAlive), - ("testKeepAliveStateHasKeepAlive", testKeepAliveStateHasKeepAlive), - ("testKeepAliveStateHasClose", testKeepAliveStateHasClose), - ("testRandomAccess", testRandomAccess), - ("testCanBeSeededWithKeepAliveState", testCanBeSeededWithKeepAliveState), - ("testSeedDominatesActualValue", testSeedDominatesActualValue), - ("testSeedDominatesEvenAfterMutation", testSeedDominatesEvenAfterMutation), - ("testSeedGetsUpdatedToDefaultOnConnectionHeaderModification", testSeedGetsUpdatedToDefaultOnConnectionHeaderModification), - ("testSeedGetsUpdatedToWhateverTheHeaderSaysIfPresent", testSeedGetsUpdatedToWhateverTheHeaderSaysIfPresent), - ("testWeDefaultToCloseIfDoesNotMakeSense", testWeDefaultToCloseIfDoesNotMakeSense), - ("testAddingSequenceOfPairs", testAddingSequenceOfPairs), - ("testAddingOtherHTTPHeader", testAddingOtherHTTPHeader), - ("testCapacity", testCapacity), - ] - } -} - diff --git a/Tests/NIOHTTP1Tests/HTTPRequestEncoderTest+XCTest.swift b/Tests/NIOHTTP1Tests/HTTPRequestEncoderTest+XCTest.swift deleted file mode 100644 index 420030fa..00000000 --- a/Tests/NIOHTTP1Tests/HTTPRequestEncoderTest+XCTest.swift +++ /dev/null @@ -1,47 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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 -// -//===----------------------------------------------------------------------===// -// -// HTTPRequestEncoderTest+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 HTTPRequestEncoderTests { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (HTTPRequestEncoderTests) -> () throws -> Void)] { - return [ - ("testNoAutoHeadersForHEAD", testNoAutoHeadersForHEAD), - ("testNoAutoHeadersForGET", testNoAutoHeadersForGET), - ("testGETContentHeadersLeftAlone", testGETContentHeadersLeftAlone), - ("testContentLengthHeadersForHEAD", testContentLengthHeadersForHEAD), - ("testTransferEncodingHeadersForHEAD", testTransferEncodingHeadersForHEAD), - ("testNoContentLengthHeadersForTRACE", testNoContentLengthHeadersForTRACE), - ("testNoTransferEncodingHeadersForTRACE", testNoTransferEncodingHeadersForTRACE), - ("testNoChunkedEncodingForHTTP10", testNoChunkedEncodingForHTTP10), - ("testBody", testBody), - ("testCONNECT", testCONNECT), - ("testChunkedEncodingIsTheDefault", testChunkedEncodingIsTheDefault), - ("testChunkedEncodingCanBetEnabled", testChunkedEncodingCanBetEnabled), - ("testChunkedEncodingDealsWithZeroLengthChunks", testChunkedEncodingDealsWithZeroLengthChunks), - ("testChunkedEncodingWorksIfNoPromisesAreAttachedToTheWrites", testChunkedEncodingWorksIfNoPromisesAreAttachedToTheWrites), - ] - } -} - diff --git a/Tests/NIOHTTP1Tests/HTTPResponseEncoderTest+XCTest.swift b/Tests/NIOHTTP1Tests/HTTPResponseEncoderTest+XCTest.swift deleted file mode 100644 index 87796241..00000000 --- a/Tests/NIOHTTP1Tests/HTTPResponseEncoderTest+XCTest.swift +++ /dev/null @@ -1,43 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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 -// -//===----------------------------------------------------------------------===// -// -// HTTPResponseEncoderTest+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 HTTPResponseEncoderTests { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (HTTPResponseEncoderTests) -> () throws -> Void)] { - return [ - ("testNoAutoHeadersFor101", testNoAutoHeadersFor101), - ("testNoAutoHeadersForCustom1XX", testNoAutoHeadersForCustom1XX), - ("testNoAutoHeadersFor204", testNoAutoHeadersFor204), - ("testNoContentLengthHeadersFor101", testNoContentLengthHeadersFor101), - ("testNoContentLengthHeadersForCustom1XX", testNoContentLengthHeadersForCustom1XX), - ("testNoContentLengthHeadersFor204", testNoContentLengthHeadersFor204), - ("testNoTransferEncodingHeadersFor101", testNoTransferEncodingHeadersFor101), - ("testNoTransferEncodingHeadersForCustom1XX", testNoTransferEncodingHeadersForCustom1XX), - ("testNoTransferEncodingHeadersFor204", testNoTransferEncodingHeadersFor204), - ("testNoChunkedEncodingForHTTP10", testNoChunkedEncodingForHTTP10), - ] - } -} - diff --git a/Tests/NIOHTTP1Tests/HTTPResponseStatusTests+XCTest.swift b/Tests/NIOHTTP1Tests/HTTPResponseStatusTests+XCTest.swift deleted file mode 100644 index 98e634b8..00000000 --- a/Tests/NIOHTTP1Tests/HTTPResponseStatusTests+XCTest.swift +++ /dev/null @@ -1,35 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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 -// -//===----------------------------------------------------------------------===// -// -// HTTPResponseStatusTests+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 HTTPResponseStatusTests { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (HTTPResponseStatusTests) -> () throws -> Void)] { - return [ - ("testHTTPResponseStatusFromStatusCode", testHTTPResponseStatusFromStatusCode), - ("testHTTPResponseStatusCodeAndReason", testHTTPResponseStatusCodeAndReason), - ] - } -} - diff --git a/Tests/NIOHTTP1Tests/HTTPServerClientTest+XCTest.swift b/Tests/NIOHTTP1Tests/HTTPServerClientTest+XCTest.swift deleted file mode 100644 index e4705a6a..00000000 --- a/Tests/NIOHTTP1Tests/HTTPServerClientTest+XCTest.swift +++ /dev/null @@ -1,44 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2017-2021 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 -// -//===----------------------------------------------------------------------===// -// -// HTTPServerClientTest+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 HTTPServerClientTest { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (HTTPServerClientTest) -> () throws -> Void)] { - return [ - ("testSimpleGetByteBuffer", testSimpleGetByteBuffer), - ("testSimpleGetFileRegion", testSimpleGetFileRegion), - ("testSimpleGetChunkedEncodingByteBuffer", testSimpleGetChunkedEncodingByteBuffer), - ("testSimpleGetChunkedEncodingFileRegion", testSimpleGetChunkedEncodingFileRegion), - ("testSimpleGetTrailersByteBuffer", testSimpleGetTrailersByteBuffer), - ("testSimpleGetTrailersFileRegion", testSimpleGetTrailersFileRegion), - ("testMassiveResponseByteBuffer", testMassiveResponseByteBuffer), - ("testMassiveResponseFileRegion", testMassiveResponseFileRegion), - ("testHead", testHead), - ("test204", test204), - ("testNoResponseHeaders", testNoResponseHeaders), - ] - } -} - diff --git a/Tests/NIOHTTP1Tests/HTTPServerPipelineHandlerTest+XCTest.swift b/Tests/NIOHTTP1Tests/HTTPServerPipelineHandlerTest+XCTest.swift deleted file mode 100644 index 0806573d..00000000 --- a/Tests/NIOHTTP1Tests/HTTPServerPipelineHandlerTest+XCTest.swift +++ /dev/null @@ -1,59 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2018-2021 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 -// -//===----------------------------------------------------------------------===// -// -// HTTPServerPipelineHandlerTest+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 HTTPServerPipelineHandlerTest { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (HTTPServerPipelineHandlerTest) -> () throws -> Void)] { - return [ - ("testBasicBufferingBehaviour", testBasicBufferingBehaviour), - ("testReadCallsAreSuppressedWhenPipelining", testReadCallsAreSuppressedWhenPipelining), - ("testReadCallsAreSuppressedWhenUnbufferingIfThereIsStillBufferedData", testReadCallsAreSuppressedWhenUnbufferingIfThereIsStillBufferedData), - ("testServerCanRespondEarly", testServerCanRespondEarly), - ("testPipelineHandlerWillBufferHalfClose", testPipelineHandlerWillBufferHalfClose), - ("testPipelineHandlerWillDeliverHalfCloseEarly", testPipelineHandlerWillDeliverHalfCloseEarly), - ("testAReadIsNotIssuedWhenUnbufferingAHalfCloseAfterRequestComplete", testAReadIsNotIssuedWhenUnbufferingAHalfCloseAfterRequestComplete), - ("testHalfCloseWhileWaitingForResponseIsPassedAlongIfNothingElseBuffered", testHalfCloseWhileWaitingForResponseIsPassedAlongIfNothingElseBuffered), - ("testRecursiveChannelReadInvocationsDoNotCauseIssues", testRecursiveChannelReadInvocationsDoNotCauseIssues), - ("testQuiescingEventWhenInitiallyIdle", testQuiescingEventWhenInitiallyIdle), - ("testQuiescingEventWhenIdleAfterARequest", testQuiescingEventWhenIdleAfterARequest), - ("testQuiescingInTheMiddleOfARequestNoResponseBitsYet", testQuiescingInTheMiddleOfARequestNoResponseBitsYet), - ("testQuiescingAfterHavingReceivedRequestButBeforeResponseWasSent", testQuiescingAfterHavingReceivedRequestButBeforeResponseWasSent), - ("testQuiescingAfterHavingReceivedRequestAndResponseHeadButNoResponseEndYet", testQuiescingAfterHavingReceivedRequestAndResponseHeadButNoResponseEndYet), - ("testQuiescingAfterRequestAndResponseHeadsButBeforeAnyEndsThenRequestEndBeforeResponseEnd", testQuiescingAfterRequestAndResponseHeadsButBeforeAnyEndsThenRequestEndBeforeResponseEnd), - ("testQuiescingAfterRequestAndResponseHeadsButBeforeAnyEndsThenRequestEndAfterResponseEnd", testQuiescingAfterRequestAndResponseHeadsButBeforeAnyEndsThenRequestEndAfterResponseEnd), - ("testQuiescingAfterHavingReceivedOneRequestButBeforeResponseWasSentWithMoreRequestsInTheBuffer", testQuiescingAfterHavingReceivedOneRequestButBeforeResponseWasSentWithMoreRequestsInTheBuffer), - ("testParserErrorOnly", testParserErrorOnly), - ("testLegitRequestFollowedByParserErrorArrivingWhilstResponseOutstanding", testLegitRequestFollowedByParserErrorArrivingWhilstResponseOutstanding), - ("testRemovingWithResponseOutstandingTriggersRead", testRemovingWithResponseOutstandingTriggersRead), - ("testRemovingWithPartialResponseOutstandingTriggersRead", testRemovingWithPartialResponseOutstandingTriggersRead), - ("testRemovingWithBufferedRequestForwards", testRemovingWithBufferedRequestForwards), - ("testQuiescingInAResponseThenRemovedFiresEventAndReads", testQuiescingInAResponseThenRemovedFiresEventAndReads), - ("testQuiescingInAResponseThenRemovedFiresEventAndDoesntRead", testQuiescingInAResponseThenRemovedFiresEventAndDoesntRead), - ("testServerCanRespondContinue", testServerCanRespondContinue), - ("testServerCanRespondProcessingMultipleTimes", testServerCanRespondProcessingMultipleTimes), - ] - } -} - diff --git a/Tests/NIOHTTP1Tests/HTTPServerProtocolErrorHandlerTest+XCTest.swift b/Tests/NIOHTTP1Tests/HTTPServerProtocolErrorHandlerTest+XCTest.swift deleted file mode 100644 index 20d36d4a..00000000 --- a/Tests/NIOHTTP1Tests/HTTPServerProtocolErrorHandlerTest+XCTest.swift +++ /dev/null @@ -1,39 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2017-2021 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 -// -//===----------------------------------------------------------------------===// -// -// HTTPServerProtocolErrorHandlerTest+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 HTTPServerProtocolErrorHandlerTest { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (HTTPServerProtocolErrorHandlerTest) -> () throws -> Void)] { - return [ - ("testHandlesBasicErrors", testHandlesBasicErrors), - ("testIgnoresNonParserErrors", testIgnoresNonParserErrors), - ("testDoesNotSendAResponseIfResponseHasAlreadyStarted", testDoesNotSendAResponseIfResponseHasAlreadyStarted), - ("testCanHandleErrorsWhenResponseHasStarted", testCanHandleErrorsWhenResponseHasStarted), - ("testDoesSendAResponseIfInformationalHeaderWasSent", testDoesSendAResponseIfInformationalHeaderWasSent), - ("testDoesNotSendAResponseIfRealHeaderWasSentAfterInformationalHeader", testDoesNotSendAResponseIfRealHeaderWasSentAfterInformationalHeader), - ] - } -} - diff --git a/Tests/NIOHTTP1Tests/HTTPServerUpgradeTests+XCTest.swift b/Tests/NIOHTTP1Tests/HTTPServerUpgradeTests+XCTest.swift deleted file mode 100644 index 6d8abfb7..00000000 --- a/Tests/NIOHTTP1Tests/HTTPServerUpgradeTests+XCTest.swift +++ /dev/null @@ -1,58 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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 -// -//===----------------------------------------------------------------------===// -// -// HTTPServerUpgradeTests+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 HTTPServerUpgradeTestCase { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (HTTPServerUpgradeTestCase) -> () throws -> Void)] { - return [ - ("testUpgradeWithoutUpgrade", testUpgradeWithoutUpgrade), - ("testUpgradeAfterInitialRequest", testUpgradeAfterInitialRequest), - ("testUpgradeHandlerBarfsOnUnexpectedOrdering", testUpgradeHandlerBarfsOnUnexpectedOrdering), - ("testSimpleUpgradeSucceeds", testSimpleUpgradeSucceeds), - ("testUpgradeRequiresCorrectHeaders", testUpgradeRequiresCorrectHeaders), - ("testUpgradeRequiresHeadersInConnection", testUpgradeRequiresHeadersInConnection), - ("testUpgradeOnlyHandlesKnownProtocols", testUpgradeOnlyHandlesKnownProtocols), - ("testUpgradeRespectsClientPreference", testUpgradeRespectsClientPreference), - ("testUpgradeFiresUserEvent", testUpgradeFiresUserEvent), - ("testUpgraderCanRejectUpgradeForPersonalReasons", testUpgraderCanRejectUpgradeForPersonalReasons), - ("testUpgradeIsCaseInsensitive", testUpgradeIsCaseInsensitive), - ("testDelayedUpgradeBehaviour", testDelayedUpgradeBehaviour), - ("testBuffersInboundDataDuringDelayedUpgrade", testBuffersInboundDataDuringDelayedUpgrade), - ("testDelayedUpgradeResponse", testDelayedUpgradeResponse), - ("testChainsDelayedUpgradesAppropriately", testChainsDelayedUpgradesAppropriately), - ("testDelayedUpgradeResponseDeliversFullRequest", testDelayedUpgradeResponseDeliversFullRequest), - ("testDelayedUpgradeResponseDeliversFullRequestAndPendingBits", testDelayedUpgradeResponseDeliversFullRequestAndPendingBits), - ("testRemovesAllHTTPRelatedHandlersAfterUpgrade", testRemovesAllHTTPRelatedHandlersAfterUpgrade), - ("testUpgradeWithUpgradePayloadInlineWithRequestWorks", testUpgradeWithUpgradePayloadInlineWithRequestWorks), - ("testDeliversBytesWhenRemovedDuringPartialUpgrade", testDeliversBytesWhenRemovedDuringPartialUpgrade), - ("testDeliversBytesWhenReentrantlyCalledInChannelReadCompleteOnRemoval", testDeliversBytesWhenReentrantlyCalledInChannelReadCompleteOnRemoval), - ("testWeTolerateUpgradeFuturesFromWrongEventLoops", testWeTolerateUpgradeFuturesFromWrongEventLoops), - ("testFailingToRemoveExtraHandlersThrowsError", testFailingToRemoveExtraHandlersThrowsError), - ("testFailedUpgradeResponseWriteThrowsError", testFailedUpgradeResponseWriteThrowsError), - ("testFailedUpgraderThrowsError", testFailedUpgraderThrowsError), - ] - } -} - diff --git a/Tests/NIOHTTP1Tests/HTTPTest+XCTest.swift b/Tests/NIOHTTP1Tests/HTTPTest+XCTest.swift deleted file mode 100644 index 598a8b9b..00000000 --- a/Tests/NIOHTTP1Tests/HTTPTest+XCTest.swift +++ /dev/null @@ -1,43 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2017-2021 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 -// -//===----------------------------------------------------------------------===// -// -// HTTPTest+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 HTTPTest { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (HTTPTest) -> () throws -> Void)] { - return [ - ("testHTTPSimpleNoHeaders", testHTTPSimpleNoHeaders), - ("testHTTPSimple1Header", testHTTPSimple1Header), - ("testHTTPSimpleSomeHeader", testHTTPSimpleSomeHeader), - ("testHTTPPipelining", testHTTPPipelining), - ("testHTTPBody", testHTTPBody), - ("test1ByteHTTPBody", test1ByteHTTPBody), - ("testHTTPPipeliningWithBody", testHTTPPipeliningWithBody), - ("testChunkedBody", testChunkedBody), - ("testHTTPRequestHeadCoWWorks", testHTTPRequestHeadCoWWorks), - ("testHTTPResponseHeadCoWWorks", testHTTPResponseHeadCoWWorks), - ] - } -} - diff --git a/Tests/NIOHTTP1Tests/HTTPTypesTest+XCTest.swift b/Tests/NIOHTTP1Tests/HTTPTypesTest+XCTest.swift deleted file mode 100644 index 7a9f8165..00000000 --- a/Tests/NIOHTTP1Tests/HTTPTypesTest+XCTest.swift +++ /dev/null @@ -1,36 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2017-2021 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 -// -//===----------------------------------------------------------------------===// -// -// HTTPTypesTest+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 HTTPTypesTest { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (HTTPTypesTest) -> () throws -> Void)] { - return [ - ("testConvertToString", testConvertToString), - ("testConvertFromString", testConvertFromString), - ("testConvertFromStringToExplicitValue", testConvertFromStringToExplicitValue), - ] - } -} - diff --git a/Tests/NIOHTTP1Tests/NIOHTTPObjectAggregatorTest+XCTest.swift b/Tests/NIOHTTP1Tests/NIOHTTPObjectAggregatorTest+XCTest.swift deleted file mode 100644 index d2cd1d50..00000000 --- a/Tests/NIOHTTP1Tests/NIOHTTPObjectAggregatorTest+XCTest.swift +++ /dev/null @@ -1,53 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2020-2021 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 -// -//===----------------------------------------------------------------------===// -// -// NIOHTTPObjectAggregatorTest+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 NIOHTTPServerRequestAggregatorTest { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (NIOHTTPServerRequestAggregatorTest) -> () throws -> Void)] { - return [ - ("testAggregateNoBody", testAggregateNoBody), - ("testAggregateWithBody", testAggregateWithBody), - ("testAggregateChunkedBody", testAggregateChunkedBody), - ("testAggregateWithTrailer", testAggregateWithTrailer), - ("testOversizeRequest", testOversizeRequest), - ("testOversizedRequestWithoutKeepAlive", testOversizedRequestWithoutKeepAlive), - ("testOversizedRequestWithContentLength", testOversizedRequestWithContentLength), - ] - } -} - -extension NIOHTTPClientResponseAggregatorTest { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (NIOHTTPClientResponseAggregatorTest) -> () throws -> Void)] { - return [ - ("testOversizeResponseHead", testOversizeResponseHead), - ("testOversizeResponse", testOversizeResponse), - ("testAggregatedResponse", testAggregatedResponse), - ("testOkAfterOversized", testOkAfterOversized), - ] - } -} - diff --git a/Tests/NIOPosixTests/AcceptBackoffHandlerTest+XCTest.swift b/Tests/NIOPosixTests/AcceptBackoffHandlerTest+XCTest.swift deleted file mode 100644 index 1e74cff7..00000000 --- a/Tests/NIOPosixTests/AcceptBackoffHandlerTest+XCTest.swift +++ /dev/null @@ -1,43 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2018-2021 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 -// -//===----------------------------------------------------------------------===// -// -// AcceptBackoffHandlerTest+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 AcceptBackoffHandlerTest { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (AcceptBackoffHandlerTest) -> () throws -> Void)] { - return [ - ("testECONNABORTED", testECONNABORTED), - ("testEMFILE", testEMFILE), - ("testENFILE", testENFILE), - ("testENOBUFS", testENOBUFS), - ("testENOMEM", testENOMEM), - ("testRemovalTriggerReadWhenPreviousReadScheduled", testRemovalTriggerReadWhenPreviousReadScheduled), - ("testRemovalTriggerNoReadWhenPreviousNoReadScheduled", testRemovalTriggerNoReadWhenPreviousNoReadScheduled), - ("testNotScheduleReadIfAlreadyScheduled", testNotScheduleReadIfAlreadyScheduled), - ("testChannelInactiveCancelScheduled", testChannelInactiveCancelScheduled), - ("testSecondErrorUpdateScheduledRead", testSecondErrorUpdateScheduledRead), - ] - } -} - diff --git a/Tests/NIOPosixTests/BlockingIOThreadPoolTest+XCTest.swift b/Tests/NIOPosixTests/BlockingIOThreadPoolTest+XCTest.swift deleted file mode 100644 index 19784590..00000000 --- a/Tests/NIOPosixTests/BlockingIOThreadPoolTest+XCTest.swift +++ /dev/null @@ -1,41 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2017-2021 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 -// -//===----------------------------------------------------------------------===// -// -// BlockingIOThreadPoolTest+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 BlockingIOThreadPoolTest { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (BlockingIOThreadPoolTest) -> () throws -> Void)] { - return [ - ("testDoubleShutdownWorks", testDoubleShutdownWorks), - ("testStateCancelled", testStateCancelled), - ("testStateActive", testStateActive), - ("testLoseLastReferenceAndShutdownWhileTaskStillRunning", testLoseLastReferenceAndShutdownWhileTaskStillRunning), - ("testDeadLockIfCalledOutWithLockHeld", testDeadLockIfCalledOutWithLockHeld), - ("testPoolDoesGetReleasedWhenStoppedAndReferencedDropped", testPoolDoesGetReleasedWhenStoppedAndReferencedDropped), - ("testClosureReferenceDroppedAfterSingleWorkItemExecution", testClosureReferenceDroppedAfterSingleWorkItemExecution), - ("testClosureReferencesDroppedAfterTwoConsecutiveWorkItemsExecution", testClosureReferencesDroppedAfterTwoConsecutiveWorkItemsExecution), - ] - } -} - diff --git a/Tests/NIOPosixTests/BootstrapTest+XCTest.swift b/Tests/NIOPosixTests/BootstrapTest+XCTest.swift deleted file mode 100644 index 4c387fa3..00000000 --- a/Tests/NIOPosixTests/BootstrapTest+XCTest.swift +++ /dev/null @@ -1,57 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2017-2021 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 -// -//===----------------------------------------------------------------------===// -// -// BootstrapTest+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 BootstrapTest { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (BootstrapTest) -> () throws -> Void)] { - return [ - ("testBootstrapsCallInitializersOnCorrectEventLoop", testBootstrapsCallInitializersOnCorrectEventLoop), - ("testTCPBootstrapsTolerateFuturesFromDifferentEventLoopsReturnedInInitializers", testTCPBootstrapsTolerateFuturesFromDifferentEventLoopsReturnedInInitializers), - ("testUDPBootstrapToleratesFuturesFromDifferentEventLoopsReturnedInInitializers", testUDPBootstrapToleratesFuturesFromDifferentEventLoopsReturnedInInitializers), - ("testPreConnectedClientSocketToleratesFuturesFromDifferentEventLoopsReturnedInInitializers", testPreConnectedClientSocketToleratesFuturesFromDifferentEventLoopsReturnedInInitializers), - ("testPreConnectedServerSocketToleratesFuturesFromDifferentEventLoopsReturnedInInitializers", testPreConnectedServerSocketToleratesFuturesFromDifferentEventLoopsReturnedInInitializers), - ("testTCPClientBootstrapAllowsConformanceCorrectly", testTCPClientBootstrapAllowsConformanceCorrectly), - ("testServerBootstrapBindTimeout", testServerBootstrapBindTimeout), - ("testServerBootstrapSetsChannelOptionsBeforeChannelInitializer", testServerBootstrapSetsChannelOptionsBeforeChannelInitializer), - ("testClientBootstrapSetsChannelOptionsBeforeChannelInitializer", testClientBootstrapSetsChannelOptionsBeforeChannelInitializer), - ("testPreConnectedSocketSetsChannelOptionsBeforeChannelInitializer", testPreConnectedSocketSetsChannelOptionsBeforeChannelInitializer), - ("testDatagramBootstrapSetsChannelOptionsBeforeChannelInitializer", testDatagramBootstrapSetsChannelOptionsBeforeChannelInitializer), - ("testPipeBootstrapSetsChannelOptionsBeforeChannelInitializer", testPipeBootstrapSetsChannelOptionsBeforeChannelInitializer), - ("testPipeBootstrapInEventLoop", testPipeBootstrapInEventLoop), - ("testServerBootstrapAddsAcceptHandlerAfterServerChannelInitialiser", testServerBootstrapAddsAcceptHandlerAfterServerChannelInitialiser), - ("testClientBootstrapValidatesWorkingELGsCorrectly", testClientBootstrapValidatesWorkingELGsCorrectly), - ("testClientBootstrapRejectsNotWorkingELGsCorrectly", testClientBootstrapRejectsNotWorkingELGsCorrectly), - ("testServerBootstrapValidatesWorkingELGsCorrectly", testServerBootstrapValidatesWorkingELGsCorrectly), - ("testServerBootstrapRejectsNotWorkingELGsCorrectly", testServerBootstrapRejectsNotWorkingELGsCorrectly), - ("testDatagramBootstrapValidatesWorkingELGsCorrectly", testDatagramBootstrapValidatesWorkingELGsCorrectly), - ("testDatagramBootstrapRejectsNotWorkingELGsCorrectly", testDatagramBootstrapRejectsNotWorkingELGsCorrectly), - ("testNIOPipeBootstrapValidatesWorkingELGsCorrectly", testNIOPipeBootstrapValidatesWorkingELGsCorrectly), - ("testNIOPipeBootstrapRejectsNotWorkingELGsCorrectly", testNIOPipeBootstrapRejectsNotWorkingELGsCorrectly), - ("testConvenienceOptionsAreEquivalentUniversalClient", testConvenienceOptionsAreEquivalentUniversalClient), - ("testClientBindWorksOnSocketsBoundToEitherIPv4OrIPv6Only", testClientBindWorksOnSocketsBoundToEitherIPv4OrIPv6Only), - ] - } -} - diff --git a/Tests/NIOPosixTests/ChannelNotificationTest+XCTest.swift b/Tests/NIOPosixTests/ChannelNotificationTest+XCTest.swift deleted file mode 100644 index 1efd2c95..00000000 --- a/Tests/NIOPosixTests/ChannelNotificationTest+XCTest.swift +++ /dev/null @@ -1,35 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2017-2021 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 -// -//===----------------------------------------------------------------------===// -// -// ChannelNotificationTest+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 ChannelNotificationTest { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (ChannelNotificationTest) -> () throws -> Void)] { - return [ - ("testNotificationOrder", testNotificationOrder), - ("testActiveBeforeChannelRead", testActiveBeforeChannelRead), - ] - } -} - diff --git a/Tests/NIOPosixTests/ChannelPipelineTest+XCTest.swift b/Tests/NIOPosixTests/ChannelPipelineTest+XCTest.swift deleted file mode 100644 index 8b1f83d8..00000000 --- a/Tests/NIOPosixTests/ChannelPipelineTest+XCTest.swift +++ /dev/null @@ -1,75 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2017-2021 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 -// -//===----------------------------------------------------------------------===// -// -// ChannelPipelineTest+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 ChannelPipelineTest { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (ChannelPipelineTest) -> () throws -> Void)] { - return [ - ("testGetHandler", testGetHandler), - ("testGetFirstHandler", testGetFirstHandler), - ("testGetNotAddedHandler", testGetNotAddedHandler), - ("testAddAfterClose", testAddAfterClose), - ("testOutboundOrdering", testOutboundOrdering), - ("testConnectingDoesntCallBind", testConnectingDoesntCallBind), - ("testFiringChannelReadsInHandlerRemovedWorks", testFiringChannelReadsInHandlerRemovedWorks), - ("testEmptyPipelineWorks", testEmptyPipelineWorks), - ("testWriteAfterClose", testWriteAfterClose), - ("testOutboundNextForInboundOnlyIsCorrect", testOutboundNextForInboundOnlyIsCorrect), - ("testChannelInfrastructureIsNotLeaked", testChannelInfrastructureIsNotLeaked), - ("testAddingHandlersFirstWorks", testAddingHandlersFirstWorks), - ("testAddAfter", testAddAfter), - ("testAddBefore", testAddBefore), - ("testAddAfterLast", testAddAfterLast), - ("testAddBeforeFirst", testAddBeforeFirst), - ("testAddAfterWhileClosed", testAddAfterWhileClosed), - ("testAddBeforeWhileClosed", testAddBeforeWhileClosed), - ("testFindHandlerByType", testFindHandlerByType), - ("testFindHandlerByTypeReturnsTheFirstOfItsType", testFindHandlerByTypeReturnsTheFirstOfItsType), - ("testContextForHeadOrTail", testContextForHeadOrTail), - ("testRemoveHeadOrTail", testRemoveHeadOrTail), - ("testRemovingByContextWithPromiseStillInChannel", testRemovingByContextWithPromiseStillInChannel), - ("testRemovingByContextWithFutureNotInChannel", testRemovingByContextWithFutureNotInChannel), - ("testRemovingByNameWithPromiseStillInChannel", testRemovingByNameWithPromiseStillInChannel), - ("testRemovingByNameWithFutureNotInChannel", testRemovingByNameWithFutureNotInChannel), - ("testRemovingByReferenceWithPromiseStillInChannel", testRemovingByReferenceWithPromiseStillInChannel), - ("testRemovingByReferenceWithFutureNotInChannel", testRemovingByReferenceWithFutureNotInChannel), - ("testFireChannelReadInInactiveChannelDoesNotCrash", testFireChannelReadInInactiveChannelDoesNotCrash), - ("testTeardownDuringFormalRemovalProcess", testTeardownDuringFormalRemovalProcess), - ("testVariousChannelRemovalAPIsGoThroughRemovableChannelHandler", testVariousChannelRemovalAPIsGoThroughRemovableChannelHandler), - ("testNonRemovableChannelHandlerIsNotRemovable", testNonRemovableChannelHandlerIsNotRemovable), - ("testAddMultipleHandlers", testAddMultipleHandlers), - ("testPipelineDebugDescription", testPipelineDebugDescription), - ("testWeDontCallHandlerRemovedTwiceIfAHandlerCompletesRemovalOnlyAfterChannelTeardown", testWeDontCallHandlerRemovedTwiceIfAHandlerCompletesRemovalOnlyAfterChannelTeardown), - ("testWeFailTheSecondRemoval", testWeFailTheSecondRemoval), - ("testSynchronousViewAddHandler", testSynchronousViewAddHandler), - ("testSynchronousViewAddHandlerAfterDestroyed", testSynchronousViewAddHandlerAfterDestroyed), - ("testSynchronousViewAddHandlers", testSynchronousViewAddHandlers), - ("testSynchronousViewContext", testSynchronousViewContext), - ("testSynchronousViewGetTypedHandler", testSynchronousViewGetTypedHandler), - ("testSynchronousViewPerformOperations", testSynchronousViewPerformOperations), - ] - } -} - diff --git a/Tests/NIOPosixTests/ChannelTests+XCTest.swift b/Tests/NIOPosixTests/ChannelTests+XCTest.swift deleted file mode 100644 index 6d53802a..00000000 --- a/Tests/NIOPosixTests/ChannelTests+XCTest.swift +++ /dev/null @@ -1,90 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2017-2021 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 -// -//===----------------------------------------------------------------------===// -// -// ChannelTests+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 ChannelTests { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (ChannelTests) -> () throws -> Void)] { - return [ - ("testBasicLifecycle", testBasicLifecycle), - ("testManyManyWrites", testManyManyWrites), - ("testWritevLotsOfData", testWritevLotsOfData), - ("testParentsOfSocketChannels", testParentsOfSocketChannels), - ("testPendingWritesEmptyWritesWorkAndWeDontWriteUnflushedThings", testPendingWritesEmptyWritesWorkAndWeDontWriteUnflushedThings), - ("testPendingWritesUsesVectorWriteOperationAndDoesntWriteTooMuch", testPendingWritesUsesVectorWriteOperationAndDoesntWriteTooMuch), - ("testPendingWritesWorkWithPartialWrites", testPendingWritesWorkWithPartialWrites), - ("testPendingWritesSpinCountWorksForSingleWrites", testPendingWritesSpinCountWorksForSingleWrites), - ("testPendingWritesSpinCountWorksForVectorWrites", testPendingWritesSpinCountWorksForVectorWrites), - ("testPendingWritesCompleteWritesDontConsumeWriteSpinCount", testPendingWritesCompleteWritesDontConsumeWriteSpinCount), - ("testPendingWritesCancellationWorksCorrectly", testPendingWritesCancellationWorksCorrectly), - ("testPendingWritesNoMoreThanWritevLimitIsWritten", testPendingWritesNoMoreThanWritevLimitIsWritten), - ("testPendingWritesNoMoreThanWritevLimitIsWrittenInOneMassiveChunk", testPendingWritesNoMoreThanWritevLimitIsWrittenInOneMassiveChunk), - ("testPendingWritesFileRegion", testPendingWritesFileRegion), - ("testPendingWritesEmptyFileRegion", testPendingWritesEmptyFileRegion), - ("testPendingWritesInterleavedBuffersAndFiles", testPendingWritesInterleavedBuffersAndFiles), - ("testTwoFlushedNonEmptyWritesFollowedByUnflushedEmpty", testTwoFlushedNonEmptyWritesFollowedByUnflushedEmpty), - ("testPendingWritesWorksWithManyEmptyWrites", testPendingWritesWorksWithManyEmptyWrites), - ("testPendingWritesCloseDuringVectorWrite", testPendingWritesCloseDuringVectorWrite), - ("testPendingWritesMoreThanWritevIOVectorLimit", testPendingWritesMoreThanWritevIOVectorLimit), - ("testPendingWritesIsHappyWhenSendfileReturnsWouldBlockButWroteFully", testPendingWritesIsHappyWhenSendfileReturnsWouldBlockButWroteFully), - ("testSpecificConnectTimeout", testSpecificConnectTimeout), - ("testGeneralConnectTimeout", testGeneralConnectTimeout), - ("testCloseOutput", testCloseOutput), - ("testCloseInput", testCloseInput), - ("testHalfClosure", testHalfClosure), - ("testWeDontCrashIfChannelReleasesBeforePipeline", testWeDontCrashIfChannelReleasesBeforePipeline), - ("testAskForLocalAndRemoteAddressesAfterChannelIsClosed", testAskForLocalAndRemoteAddressesAfterChannelIsClosed), - ("testReceiveAddressAfterAccept", testReceiveAddressAfterAccept), - ("testWeDontJamSocketsInANoIOState", testWeDontJamSocketsInANoIOState), - ("testNoChannelReadBeforeEOFIfNoAutoRead", testNoChannelReadBeforeEOFIfNoAutoRead), - ("testCloseInEOFdChannelReadBehavesCorrectly", testCloseInEOFdChannelReadBehavesCorrectly), - ("testCloseInSameReadThatEOFGetsDelivered", testCloseInSameReadThatEOFGetsDelivered), - ("testEOFReceivedWithoutReadRequests", testEOFReceivedWithoutReadRequests), - ("testAcceptsAfterCloseDontCauseIssues", testAcceptsAfterCloseDontCauseIssues), - ("testChannelReadsDoesNotHappenAfterRegistration", testChannelReadsDoesNotHappenAfterRegistration), - ("testAppropriateAndInappropriateOperationsForUnregisteredSockets", testAppropriateAndInappropriateOperationsForUnregisteredSockets), - ("testCloseSocketWhenReadErrorWasReceivedAndMakeSureNoReadCompleteArrives", testCloseSocketWhenReadErrorWasReceivedAndMakeSureNoReadCompleteArrives), - ("testSocketFailingAsyncCorrectlyTearsTheChannelDownAndDoesntCrash", testSocketFailingAsyncCorrectlyTearsTheChannelDownAndDoesntCrash), - ("testSocketErroringSynchronouslyCorrectlyTearsTheChannelDown", testSocketErroringSynchronouslyCorrectlyTearsTheChannelDown), - ("testConnectWithECONNREFUSEDGetsTheRightError", testConnectWithECONNREFUSEDGetsTheRightError), - ("testCloseInUnregister", testCloseInUnregister), - ("testLazyRegistrationWorksForServerSockets", testLazyRegistrationWorksForServerSockets), - ("testLazyRegistrationWorksForClientSockets", testLazyRegistrationWorksForClientSockets), - ("testFailedRegistrationOfClientSocket", testFailedRegistrationOfClientSocket), - ("testFailedRegistrationOfAcceptedSocket", testFailedRegistrationOfAcceptedSocket), - ("testFailedRegistrationOfServerSocket", testFailedRegistrationOfServerSocket), - ("testTryingToBindOnPortThatIsAlreadyBoundFailsButDoesNotCrash", testTryingToBindOnPortThatIsAlreadyBoundFailsButDoesNotCrash), - ("testCloseInReadTriggeredByDrainingTheReceiveBufferBecauseOfWriteError", testCloseInReadTriggeredByDrainingTheReceiveBufferBecauseOfWriteError), - ("testApplyingTwoDistinctSocketOptionsOfSameTypeWorks", testApplyingTwoDistinctSocketOptionsOfSameTypeWorks), - ("testUnprocessedOutboundUserEventFailsOnServerSocketChannel", testUnprocessedOutboundUserEventFailsOnServerSocketChannel), - ("testAcceptHandlerDoesNotSwallowCloseErrorsWhenQuiescing", testAcceptHandlerDoesNotSwallowCloseErrorsWhenQuiescing), - ("testTCP_NODELAYisOnByDefault", testTCP_NODELAYisOnByDefault), - ("testDescriptionCanBeCalledFromNonEventLoopThreads", testDescriptionCanBeCalledFromNonEventLoopThreads), - ("testFixedSizeRecvByteBufferAllocatorSizeIsConstant", testFixedSizeRecvByteBufferAllocatorSizeIsConstant), - ("testCloseInConnectPromise", testCloseInConnectPromise), - ("testWritabilityChangeDuringReentrantFlushNow", testWritabilityChangeDuringReentrantFlushNow), - ] - } -} - diff --git a/Tests/NIOPosixTests/CodecTest+XCTest.swift b/Tests/NIOPosixTests/CodecTest+XCTest.swift deleted file mode 100644 index 45ed2b33..00000000 --- a/Tests/NIOPosixTests/CodecTest+XCTest.swift +++ /dev/null @@ -1,91 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2017-2021 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 -// -//===----------------------------------------------------------------------===// -// -// CodecTest+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 ByteToMessageDecoderTest { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (ByteToMessageDecoderTest) -> () throws -> Void)] { - return [ - ("testDecoder", testDecoder), - ("testDecoderPropagatesChannelInactive", testDecoderPropagatesChannelInactive), - ("testDecoderIsNotQuadratic", testDecoderIsNotQuadratic), - ("testMemoryIsReclaimedIfMostIsConsumed", testMemoryIsReclaimedIfMostIsConsumed), - ("testMemoryIsReclaimedIfLotsIsAvailable", testMemoryIsReclaimedIfLotsIsAvailable), - ("testWeDoNotCallShouldReclaimMemoryAsLongAsWeContinue", testWeDoNotCallShouldReclaimMemoryAsLongAsWeContinue), - ("testDecoderReentranceChannelRead", testDecoderReentranceChannelRead), - ("testTrivialDecoderDoesSensibleStuffWhenCloseInRead", testTrivialDecoderDoesSensibleStuffWhenCloseInRead), - ("testLeftOversMakeDecodeLastCalled", testLeftOversMakeDecodeLastCalled), - ("testRemovingHandlerMakesLeftoversAppearInDecodeLast", testRemovingHandlerMakesLeftoversAppearInDecodeLast), - ("testStructsWorkAsByteToMessageDecoders", testStructsWorkAsByteToMessageDecoders), - ("testReentrantChannelReadWhileWholeBufferIsBeingProcessed", testReentrantChannelReadWhileWholeBufferIsBeingProcessed), - ("testReentrantChannelCloseInChannelRead", testReentrantChannelCloseInChannelRead), - ("testHandlerRemoveInChannelRead", testHandlerRemoveInChannelRead), - ("testChannelCloseInChannelRead", testChannelCloseInChannelRead), - ("testDecodeLoopGetsInterruptedWhenRemovalIsTriggered", testDecodeLoopGetsInterruptedWhenRemovalIsTriggered), - ("testDecodeLastIsInvokedOnceEvenIfNothingEverArrivedOnChannelClosed", testDecodeLastIsInvokedOnceEvenIfNothingEverArrivedOnChannelClosed), - ("testDecodeLastIsInvokedOnceEvenIfNothingEverArrivedOnChannelHalfClosure", testDecodeLastIsInvokedOnceEvenIfNothingEverArrivedOnChannelHalfClosure), - ("testDecodeLastHasSeenEOFFalseOnHandlerRemoved", testDecodeLastHasSeenEOFFalseOnHandlerRemoved), - ("testDecodeLastHasSeenEOFFalseOnHandlerRemovedEvenIfNoData", testDecodeLastHasSeenEOFFalseOnHandlerRemovedEvenIfNoData), - ("testDecodeLastHasSeenEOFTrueOnChannelInactive", testDecodeLastHasSeenEOFTrueOnChannelInactive), - ("testWriteObservingByteToMessageDecoderBasic", testWriteObservingByteToMessageDecoderBasic), - ("testWriteObservingByteToMessageDecoderWhereWriteIsReentrantlyCalled", testWriteObservingByteToMessageDecoderWhereWriteIsReentrantlyCalled), - ("testDecodeMethodsNoLongerCalledIfErrorInDecode", testDecodeMethodsNoLongerCalledIfErrorInDecode), - ("testDecodeMethodsNoLongerCalledIfErrorInDecodeLast", testDecodeMethodsNoLongerCalledIfErrorInDecodeLast), - ("testBasicLifecycle", testBasicLifecycle), - ("testDecodeLoopStopsOnChannelInactive", testDecodeLoopStopsOnChannelInactive), - ("testDecodeLoopStopsOnInboundHalfClosure", testDecodeLoopStopsOnInboundHalfClosure), - ("testWeForwardReadEOFAndChannelInactive", testWeForwardReadEOFAndChannelInactive), - ("testErrorInDecodeLastWhenCloseIsReceivedReentrantlyInDecode", testErrorInDecodeLastWhenCloseIsReceivedReentrantlyInDecode), - ("testWeAreOkayWithReceivingDataAfterHalfClosureEOF", testWeAreOkayWithReceivingDataAfterHalfClosureEOF), - ("testWeAreOkayWithReceivingDataAfterFullClose", testWeAreOkayWithReceivingDataAfterFullClose), - ("testPayloadTooLarge", testPayloadTooLarge), - ("testPayloadTooLargeButHandlerOk", testPayloadTooLargeButHandlerOk), - ("testRemoveHandlerBecauseOfChannelTearDownWhilstUserTriggeredRemovalIsInProgress", testRemoveHandlerBecauseOfChannelTearDownWhilstUserTriggeredRemovalIsInProgress), - ] - } -} - -extension MessageToByteEncoderTest { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (MessageToByteEncoderTest) -> () throws -> Void)] { - return [ - ("testEncoderOverrideAllocateOutBuffer", testEncoderOverrideAllocateOutBuffer), - ("testEncoder", testEncoder), - ("testB2MHIsHappyNeverBeingAddedToAPipeline", testB2MHIsHappyNeverBeingAddedToAPipeline), - ("testM2BHIsHappyNeverBeingAddedToAPipeline", testM2BHIsHappyNeverBeingAddedToAPipeline), - ] - } -} - -extension MessageToByteHandlerTest { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (MessageToByteHandlerTest) -> () throws -> Void)] { - return [ - ("testThrowingEncoderFailsPromises", testThrowingEncoderFailsPromises), - ] - } -} - diff --git a/Tests/NIOPosixTests/ControlMessageTests+XCTest.swift b/Tests/NIOPosixTests/ControlMessageTests+XCTest.swift deleted file mode 100644 index bda5478f..00000000 --- a/Tests/NIOPosixTests/ControlMessageTests+XCTest.swift +++ /dev/null @@ -1,37 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2017-2021 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 -// -//===----------------------------------------------------------------------===// -// -// ControlMessageTests+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 ControlMessageTests { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (ControlMessageTests) -> () throws -> Void)] { - return [ - ("testEmptyEncode", testEmptyEncode), - ("testEncodeDecode1", testEncodeDecode1), - ("testEncodeDecode2", testEncodeDecode2), - ("testStorageIndexing", testStorageIndexing), - ] - } -} - diff --git a/Tests/NIOPosixTests/DatagramChannelTests+XCTest.swift b/Tests/NIOPosixTests/DatagramChannelTests+XCTest.swift deleted file mode 100644 index 21a00c2a..00000000 --- a/Tests/NIOPosixTests/DatagramChannelTests+XCTest.swift +++ /dev/null @@ -1,95 +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 -// -//===----------------------------------------------------------------------===// -// -// DatagramChannelTests+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 DatagramChannelTests { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (DatagramChannelTests) -> () throws -> Void)] { - return [ - ("testBasicChannelCommunication", testBasicChannelCommunication), - ("testEmptyDatagram", testEmptyDatagram), - ("testManyWrites", testManyWrites), - ("testDatagramChannelHasWatermark", testDatagramChannelHasWatermark), - ("testWriteFuturesFailWhenChannelClosed", testWriteFuturesFailWhenChannelClosed), - ("testManyManyDatagramWrites", testManyManyDatagramWrites), - ("testSendmmsgLotsOfData", testSendmmsgLotsOfData), - ("testLargeWritesFail", testLargeWritesFail), - ("testOneLargeWriteDoesntPreventOthersWriting", testOneLargeWriteDoesntPreventOthersWriting), - ("testClosingBeforeFlushFailsAllWrites", testClosingBeforeFlushFailsAllWrites), - ("testRecvMsgFailsWithECONNREFUSED", testRecvMsgFailsWithECONNREFUSED), - ("testRecvMsgFailsWithENOMEM", testRecvMsgFailsWithENOMEM), - ("testRecvMsgFailsWithEFAULT", testRecvMsgFailsWithEFAULT), - ("testRecvMmsgFailsWithECONNREFUSED", testRecvMmsgFailsWithECONNREFUSED), - ("testRecvMmsgFailsWithENOMEM", testRecvMmsgFailsWithENOMEM), - ("testRecvMmsgFailsWithEFAULT", testRecvMmsgFailsWithEFAULT), - ("testSetGetOptionClosedDatagramChannel", testSetGetOptionClosedDatagramChannel), - ("testWritesAreAccountedCorrectly", testWritesAreAccountedCorrectly), - ("testSettingTwoDistinctChannelOptionsWorksForDatagramChannel", testSettingTwoDistinctChannelOptionsWorksForDatagramChannel), - ("testUnprocessedOutboundUserEventFailsOnDatagramChannel", testUnprocessedOutboundUserEventFailsOnDatagramChannel), - ("testBasicMultipleReads", testBasicMultipleReads), - ("testMmsgWillTruncateWithoutChangeToAllocator", testMmsgWillTruncateWithoutChangeToAllocator), - ("testRecvMmsgForMultipleCycles", testRecvMmsgForMultipleCycles), - ("testSetGetEcnNotificationOption", testSetGetEcnNotificationOption), - ("testEcnSendReceiveIPV4", testEcnSendReceiveIPV4), - ("testEcnSendReceiveIPV6", testEcnSendReceiveIPV6), - ("testEcnSendReceiveIPV4VectorRead", testEcnSendReceiveIPV4VectorRead), - ("testEcnSendReceiveIPV6VectorRead", testEcnSendReceiveIPV6VectorRead), - ("testEcnSendReceiveIPV4VectorReadVectorWrite", testEcnSendReceiveIPV4VectorReadVectorWrite), - ("testEcnSendReceiveIPV6VectorReadVectorWrite", testEcnSendReceiveIPV6VectorReadVectorWrite), - ("testWritabilityChangeDuringReentrantFlushNow", testWritabilityChangeDuringReentrantFlushNow), - ("testSetGetPktInfoOption", testSetGetPktInfoOption), - ("testSimpleReceivePacketInfoIPV4", testSimpleReceivePacketInfoIPV4), - ("testSimpleReceivePacketInfoIPV6", testSimpleReceivePacketInfoIPV6), - ("testReceiveEcnAndPacketInfoIPV4", testReceiveEcnAndPacketInfoIPV4), - ("testReceiveEcnAndPacketInfoIPV6", testReceiveEcnAndPacketInfoIPV6), - ("testReceiveEcnAndPacketInfoIPV4VectorRead", testReceiveEcnAndPacketInfoIPV4VectorRead), - ("testReceiveEcnAndPacketInfoIPV6VectorRead", testReceiveEcnAndPacketInfoIPV6VectorRead), - ("testReceiveEcnAndPacketInfoIPV4VectorReadVectorWrite", testReceiveEcnAndPacketInfoIPV4VectorReadVectorWrite), - ("testReceiveEcnAndPacketInfoIPV6VectorReadVectorWrite", testReceiveEcnAndPacketInfoIPV6VectorReadVectorWrite), - ("testSendingAddressedEnvelopeOnUnconnectedSocketSucceeds", testSendingAddressedEnvelopeOnUnconnectedSocketSucceeds), - ("testSendingByteBufferOnUnconnectedSocketFails", testSendingByteBufferOnUnconnectedSocketFails), - ("testSendingByteBufferOnConnectedSocketSucceeds", testSendingByteBufferOnConnectedSocketSucceeds), - ("testSendingAddressedEnvelopeOnConnectedSocketSucceeds", testSendingAddressedEnvelopeOnConnectedSocketSucceeds), - ("testSendingAddressedEnvelopeOnConnectedSocketWithDifferentAddressFails", testSendingAddressedEnvelopeOnConnectedSocketWithDifferentAddressFails), - ("testConnectingSocketAfterFlushingExistingMessages", testConnectingSocketAfterFlushingExistingMessages), - ("testConnectingSocketFailsBufferedWrites", testConnectingSocketFailsBufferedWrites), - ("testReconnectingSocketFailsBufferedWrites", testReconnectingSocketFailsBufferedWrites), - ("testGSOIsUnsupportedOnNonLinuxPlatforms", testGSOIsUnsupportedOnNonLinuxPlatforms), - ("testSetGSOOption", testSetGSOOption), - ("testGetGSOOption", testGetGSOOption), - ("testLargeScalarWriteWithGSO", testLargeScalarWriteWithGSO), - ("testLargeVectorWriteWithGSO", testLargeVectorWriteWithGSO), - ("testWriteBufferAtGSOSegmentCountLimit", testWriteBufferAtGSOSegmentCountLimit), - ("testWriteBufferAboveGSOSegmentCountLimitShouldError", testWriteBufferAboveGSOSegmentCountLimitShouldError), - ("testGROIsUnsupportedOnNonLinuxPlatforms", testGROIsUnsupportedOnNonLinuxPlatforms), - ("testSetGROOption", testSetGROOption), - ("testGetGROOption", testGetGROOption), - ("testChannelCanReceiveLargeBufferWithGROUsingScalarReads", testChannelCanReceiveLargeBufferWithGROUsingScalarReads), - ("testChannelCanReceiveLargeBufferWithGROUsingVectorReads", testChannelCanReceiveLargeBufferWithGROUsingVectorReads), - ("testChannelCanReceiveMultipleLargeBuffersWithGROUsingScalarReads", testChannelCanReceiveMultipleLargeBuffersWithGROUsingScalarReads), - ("testChannelCanReceiveMultipleLargeBuffersWithGROUsingVectorReads", testChannelCanReceiveMultipleLargeBuffersWithGROUsingVectorReads), - ] - } -} - diff --git a/Tests/NIOPosixTests/EchoServerClientTest+XCTest.swift b/Tests/NIOPosixTests/EchoServerClientTest+XCTest.swift deleted file mode 100644 index 56e32b49..00000000 --- a/Tests/NIOPosixTests/EchoServerClientTest+XCTest.swift +++ /dev/null @@ -1,50 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2017-2021 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 -// -//===----------------------------------------------------------------------===// -// -// EchoServerClientTest+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 EchoServerClientTest { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (EchoServerClientTest) -> () throws -> Void)] { - return [ - ("testEcho", testEcho), - ("testLotsOfUnflushedWrites", testLotsOfUnflushedWrites), - ("testEchoUnixDomainSocket", testEchoUnixDomainSocket), - ("testConnectUnixDomainSocket", testConnectUnixDomainSocket), - ("testCleanupUnixDomainSocket", testCleanupUnixDomainSocket), - ("testBootstrapUnixDomainSocketNameClash", testBootstrapUnixDomainSocketNameClash), - ("testChannelActiveOnConnect", testChannelActiveOnConnect), - ("testWriteThenRead", testWriteThenRead), - ("testCloseInInactive", testCloseInInactive), - ("testFlushOnEmpty", testFlushOnEmpty), - ("testWriteOnConnect", testWriteOnConnect), - ("testWriteOnAccept", testWriteOnAccept), - ("testWriteAfterChannelIsDead", testWriteAfterChannelIsDead), - ("testPendingReadProcessedAfterWriteError", testPendingReadProcessedAfterWriteError), - ("testChannelErrorEOFNotFiredThroughPipeline", testChannelErrorEOFNotFiredThroughPipeline), - ("testPortNumbers", testPortNumbers), - ("testConnectingToIPv4And6ButServerOnlyWaitsOnIPv4", testConnectingToIPv4And6ButServerOnlyWaitsOnIPv4), - ] - } -} - diff --git a/Tests/NIOPosixTests/EventLoopFutureTest+XCTest.swift b/Tests/NIOPosixTests/EventLoopFutureTest+XCTest.swift deleted file mode 100644 index fc8804de..00000000 --- a/Tests/NIOPosixTests/EventLoopFutureTest+XCTest.swift +++ /dev/null @@ -1,104 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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 -// -//===----------------------------------------------------------------------===// -// -// EventLoopFutureTest+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 EventLoopFutureTest { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (EventLoopFutureTest) -> () throws -> Void)] { - return [ - ("testFutureFulfilledIfHasResult", testFutureFulfilledIfHasResult), - ("testFutureFulfilledIfHasError", testFutureFulfilledIfHasError), - ("testFoldWithMultipleEventLoops", testFoldWithMultipleEventLoops), - ("testFoldWithSuccessAndAllSuccesses", testFoldWithSuccessAndAllSuccesses), - ("testFoldWithSuccessAndOneFailure", testFoldWithSuccessAndOneFailure), - ("testFoldWithSuccessAndEmptyFutureList", testFoldWithSuccessAndEmptyFutureList), - ("testFoldWithFailureAndEmptyFutureList", testFoldWithFailureAndEmptyFutureList), - ("testFoldWithFailureAndAllSuccesses", testFoldWithFailureAndAllSuccesses), - ("testFoldWithFailureAndAllUnfulfilled", testFoldWithFailureAndAllUnfulfilled), - ("testFoldWithFailureAndAllFailures", testFoldWithFailureAndAllFailures), - ("testAndAllWithEmptyFutureList", testAndAllWithEmptyFutureList), - ("testAndAllWithAllSuccesses", testAndAllWithAllSuccesses), - ("testAndAllWithAllFailures", testAndAllWithAllFailures), - ("testAndAllWithOneFailure", testAndAllWithOneFailure), - ("testReduceWithAllSuccesses", testReduceWithAllSuccesses), - ("testReduceWithOnlyInitialValue", testReduceWithOnlyInitialValue), - ("testReduceWithAllFailures", testReduceWithAllFailures), - ("testReduceWithOneFailure", testReduceWithOneFailure), - ("testReduceWhichDoesFailFast", testReduceWhichDoesFailFast), - ("testReduceIntoWithAllSuccesses", testReduceIntoWithAllSuccesses), - ("testReduceIntoWithEmptyFutureList", testReduceIntoWithEmptyFutureList), - ("testReduceIntoWithAllFailure", testReduceIntoWithAllFailure), - ("testReduceIntoWithMultipleEventLoops", testReduceIntoWithMultipleEventLoops), - ("testThenThrowingWhichDoesNotThrow", testThenThrowingWhichDoesNotThrow), - ("testThenThrowingWhichDoesThrow", testThenThrowingWhichDoesThrow), - ("testflatMapErrorThrowingWhichDoesNotThrow", testflatMapErrorThrowingWhichDoesNotThrow), - ("testflatMapErrorThrowingWhichDoesThrow", testflatMapErrorThrowingWhichDoesThrow), - ("testOrderOfFutureCompletion", testOrderOfFutureCompletion), - ("testEventLoopHoppingInThen", testEventLoopHoppingInThen), - ("testEventLoopHoppingInThenWithFailures", testEventLoopHoppingInThenWithFailures), - ("testEventLoopHoppingAndAll", testEventLoopHoppingAndAll), - ("testEventLoopHoppingAndAllWithFailures", testEventLoopHoppingAndAllWithFailures), - ("testFutureInVariousScenarios", testFutureInVariousScenarios), - ("testLoopHoppingHelperSuccess", testLoopHoppingHelperSuccess), - ("testLoopHoppingHelperFailure", testLoopHoppingHelperFailure), - ("testLoopHoppingHelperNoHopping", testLoopHoppingHelperNoHopping), - ("testFlatMapResultHappyPath", testFlatMapResultHappyPath), - ("testFlatMapResultFailurePath", testFlatMapResultFailurePath), - ("testWhenAllSucceedFailsImmediately", testWhenAllSucceedFailsImmediately), - ("testWhenAllSucceedResolvesAfterFutures", testWhenAllSucceedResolvesAfterFutures), - ("testWhenAllSucceedIsIndependentOfFulfillmentOrder", testWhenAllSucceedIsIndependentOfFulfillmentOrder), - ("testWhenAllCompleteResultsWithFailuresStillSucceed", testWhenAllCompleteResultsWithFailuresStillSucceed), - ("testWhenAllCompleteResults", testWhenAllCompleteResults), - ("testWhenAllCompleteResolvesAfterFutures", testWhenAllCompleteResolvesAfterFutures), - ("testAlways", testAlways), - ("testAlwaysWithFailingPromise", testAlwaysWithFailingPromise), - ("testPromiseCompletedWithSuccessfulFuture", testPromiseCompletedWithSuccessfulFuture), - ("testPromiseCompletedWithFailedFuture", testPromiseCompletedWithFailedFuture), - ("testPromiseCompletedWithSuccessfulResult", testPromiseCompletedWithSuccessfulResult), - ("testPromiseCompletedWithFailedResult", testPromiseCompletedWithFailedResult), - ("testAndAllCompleteWithZeroFutures", testAndAllCompleteWithZeroFutures), - ("testAndAllSucceedWithZeroFutures", testAndAllSucceedWithZeroFutures), - ("testAndAllCompleteWithPreSucceededFutures", testAndAllCompleteWithPreSucceededFutures), - ("testAndAllCompleteWithPreFailedFutures", testAndAllCompleteWithPreFailedFutures), - ("testAndAllCompleteWithMixOfPreSuccededAndNotYetCompletedFutures", testAndAllCompleteWithMixOfPreSuccededAndNotYetCompletedFutures), - ("testWhenAllCompleteWithMixOfPreSuccededAndNotYetCompletedFutures", testWhenAllCompleteWithMixOfPreSuccededAndNotYetCompletedFutures), - ("testRepeatedTaskOffEventLoopGroupFuture", testRepeatedTaskOffEventLoopGroupFuture), - ("testEventLoopFutureOrErrorNoThrow", testEventLoopFutureOrErrorNoThrow), - ("testEventLoopFutureOrThrows", testEventLoopFutureOrThrows), - ("testEventLoopFutureOrNoReplacement", testEventLoopFutureOrNoReplacement), - ("testEventLoopFutureOrReplacement", testEventLoopFutureOrReplacement), - ("testEventLoopFutureOrNoElse", testEventLoopFutureOrNoElse), - ("testEventLoopFutureOrElse", testEventLoopFutureOrElse), - ("testFlatBlockingMapOnto", testFlatBlockingMapOnto), - ("testWhenSuccessBlocking", testWhenSuccessBlocking), - ("testWhenFailureBlocking", testWhenFailureBlocking), - ("testWhenCompleteBlockingSuccess", testWhenCompleteBlockingSuccess), - ("testWhenCompleteBlockingFailure", testWhenCompleteBlockingFailure), - ("testFlatMapWithEL", testFlatMapWithEL), - ("testFlatMapErrorWithEL", testFlatMapErrorWithEL), - ("testFoldWithEL", testFoldWithEL), - ] - } -} - diff --git a/Tests/NIOPosixTests/EventLoopTest+XCTest.swift b/Tests/NIOPosixTests/EventLoopTest+XCTest.swift deleted file mode 100644 index d3ba9be8..00000000 --- a/Tests/NIOPosixTests/EventLoopTest+XCTest.swift +++ /dev/null @@ -1,98 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2017-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 -// -//===----------------------------------------------------------------------===// -// -// EventLoopTest+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 EventLoopTest { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (EventLoopTest) -> () throws -> Void)] { - return [ - ("testSchedule", testSchedule), - ("testFlatSchedule", testFlatSchedule), - ("testScheduleWithDelay", testScheduleWithDelay), - ("testScheduleCancelled", testScheduleCancelled), - ("testFlatScheduleCancelled", testFlatScheduleCancelled), - ("testScheduleRepeatedTask", testScheduleRepeatedTask), - ("testScheduledTaskThatIsImmediatelyCancelledNeverFires", testScheduledTaskThatIsImmediatelyCancelledNeverFires), - ("testScheduledTasksAreOrdered", testScheduledTasksAreOrdered), - ("testFlatScheduledTaskThatIsImmediatelyCancelledNeverFires", testFlatScheduledTaskThatIsImmediatelyCancelledNeverFires), - ("testRepeatedTaskThatIsImmediatelyCancelledNeverFires", testRepeatedTaskThatIsImmediatelyCancelledNeverFires), - ("testScheduleRepeatedTaskCancelFromDifferentThread", testScheduleRepeatedTaskCancelFromDifferentThread), - ("testScheduleRepeatedTaskToNotRetainRepeatedTask", testScheduleRepeatedTaskToNotRetainRepeatedTask), - ("testScheduleRepeatedTaskToNotRetainEventLoop", testScheduleRepeatedTaskToNotRetainEventLoop), - ("testScheduledRepeatedAsyncTask", testScheduledRepeatedAsyncTask), - ("testEventLoopGroupMakeIterator", testEventLoopGroupMakeIterator), - ("testEventLoopMakeIterator", testEventLoopMakeIterator), - ("testMultipleShutdown", testMultipleShutdown), - ("testShuttingDownFailsRegistration", testShuttingDownFailsRegistration), - ("testEventLoopThreads", testEventLoopThreads), - ("testEventLoopPinned", testEventLoopPinned), - ("testEventLoopPinnedCPUIdsConstructor", testEventLoopPinnedCPUIdsConstructor), - ("testCurrentEventLoop", testCurrentEventLoop), - ("testShutdownWhileScheduledTasksNotReady", testShutdownWhileScheduledTasksNotReady), - ("testCloseFutureNotifiedBeforeUnblock", testCloseFutureNotifiedBeforeUnblock), - ("testScheduleMultipleTasks", testScheduleMultipleTasks), - ("testRepeatedTaskThatIsImmediatelyCancelledNotifies", testRepeatedTaskThatIsImmediatelyCancelledNotifies), - ("testRepeatedTaskThatIsCancelledAfterRunningAtLeastTwiceNotifies", testRepeatedTaskThatIsCancelledAfterRunningAtLeastTwiceNotifies), - ("testRepeatedTaskThatCancelsItselfNotifiesOnlyWhenFinished", testRepeatedTaskThatCancelsItselfNotifiesOnlyWhenFinished), - ("testCancelledScheduledTasksDoNotHoldOnToRunClosure", testCancelledScheduledTasksDoNotHoldOnToRunClosure), - ("testCancelledScheduledTasksDoNotHoldOnToRunClosureEvenIfTheyWereTheNextTaskToExecute", testCancelledScheduledTasksDoNotHoldOnToRunClosureEvenIfTheyWereTheNextTaskToExecute), - ("testIllegalCloseOfEventLoopFails", testIllegalCloseOfEventLoopFails), - ("testSubtractingDeadlineFromPastAndFuturesDeadlinesWorks", testSubtractingDeadlineFromPastAndFuturesDeadlinesWorks), - ("testCallingSyncShutdownGracefullyMultipleTimesShouldNotHang", testCallingSyncShutdownGracefullyMultipleTimesShouldNotHang), - ("testCallingShutdownGracefullyMultipleTimesShouldExecuteAllCallbacks", testCallingShutdownGracefullyMultipleTimesShouldExecuteAllCallbacks), - ("testEdgeCasesNIODeadlineMinusNIODeadline", testEdgeCasesNIODeadlineMinusNIODeadline), - ("testEdgeCasesNIODeadlinePlusTimeAmount", testEdgeCasesNIODeadlinePlusTimeAmount), - ("testEdgeCasesNIODeadlineMinusTimeAmount", testEdgeCasesNIODeadlineMinusTimeAmount), - ("testSuccessfulFlatSubmit", testSuccessfulFlatSubmit), - ("testFailingFlatSubmit", testFailingFlatSubmit), - ("testSchedulingTaskOnTheEventLoopWithinTheEventLoopsOnlyTask", testSchedulingTaskOnTheEventLoopWithinTheEventLoopsOnlyTask), - ("testSchedulingTaskOnTheEventLoopWithinTheEventLoopsOnlyIOOperation", testSchedulingTaskOnTheEventLoopWithinTheEventLoopsOnlyIOOperation), - ("testCancellingTheLastOutstandingTask", testCancellingTheLastOutstandingTask), - ("testSchedulingTaskOnTheEventLoopWithinTheEventLoopsOnlyScheduledTask", testSchedulingTaskOnTheEventLoopWithinTheEventLoopsOnlyScheduledTask), - ("testSelectableEventLoopDescription", testSelectableEventLoopDescription), - ("testMultiThreadedEventLoopGroupDescription", testMultiThreadedEventLoopGroupDescription), - ("testSafeToExecuteTrue", testSafeToExecuteTrue), - ("testSafeToExecuteFalse", testSafeToExecuteFalse), - ("testTakeOverThreadAndAlsoTakeItBack", testTakeOverThreadAndAlsoTakeItBack), - ("testThreadTakeoverUnsetsCurrentEventLoop", testThreadTakeoverUnsetsCurrentEventLoop), - ("testWeCanDoTrulySingleThreadedNetworking", testWeCanDoTrulySingleThreadedNetworking), - ("testWeFailOutstandingScheduledTasksOnELShutdown", testWeFailOutstandingScheduledTasksOnELShutdown), - ("testSchedulingTaskOnFutureFailedByELShutdownDoesNotMakeUsExplode", testSchedulingTaskOnFutureFailedByELShutdownDoesNotMakeUsExplode), - ("testEventLoopGroupProvider", testEventLoopGroupProvider), - ("testScheduleMaximum", testScheduleMaximum), - ("testEventLoopsWithPreSucceededFuturesCacheThem", testEventLoopsWithPreSucceededFuturesCacheThem), - ("testEventLoopsWithoutPreSucceededFuturesDoNotCacheThem", testEventLoopsWithoutPreSucceededFuturesDoNotCacheThem), - ("testSelectableEventLoopHasPreSucceededFuturesOnlyOnTheEventLoop", testSelectableEventLoopHasPreSucceededFuturesOnlyOnTheEventLoop), - ("testMakeCompletedFuture", testMakeCompletedFuture), - ("testMakeCompletedFutureWithResultOf", testMakeCompletedFutureWithResultOf), - ("testMakeCompletedVoidFuture", testMakeCompletedVoidFuture), - ("testEventLoopGroupsWithoutAnyImplementationAreValid", testEventLoopGroupsWithoutAnyImplementationAreValid), - ("testCallingAnyOnAnMTELGThatIsNotSelfDoesNotReturnItself", testCallingAnyOnAnMTELGThatIsNotSelfDoesNotReturnItself), - ("testMultiThreadedEventLoopGroupSupportsStickyAnyImplementation", testMultiThreadedEventLoopGroupSupportsStickyAnyImplementation), - ("testAsyncToFutureConversionSuccess", testAsyncToFutureConversionSuccess), - ("testAsyncToFutureConversionFailure", testAsyncToFutureConversionFailure), - ] - } -} - diff --git a/Tests/NIOPosixTests/FileRegionTest+XCTest.swift b/Tests/NIOPosixTests/FileRegionTest+XCTest.swift deleted file mode 100644 index 95dde05c..00000000 --- a/Tests/NIOPosixTests/FileRegionTest+XCTest.swift +++ /dev/null @@ -1,42 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2017-2021 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 -// -//===----------------------------------------------------------------------===// -// -// FileRegionTest+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 FileRegionTest { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (FileRegionTest) -> () throws -> Void)] { - return [ - ("testWriteFileRegion", testWriteFileRegion), - ("testWriteEmptyFileRegionDoesNotHang", testWriteEmptyFileRegionDoesNotHang), - ("testOutstandingFileRegionsWork", testOutstandingFileRegionsWork), - ("testWholeFileFileRegion", testWholeFileFileRegion), - ("testWholeEmptyFileFileRegion", testWholeEmptyFileFileRegion), - ("testFileRegionDuplicatesShareSeekPointer", testFileRegionDuplicatesShareSeekPointer), - ("testMassiveFileRegionThatJustAboutWorks", testMassiveFileRegionThatJustAboutWorks), - ("testMassiveFileRegionReaderIndexWorks", testMassiveFileRegionReaderIndexWorks), - ("testFileRegionAndIODataFitsInACoupleOfEnums", testFileRegionAndIODataFitsInACoupleOfEnums), - ] - } -} - diff --git a/Tests/NIOPosixTests/GetAddrInfoResolverTest+XCTest.swift b/Tests/NIOPosixTests/GetAddrInfoResolverTest+XCTest.swift deleted file mode 100644 index 8ea1d8db..00000000 --- a/Tests/NIOPosixTests/GetAddrInfoResolverTest+XCTest.swift +++ /dev/null @@ -1,35 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2017-2021 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 -// -//===----------------------------------------------------------------------===// -// -// GetAddrInfoResolverTest+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 GetaddrinfoResolverTest { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (GetaddrinfoResolverTest) -> () throws -> Void)] { - return [ - ("testResolveNoDuplicatesV4", testResolveNoDuplicatesV4), - ("testResolveNoDuplicatesV6", testResolveNoDuplicatesV6), - ] - } -} - diff --git a/Tests/NIOPosixTests/HappyEyeballsTest+XCTest.swift b/Tests/NIOPosixTests/HappyEyeballsTest+XCTest.swift deleted file mode 100644 index 03784f49..00000000 --- a/Tests/NIOPosixTests/HappyEyeballsTest+XCTest.swift +++ /dev/null @@ -1,57 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2018-2021 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 -// -//===----------------------------------------------------------------------===// -// -// HappyEyeballsTest+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 HappyEyeballsTest { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (HappyEyeballsTest) -> () throws -> Void)] { - return [ - ("testIPv4OnlyResolution", testIPv4OnlyResolution), - ("testIPv6OnlyResolution", testIPv6OnlyResolution), - ("testTimeOutDuringDNSResolution", testTimeOutDuringDNSResolution), - ("testAAAAQueryReturningFirst", testAAAAQueryReturningFirst), - ("testAQueryReturningFirstDelayElapses", testAQueryReturningFirstDelayElapses), - ("testAQueryReturningFirstThenAAAAReturns", testAQueryReturningFirstThenAAAAReturns), - ("testAQueryReturningFirstThenAAAAErrors", testAQueryReturningFirstThenAAAAErrors), - ("testAQueryReturningFirstThenEmptyAAAA", testAQueryReturningFirstThenEmptyAAAA), - ("testEmptyResultsFail", testEmptyResultsFail), - ("testAllDNSFail", testAllDNSFail), - ("testMaximalConnectionDelay", testMaximalConnectionDelay), - ("testAllConnectionsFail", testAllConnectionsFail), - ("testDelayedAAAAResult", testDelayedAAAAResult), - ("testTimeoutWaitingForAAAA", testTimeoutWaitingForAAAA), - ("testTimeoutAfterAQuery", testTimeoutAfterAQuery), - ("testAConnectFailsWaitingForAAAA", testAConnectFailsWaitingForAAAA), - ("testDelayedAResult", testDelayedAResult), - ("testTimeoutBeforeAResponse", testTimeoutBeforeAResponse), - ("testAllConnectionsFailImmediately", testAllConnectionsFailImmediately), - ("testLaterConnections", testLaterConnections), - ("testDelayedChannelCreation", testDelayedChannelCreation), - ("testChannelCreationFails", testChannelCreationFails), - ("testCancellationSyncWithConnectDelay", testCancellationSyncWithConnectDelay), - ("testCancellationSyncWithResolutionDelay", testCancellationSyncWithResolutionDelay), - ] - } -} - diff --git a/Tests/NIOPosixTests/IdleStateHandlerTest+XCTest.swift b/Tests/NIOPosixTests/IdleStateHandlerTest+XCTest.swift deleted file mode 100644 index 4f7fdf6e..00000000 --- a/Tests/NIOPosixTests/IdleStateHandlerTest+XCTest.swift +++ /dev/null @@ -1,38 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2017-2021 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 -// -//===----------------------------------------------------------------------===// -// -// IdleStateHandlerTest+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 IdleStateHandlerTest { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (IdleStateHandlerTest) -> () throws -> Void)] { - return [ - ("testIdleRead", testIdleRead), - ("testIdleWrite", testIdleWrite), - ("testIdleAllWrite", testIdleAllWrite), - ("testIdleAllRead", testIdleAllRead), - ("testPropagateInboundEvents", testPropagateInboundEvents), - ] - } -} - diff --git a/Tests/NIOPosixTests/IntegerBitPackingTests+XCTest.swift b/Tests/NIOPosixTests/IntegerBitPackingTests+XCTest.swift deleted file mode 100644 index 29ad69ae..00000000 --- a/Tests/NIOPosixTests/IntegerBitPackingTests+XCTest.swift +++ /dev/null @@ -1,37 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2017-2021 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 -// -//===----------------------------------------------------------------------===// -// -// IntegerBitPackingTests+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 IntegerBitPackingTests { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (IntegerBitPackingTests) -> () throws -> Void)] { - return [ - ("testAllUInt8PairsRoundtrip", testAllUInt8PairsRoundtrip), - ("testExtremesWorkForUInt32UInt16UInt8", testExtremesWorkForUInt32UInt16UInt8), - ("testExtremesWorkForUInt16UInt8", testExtremesWorkForUInt16UInt8), - ("testExtremesWorkForUInt32CInt", testExtremesWorkForUInt32CInt), - ] - } -} - diff --git a/Tests/NIOPosixTests/MulticastTest+XCTest.swift b/Tests/NIOPosixTests/MulticastTest+XCTest.swift deleted file mode 100644 index 0d0c42df..00000000 --- a/Tests/NIOPosixTests/MulticastTest+XCTest.swift +++ /dev/null @@ -1,41 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2017-2021 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 -// -//===----------------------------------------------------------------------===// -// -// MulticastTest+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 MulticastTest { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (MulticastTest) -> () throws -> Void)] { - return [ - ("testCanJoinBasicMulticastGroupIPv4", testCanJoinBasicMulticastGroupIPv4), - ("testCanJoinBasicMulticastGroupIPv6", testCanJoinBasicMulticastGroupIPv6), - ("testCanLeaveAnIPv4MulticastGroup", testCanLeaveAnIPv4MulticastGroup), - ("testCanLeaveAnIPv6MulticastGroup", testCanLeaveAnIPv6MulticastGroup), - ("testCanJoinBasicMulticastGroupIPv4WithDevice", testCanJoinBasicMulticastGroupIPv4WithDevice), - ("testCanJoinBasicMulticastGroupIPv6WithDevice", testCanJoinBasicMulticastGroupIPv6WithDevice), - ("testCanLeaveAnIPv4MulticastGroupWithDevice", testCanLeaveAnIPv4MulticastGroupWithDevice), - ("testCanLeaveAnIPv6MulticastGroupWithDevice", testCanLeaveAnIPv6MulticastGroupWithDevice), - ] - } -} - diff --git a/Tests/NIOPosixTests/NIOLoopBoundTests+XCTest.swift b/Tests/NIOPosixTests/NIOLoopBoundTests+XCTest.swift deleted file mode 100644 index 9c928578..00000000 --- a/Tests/NIOPosixTests/NIOLoopBoundTests+XCTest.swift +++ /dev/null @@ -1,35 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2017-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 -// -//===----------------------------------------------------------------------===// -// -// NIOLoopBoundTests+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 NIOLoopBoundTests { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (NIOLoopBoundTests) -> () throws -> Void)] { - return [ - ("testLoopBoundIsSendableWithNonSendableValue", testLoopBoundIsSendableWithNonSendableValue), - ("testLoopBoundBoxCanBeInitialisedWithNilOffLoopAndLaterSetToValue", testLoopBoundBoxCanBeInitialisedWithNilOffLoopAndLaterSetToValue), - ] - } -} - diff --git a/Tests/NIOPosixTests/NIOThreadPoolTest+XCTest.swift b/Tests/NIOPosixTests/NIOThreadPoolTest+XCTest.swift deleted file mode 100644 index 4210237f..00000000 --- a/Tests/NIOPosixTests/NIOThreadPoolTest+XCTest.swift +++ /dev/null @@ -1,36 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2017-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 -// -//===----------------------------------------------------------------------===// -// -// NIOThreadPoolTest+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 NIOThreadPoolTest { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (NIOThreadPoolTest) -> () throws -> Void)] { - return [ - ("testThreadNamesAreSetUp", testThreadNamesAreSetUp), - ("testThreadPoolStartsMultipleTimes", testThreadPoolStartsMultipleTimes), - ("testAsyncShutdownWorks", testAsyncShutdownWorks), - ] - } -} - diff --git a/Tests/NIOPosixTests/NonBlockingFileIOTest+XCTest.swift b/Tests/NIOPosixTests/NonBlockingFileIOTest+XCTest.swift deleted file mode 100644 index ed5e5d6a..00000000 --- a/Tests/NIOPosixTests/NonBlockingFileIOTest+XCTest.swift +++ /dev/null @@ -1,83 +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 -// -//===----------------------------------------------------------------------===// -// -// NonBlockingFileIOTest+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 NonBlockingFileIOTest { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (NonBlockingFileIOTest) -> () throws -> Void)] { - return [ - ("testBasicFileIOWorks", testBasicFileIOWorks), - ("testOffsetWorks", testOffsetWorks), - ("testOffsetBeyondEOF", testOffsetBeyondEOF), - ("testEmptyReadWorks", testEmptyReadWorks), - ("testReadingShortWorks", testReadingShortWorks), - ("testDoesNotBlockTheThreadOrEventLoop", testDoesNotBlockTheThreadOrEventLoop), - ("testGettingErrorWhenEventLoopGroupIsShutdown", testGettingErrorWhenEventLoopGroupIsShutdown), - ("testChunkReadingWorks", testChunkReadingWorks), - ("testChunkReadingCanBeAborted", testChunkReadingCanBeAborted), - ("testChunkReadingWorksForIncrediblyLongChain", testChunkReadingWorksForIncrediblyLongChain), - ("testReadingDifferentChunkSize", testReadingDifferentChunkSize), - ("testReadDoesNotReadShort", testReadDoesNotReadShort), - ("testChunkReadingWhereByteCountIsNotAChunkSizeMultiplier", testChunkReadingWhereByteCountIsNotAChunkSizeMultiplier), - ("testReadMoreThanIntMaxBytesDoesntThrow", testReadMoreThanIntMaxBytesDoesntThrow), - ("testChunkedReadDoesNotReadShort", testChunkedReadDoesNotReadShort), - ("testChunkSizeMoreThanTotal", testChunkSizeMoreThanTotal), - ("testFileRegionReadFromPipeFails", testFileRegionReadFromPipeFails), - ("testReadFromNonBlockingPipeFails", testReadFromNonBlockingPipeFails), - ("testSeekPointerIsSetToFront", testSeekPointerIsSetToFront), - ("testReadingFileSize", testReadingFileSize), - ("testChangeFileSizeShrink", testChangeFileSizeShrink), - ("testChangeFileSizeGrow", testChangeFileSizeGrow), - ("testWriting", testWriting), - ("testWriteMultipleTimes", testWriteMultipleTimes), - ("testWritingWithOffset", testWritingWithOffset), - ("testWritingBeyondEOF", testWritingBeyondEOF), - ("testFileOpenWorks", testFileOpenWorks), - ("testFileOpenWorksWithEmptyFile", testFileOpenWorksWithEmptyFile), - ("testFileOpenFails", testFileOpenFails), - ("testOpeningFilesForWriting", testOpeningFilesForWriting), - ("testOpeningFilesForWritingFailsIfWeDontAllowItExplicitly", testOpeningFilesForWritingFailsIfWeDontAllowItExplicitly), - ("testOpeningFilesForWritingDoesNotAllowReading", testOpeningFilesForWritingDoesNotAllowReading), - ("testOpeningFilesForWritingAndReading", testOpeningFilesForWritingAndReading), - ("testOpeningFilesForWritingDoesNotImplyTruncation", testOpeningFilesForWritingDoesNotImplyTruncation), - ("testOpeningFilesForWritingCanUseTruncation", testOpeningFilesForWritingCanUseTruncation), - ("testReadFromOffset", testReadFromOffset), - ("testReadChunkedFromOffset", testReadChunkedFromOffset), - ("testReadChunkedFromOffsetAfterEOFDeliversExactlyOneChunk", testReadChunkedFromOffsetAfterEOFDeliversExactlyOneChunk), - ("testReadChunkedFromEOFDeliversExactlyOneChunk", testReadChunkedFromEOFDeliversExactlyOneChunk), - ("testReadFromOffsetAfterEOFDeliversExactlyOneChunk", testReadFromOffsetAfterEOFDeliversExactlyOneChunk), - ("testReadFromEOFDeliversExactlyOneChunk", testReadFromEOFDeliversExactlyOneChunk), - ("testReadChunkedFromOffsetFileRegion", testReadChunkedFromOffsetFileRegion), - ("testReadManyChunks", testReadManyChunks), - ("testThrowsErrorOnUnstartedPool", testThrowsErrorOnUnstartedPool), - ("testLStat", testLStat), - ("testSymlink", testSymlink), - ("testCreateDirectory", testCreateDirectory), - ("testListDirectory", testListDirectory), - ("testRename", testRename), - ("testRemove", testRemove), - ] - } -} - diff --git a/Tests/NIOPosixTests/PendingDatagramWritesManagerTests+XCTest.swift b/Tests/NIOPosixTests/PendingDatagramWritesManagerTests+XCTest.swift deleted file mode 100644 index 7f16529d..00000000 --- a/Tests/NIOPosixTests/PendingDatagramWritesManagerTests+XCTest.swift +++ /dev/null @@ -1,43 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2017-2021 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 -// -//===----------------------------------------------------------------------===// -// -// PendingDatagramWritesManagerTests+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 PendingDatagramWritesManagerTests { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (PendingDatagramWritesManagerTests) -> () throws -> Void)] { - return [ - ("testPendingWritesEmptyWritesWorkAndWeDontWriteUnflushedThings", testPendingWritesEmptyWritesWorkAndWeDontWriteUnflushedThings), - ("testPendingWritesUsesVectorWriteOperationAndDoesntWriteTooMuch", testPendingWritesUsesVectorWriteOperationAndDoesntWriteTooMuch), - ("testPendingWritesWorkWithPartialWrites", testPendingWritesWorkWithPartialWrites), - ("testPendingWritesSpinCountWorksForSingleWrites", testPendingWritesSpinCountWorksForSingleWrites), - ("testPendingWritesCancellationWorksCorrectly", testPendingWritesCancellationWorksCorrectly), - ("testPendingWritesNoMoreThanWritevLimitIsWritten", testPendingWritesNoMoreThanWritevLimitIsWritten), - ("testPendingWritesNoMoreThanWritevLimitIsWrittenInOneMassiveChunk", testPendingWritesNoMoreThanWritevLimitIsWrittenInOneMassiveChunk), - ("testPendingWritesWorksWithManyEmptyWrites", testPendingWritesWorksWithManyEmptyWrites), - ("testPendingWritesCloseDuringVectorWrite", testPendingWritesCloseDuringVectorWrite), - ("testPendingWritesMoreThanWritevIOVectorLimit", testPendingWritesMoreThanWritevIOVectorLimit), - ] - } -} - diff --git a/Tests/NIOPosixTests/PipeChannelTest+XCTest.swift b/Tests/NIOPosixTests/PipeChannelTest+XCTest.swift deleted file mode 100644 index 6bb30615..00000000 --- a/Tests/NIOPosixTests/PipeChannelTest+XCTest.swift +++ /dev/null @@ -1,37 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2017-2021 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 -// -//===----------------------------------------------------------------------===// -// -// PipeChannelTest+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 PipeChannelTest { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (PipeChannelTest) -> () throws -> Void)] { - return [ - ("testBasicIO", testBasicIO), - ("testWriteErrorsCloseChannel", testWriteErrorsCloseChannel), - ("testWeDontAcceptRegularFiles", testWeDontAcceptRegularFiles), - ("testWeWorkFineWithASingleFileDescriptor", testWeWorkFineWithASingleFileDescriptor), - ] - } -} - diff --git a/Tests/NIOPosixTests/PooledRecvBufferAllocatorTests+XCTest.swift b/Tests/NIOPosixTests/PooledRecvBufferAllocatorTests+XCTest.swift deleted file mode 100644 index ce18c01b..00000000 --- a/Tests/NIOPosixTests/PooledRecvBufferAllocatorTests+XCTest.swift +++ /dev/null @@ -1,39 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2017-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 -// -//===----------------------------------------------------------------------===// -// -// PooledRecvBufferAllocatorTests+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 PooledRecvBufferAllocatorTests { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (PooledRecvBufferAllocatorTests) -> () throws -> Void)] { - return [ - ("testPoolFillsToCapacity", testPoolFillsToCapacity), - ("testBuffersAreRecycled", testBuffersAreRecycled), - ("testFirstAvailableBufferUsed", testFirstAvailableBufferUsed), - ("testBuffersAreClearedBetweenCalls", testBuffersAreClearedBetweenCalls), - ("testPoolCapacityIncrease", testPoolCapacityIncrease), - ("testPoolCapacityDecrease", testPoolCapacityDecrease), - ] - } -} - diff --git a/Tests/NIOPosixTests/RawSocketBootstrapTests+XCTest.swift b/Tests/NIOPosixTests/RawSocketBootstrapTests+XCTest.swift deleted file mode 100644 index 186cd6fc..00000000 --- a/Tests/NIOPosixTests/RawSocketBootstrapTests+XCTest.swift +++ /dev/null @@ -1,36 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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 -// -//===----------------------------------------------------------------------===// -// -// RawSocketBootstrapTests+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 RawSocketBootstrapTests { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (RawSocketBootstrapTests) -> () throws -> Void)] { - return [ - ("testBindWithRecevMmsg", testBindWithRecevMmsg), - ("testConnect", testConnect), - ("testIpHdrincl", testIpHdrincl), - ] - } -} - diff --git a/Tests/NIOPosixTests/SALChannelTests+XCTest.swift b/Tests/NIOPosixTests/SALChannelTests+XCTest.swift deleted file mode 100644 index ceb05b23..00000000 --- a/Tests/NIOPosixTests/SALChannelTests+XCTest.swift +++ /dev/null @@ -1,39 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2017-2021 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 -// -//===----------------------------------------------------------------------===// -// -// SALChannelTests+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 SALChannelTest { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (SALChannelTest) -> () throws -> Void)] { - return [ - ("testBasicConnectedChannel", testBasicConnectedChannel), - ("testWritesFromWritabilityNotificationsDoNotGetLostIfWePreviouslyWroteEverything", testWritesFromWritabilityNotificationsDoNotGetLostIfWePreviouslyWroteEverything), - ("testWeSurviveIfIgnoringSIGPIPEFails", testWeSurviveIfIgnoringSIGPIPEFails), - ("testBasicRead", testBasicRead), - ("testBasicConnectWithClientBootstrap", testBasicConnectWithClientBootstrap), - ("testClientBootstrapBindIsDoneAfterSocketOptions", testClientBootstrapBindIsDoneAfterSocketOptions), - ] - } -} - diff --git a/Tests/NIOPosixTests/SALEventLoopTests+XCTest.swift b/Tests/NIOPosixTests/SALEventLoopTests+XCTest.swift deleted file mode 100644 index fe48351f..00000000 --- a/Tests/NIOPosixTests/SALEventLoopTests+XCTest.swift +++ /dev/null @@ -1,34 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2017-2021 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 -// -//===----------------------------------------------------------------------===// -// -// SALEventLoopTests+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 SALEventLoopTests { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (SALEventLoopTests) -> () throws -> Void)] { - return [ - ("testSchedulingTaskOnSleepingLoopWakesUpOnce", testSchedulingTaskOnSleepingLoopWakesUpOnce), - ] - } -} - diff --git a/Tests/NIOPosixTests/SelectorTest+XCTest.swift b/Tests/NIOPosixTests/SelectorTest+XCTest.swift deleted file mode 100644 index f174017a..00000000 --- a/Tests/NIOPosixTests/SelectorTest+XCTest.swift +++ /dev/null @@ -1,37 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2017-2021 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 -// -//===----------------------------------------------------------------------===// -// -// SelectorTest+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 SelectorTest { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (SelectorTest) -> () throws -> Void)] { - return [ - ("testDeregisterWhileProcessingEvents", testDeregisterWhileProcessingEvents), - ("testDeregisterAndCloseWhileProcessingEvents", testDeregisterAndCloseWhileProcessingEvents), - ("testWeDoNotDeliverEventsForPreviouslyClosedChannels", testWeDoNotDeliverEventsForPreviouslyClosedChannels), - ("testTimerFDIsLevelTriggered", testTimerFDIsLevelTriggered), - ] - } -} - diff --git a/Tests/NIOPosixTests/SocketAddressTest+XCTest.swift b/Tests/NIOPosixTests/SocketAddressTest+XCTest.swift deleted file mode 100644 index d4bcc2a2..00000000 --- a/Tests/NIOPosixTests/SocketAddressTest+XCTest.swift +++ /dev/null @@ -1,59 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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 -// -//===----------------------------------------------------------------------===// -// -// SocketAddressTest+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 SocketAddressTest { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (SocketAddressTest) -> () throws -> Void)] { - return [ - ("testDescriptionWorks", testDescriptionWorks), - ("testDescriptionWorksWithoutIP", testDescriptionWorksWithoutIP), - ("testDescriptionWorksWithIPOnly", testDescriptionWorksWithIPOnly), - ("testDescriptionWorksWithByteBufferIPv4IP", testDescriptionWorksWithByteBufferIPv4IP), - ("testDescriptionWorksWithByteBufferIPv6IP", testDescriptionWorksWithByteBufferIPv6IP), - ("testRejectsWrongIPByteBufferLength", testRejectsWrongIPByteBufferLength), - ("testIn6AddrDescriptionWorks", testIn6AddrDescriptionWorks), - ("testIPAddressWorks", testIPAddressWorks), - ("testCanCreateIPv4AddressFromString", testCanCreateIPv4AddressFromString), - ("testCanCreateIPv6AddressFromString", testCanCreateIPv6AddressFromString), - ("testRejectsNonIPStrings", testRejectsNonIPStrings), - ("testConvertingStorage", testConvertingStorage), - ("testComparingSockaddrs", testComparingSockaddrs), - ("testEqualSocketAddresses", testEqualSocketAddresses), - ("testUnequalAddressesOnPort", testUnequalAddressesOnPort), - ("testUnequalOnAddress", testUnequalOnAddress), - ("testHashEqualSocketAddresses", testHashEqualSocketAddresses), - ("testHashUnequalAddressesOnPort", testHashUnequalAddressesOnPort), - ("testHashUnequalOnAddress", testHashUnequalOnAddress), - ("testUnequalAcrossFamilies", testUnequalAcrossFamilies), - ("testUnixSocketAddressIgnoresTrailingJunk", testUnixSocketAddressIgnoresTrailingJunk), - ("testPortAccessor", testPortAccessor), - ("testCanMutateSockaddrStorage", testCanMutateSockaddrStorage), - ("testPortIsMutable", testPortIsMutable), - ("testCanCreateIPv4MaskFromPrefix", testCanCreateIPv4MaskFromPrefix), - ("testCanCreateIPv6MaskFromPrefix", testCanCreateIPv6MaskFromPrefix), - ] - } -} - diff --git a/Tests/NIOPosixTests/SocketChannelTest+XCTest.swift b/Tests/NIOPosixTests/SocketChannelTest+XCTest.swift deleted file mode 100644 index d634e770..00000000 --- a/Tests/NIOPosixTests/SocketChannelTest+XCTest.swift +++ /dev/null @@ -1,61 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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 -// -//===----------------------------------------------------------------------===// -// -// SocketChannelTest+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 SocketChannelTest { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (SocketChannelTest) -> () throws -> Void)] { - return [ - ("testAsyncSetOption", testAsyncSetOption), - ("testDelayedConnectSetsUpRemotePeerAddress", testDelayedConnectSetsUpRemotePeerAddress), - ("testAcceptFailsWithECONNABORTED", testAcceptFailsWithECONNABORTED), - ("testAcceptFailsWithEMFILE", testAcceptFailsWithEMFILE), - ("testAcceptFailsWithENFILE", testAcceptFailsWithENFILE), - ("testAcceptFailsWithENOBUFS", testAcceptFailsWithENOBUFS), - ("testAcceptFailsWithENOMEM", testAcceptFailsWithENOMEM), - ("testAcceptFailsWithEFAULT", testAcceptFailsWithEFAULT), - ("testSetGetOptionClosedServerSocketChannel", testSetGetOptionClosedServerSocketChannel), - ("testConnect", testConnect), - ("testWriteServerSocketChannel", testWriteServerSocketChannel), - ("testWriteAndFlushServerSocketChannel", testWriteAndFlushServerSocketChannel), - ("testConnectServerSocketChannel", testConnectServerSocketChannel), - ("testCloseDuringWriteFailure", testCloseDuringWriteFailure), - ("testWithConfiguredStreamSocket", testWithConfiguredStreamSocket), - ("testWithConfiguredDatagramSocket", testWithConfiguredDatagramSocket), - ("testPendingConnectNotificationOrder", testPendingConnectNotificationOrder), - ("testLocalAndRemoteAddressNotNilInChannelInactiveAndHandlerRemoved", testLocalAndRemoteAddressNotNilInChannelInactiveAndHandlerRemoved), - ("testSocketFlagNONBLOCKWorks", testSocketFlagNONBLOCKWorks), - ("testInstantTCPConnectionResetThrowsError", testInstantTCPConnectionResetThrowsError), - ("testUnprocessedOutboundUserEventFailsOnServerSocketChannel", testUnprocessedOutboundUserEventFailsOnServerSocketChannel), - ("testUnprocessedOutboundUserEventFailsOnSocketChannel", testUnprocessedOutboundUserEventFailsOnSocketChannel), - ("testSetSockOptDoesNotOverrideExistingFlags", testSetSockOptDoesNotOverrideExistingFlags), - ("testServerChannelDoesNotBreakIfAcceptingFailsWithEINVAL", testServerChannelDoesNotBreakIfAcceptingFailsWithEINVAL), - ("testWeAreInterestedInReadEOFWhenChannelIsConnectedOnTheServerSide", testWeAreInterestedInReadEOFWhenChannelIsConnectedOnTheServerSide), - ("testWeAreInterestedInReadEOFWhenChannelIsConnectedOnTheClientSide", testWeAreInterestedInReadEOFWhenChannelIsConnectedOnTheClientSide), - ("testServerClosesTheConnectionImmediately", testServerClosesTheConnectionImmediately), - ("testSimpleMPTCP", testSimpleMPTCP), - ] - } -} - diff --git a/Tests/NIOPosixTests/SocketOptionProviderTest+XCTest.swift b/Tests/NIOPosixTests/SocketOptionProviderTest+XCTest.swift deleted file mode 100644 index 28b4f276..00000000 --- a/Tests/NIOPosixTests/SocketOptionProviderTest+XCTest.swift +++ /dev/null @@ -1,47 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2018-2021 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 -// -//===----------------------------------------------------------------------===// -// -// SocketOptionProviderTest+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 SocketOptionProviderTest { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (SocketOptionProviderTest) -> () throws -> Void)] { - return [ - ("testSettingAndGettingComplexSocketOption", testSettingAndGettingComplexSocketOption), - ("testObtainingDefaultValueOfComplexSocketOption", testObtainingDefaultValueOfComplexSocketOption), - ("testSettingAndGettingSimpleSocketOption", testSettingAndGettingSimpleSocketOption), - ("testObtainingDefaultValueOfSimpleSocketOption", testObtainingDefaultValueOfSimpleSocketOption), - ("testPassingInvalidSizeToSetComplexSocketOptionFails", testPassingInvalidSizeToSetComplexSocketOptionFails), - ("testLinger", testLinger), - ("testSoIpMulticastIf", testSoIpMulticastIf), - ("testIpMulticastTtl", testIpMulticastTtl), - ("testIpMulticastLoop", testIpMulticastLoop), - ("testIpv6MulticastIf", testIpv6MulticastIf), - ("testIPv6MulticastHops", testIPv6MulticastHops), - ("testIPv6MulticastLoop", testIPv6MulticastLoop), - ("testTCPInfo", testTCPInfo), - ("testTCPConnectionInfo", testTCPConnectionInfo), - ] - } -} - diff --git a/Tests/NIOPosixTests/StreamChannelsTest+XCTest.swift b/Tests/NIOPosixTests/StreamChannelsTest+XCTest.swift deleted file mode 100644 index 7be6ebbb..00000000 --- a/Tests/NIOPosixTests/StreamChannelsTest+XCTest.swift +++ /dev/null @@ -1,49 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2017-2021 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 -// -//===----------------------------------------------------------------------===// -// -// StreamChannelsTest+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 StreamChannelTest { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (StreamChannelTest) -> () throws -> Void)] { - return [ - ("testEchoBasic", testEchoBasic), - ("testSyncChannelOptions", testSyncChannelOptions), - ("testChannelReturnsNilForDefaultSyncOptionsImplementation", testChannelReturnsNilForDefaultSyncOptionsImplementation), - ("testWritabilityStartsTrueGoesFalseAndBackToTrue", testWritabilityStartsTrueGoesFalseAndBackToTrue), - ("testHalfCloseOwnOutput", testHalfCloseOwnOutput), - ("testHalfCloseOwnInput", testHalfCloseOwnInput), - ("testDoubleShutdownInput", testDoubleShutdownInput), - ("testDoubleShutdownOutput", testDoubleShutdownOutput), - ("testWriteFailsAfterOutputClosed", testWriteFailsAfterOutputClosed), - ("testVectorWrites", testVectorWrites), - ("testLotsOfWritesWhilstOtherSideNotReading", testLotsOfWritesWhilstOtherSideNotReading), - ("testFlushInWritePromise", testFlushInWritePromise), - ("testWriteAndFlushInChannelWritabilityChangedToTrue", testWriteAndFlushInChannelWritabilityChangedToTrue), - ("testWritabilityChangedDoesNotGetCalledOnSimpleWrite", testWritabilityChangedDoesNotGetCalledOnSimpleWrite), - ("testWriteAndFlushFromReentrantFlushNowTriggeredOutOfWritabilityWhereOuterSaysAllWrittenAndInnerDoesNot", testWriteAndFlushFromReentrantFlushNowTriggeredOutOfWritabilityWhereOuterSaysAllWrittenAndInnerDoesNot), - ("testCloseInReEntrantFlushNowCall", testCloseInReEntrantFlushNowCall), - ] - } -} - diff --git a/Tests/NIOPosixTests/SystemTest+XCTest.swift b/Tests/NIOPosixTests/SystemTest+XCTest.swift deleted file mode 100644 index 39743f5b..00000000 --- a/Tests/NIOPosixTests/SystemTest+XCTest.swift +++ /dev/null @@ -1,39 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2017-2021 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 -// -//===----------------------------------------------------------------------===// -// -// SystemTest+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 SystemTest { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (SystemTest) -> () throws -> Void)] { - return [ - ("testSystemCallWrapperPerformance", testSystemCallWrapperPerformance), - ("testErrorsWorkCorrectly", testErrorsWorkCorrectly), - ("testCmsgFirstHeader", testCmsgFirstHeader), - ("testCMsgNextHeader", testCMsgNextHeader), - ("testCMsgData", testCMsgData), - ("testCMsgCollection", testCMsgCollection), - ] - } -} - diff --git a/Tests/NIOPosixTests/ThreadTest+XCTest.swift b/Tests/NIOPosixTests/ThreadTest+XCTest.swift deleted file mode 100644 index c26b0a80..00000000 --- a/Tests/NIOPosixTests/ThreadTest+XCTest.swift +++ /dev/null @@ -1,46 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2018-2021 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 -// -//===----------------------------------------------------------------------===// -// -// ThreadTest+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 ThreadTest { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (ThreadTest) -> () throws -> Void)] { - return [ - ("testCurrentThreadWorks", testCurrentThreadWorks), - ("testCurrentThreadIsNotTrueOnOtherThread", testCurrentThreadIsNotTrueOnOtherThread), - ("testThreadSpecificsAreNilWhenNotPresent", testThreadSpecificsAreNilWhenNotPresent), - ("testThreadSpecificsWorks", testThreadSpecificsWorks), - ("testThreadSpecificsAreNotAvailableOnADifferentThread", testThreadSpecificsAreNotAvailableOnADifferentThread), - ("testThreadSpecificDoesNotLeakIfThreadExitsWhilstSet", testThreadSpecificDoesNotLeakIfThreadExitsWhilstSet), - ("testThreadSpecificDoesNotLeakIfThreadExitsAfterUnset", testThreadSpecificDoesNotLeakIfThreadExitsAfterUnset), - ("testThreadSpecificDoesNotLeakIfReplacedWithNewValue", testThreadSpecificDoesNotLeakIfReplacedWithNewValue), - ("testSharingThreadSpecificVariableWorks", testSharingThreadSpecificVariableWorks), - ("testThreadSpecificInitWithValueWorks", testThreadSpecificInitWithValueWorks), - ("testThreadSpecificDoesNotLeakWhenOutOfScopeButThreadStillRunning", testThreadSpecificDoesNotLeakWhenOutOfScopeButThreadStillRunning), - ("testThreadSpecificDoesNotLeakIfThreadExitsWhilstSetOnMultipleThreads", testThreadSpecificDoesNotLeakIfThreadExitsWhilstSetOnMultipleThreads), - ("testThreadSpecificDoesNotLeakWhenOutOfScopeButSetOnMultipleThreads", testThreadSpecificDoesNotLeakWhenOutOfScopeButSetOnMultipleThreads), - ] - } -} - diff --git a/Tests/NIOPosixTests/UniversalBootstrapSupportTest+XCTest.swift b/Tests/NIOPosixTests/UniversalBootstrapSupportTest+XCTest.swift deleted file mode 100644 index 5cff1120..00000000 --- a/Tests/NIOPosixTests/UniversalBootstrapSupportTest+XCTest.swift +++ /dev/null @@ -1,35 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2017-2021 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 -// -//===----------------------------------------------------------------------===// -// -// UniversalBootstrapSupportTest+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 UniversalBootstrapSupportTest { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (UniversalBootstrapSupportTest) -> () throws -> Void)] { - return [ - ("testBootstrappingWorks", testBootstrappingWorks), - ("testBootstrapOverrideOfShortcutOptions", testBootstrapOverrideOfShortcutOptions), - ] - } -} - diff --git a/Tests/NIOTLSTests/ApplicationProtocolNegotiationHandlerTests+XCTest.swift b/Tests/NIOTLSTests/ApplicationProtocolNegotiationHandlerTests+XCTest.swift deleted file mode 100644 index b6657aa2..00000000 --- a/Tests/NIOTLSTests/ApplicationProtocolNegotiationHandlerTests+XCTest.swift +++ /dev/null @@ -1,42 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2017-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 -// -//===----------------------------------------------------------------------===// -// -// ApplicationProtocolNegotiationHandlerTests+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 ApplicationProtocolNegotiationHandlerTests { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (ApplicationProtocolNegotiationHandlerTests) -> () throws -> Void)] { - return [ - ("testChannelProvidedToCallback", testChannelProvidedToCallback), - ("testIgnoresUnknownUserEvents", testIgnoresUnknownUserEvents), - ("testCallbackReflectsNotificationResult", testCallbackReflectsNotificationResult), - ("testCallbackNotesFallbackForNoNegotiation", testCallbackNotesFallbackForNoNegotiation), - ("testNoBufferingBeforeEventFires", testNoBufferingBeforeEventFires), - ("testBufferingWhileWaitingForFuture", testBufferingWhileWaitingForFuture), - ("testNothingBufferedDoesNotFireReadCompleted", testNothingBufferedDoesNotFireReadCompleted), - ("testUnbufferingFiresReadCompleted", testUnbufferingFiresReadCompleted), - ("testUnbufferingHandlesReentrantReads", testUnbufferingHandlesReentrantReads), - ] - } -} - diff --git a/Tests/NIOTLSTests/SNIHandlerTests+XCTest.swift b/Tests/NIOTLSTests/SNIHandlerTests+XCTest.swift deleted file mode 100644 index 96bbdc35..00000000 --- a/Tests/NIOTLSTests/SNIHandlerTests+XCTest.swift +++ /dev/null @@ -1,62 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2017-2021 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 -// -//===----------------------------------------------------------------------===// -// -// SNIHandlerTests+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 SNIHandlerTest { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (SNIHandlerTest) -> () throws -> Void)] { - return [ - ("testLibre227NoSNIDripFeed", testLibre227NoSNIDripFeed), - ("testLibre227WithSNIDripFeed", testLibre227WithSNIDripFeed), - ("testOpenSSL102NoSNIDripFeed", testOpenSSL102NoSNIDripFeed), - ("testOpenSSL102WithSNIDripFeed", testOpenSSL102WithSNIDripFeed), - ("testCurlSecureTransportDripFeed", testCurlSecureTransportDripFeed), - ("testSafariDripFeed", testSafariDripFeed), - ("testChromeDripFeed", testChromeDripFeed), - ("testFirefoxDripFeed", testFirefoxDripFeed), - ("testLibre227NoSNIBlast", testLibre227NoSNIBlast), - ("testLibre227WithSNIBlast", testLibre227WithSNIBlast), - ("testOpenSSL102NoSNIBlast", testOpenSSL102NoSNIBlast), - ("testOpenSSL102WithSNIBlast", testOpenSSL102WithSNIBlast), - ("testCurlSecureTransportBlast", testCurlSecureTransportBlast), - ("testSafariBlast", testSafariBlast), - ("testChromeBlast", testChromeBlast), - ("testFirefoxBlast", testFirefoxBlast), - ("testIgnoresUnknownRecordTypes", testIgnoresUnknownRecordTypes), - ("testIgnoresUnknownTlsVersions", testIgnoresUnknownTlsVersions), - ("testIgnoresNonClientHelloHandshakeMessages", testIgnoresNonClientHelloHandshakeMessages), - ("testIgnoresInvalidHandshakeLength", testIgnoresInvalidHandshakeLength), - ("testIgnoresInvalidCipherSuiteLength", testIgnoresInvalidCipherSuiteLength), - ("testIgnoresInvalidCompressionLength", testIgnoresInvalidCompressionLength), - ("testIgnoresInvalidExtensionLength", testIgnoresInvalidExtensionLength), - ("testIgnoresInvalidIndividualExtensionLength", testIgnoresInvalidIndividualExtensionLength), - ("testIgnoresUnknownNameType", testIgnoresUnknownNameType), - ("testIgnoresInvalidNameLength", testIgnoresInvalidNameLength), - ("testIgnoresInvalidNameExtensionLength", testIgnoresInvalidNameExtensionLength), - ("testLudicrouslyTruncatedPacket", testLudicrouslyTruncatedPacket), - ("testFuzzingInputOne", testFuzzingInputOne), - ] - } -} - diff --git a/Tests/NIOTestUtilsTests/ByteToMessageDecoderVerifierTest+XCTest.swift b/Tests/NIOTestUtilsTests/ByteToMessageDecoderVerifierTest+XCTest.swift deleted file mode 100644 index 2c5356ef..00000000 --- a/Tests/NIOTestUtilsTests/ByteToMessageDecoderVerifierTest+XCTest.swift +++ /dev/null @@ -1,37 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2017-2021 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 -// -//===----------------------------------------------------------------------===// -// -// ByteToMessageDecoderVerifierTest+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 ByteToMessageDecoderVerifierTest { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (ByteToMessageDecoderVerifierTest) -> () throws -> Void)] { - return [ - ("testWrongResults", testWrongResults), - ("testNoOutputWhenWeShouldHaveOutput", testNoOutputWhenWeShouldHaveOutput), - ("testOutputWhenWeShouldNotProduceOutput", testOutputWhenWeShouldNotProduceOutput), - ("testLeftovers", testLeftovers), - ] - } -} - diff --git a/Tests/NIOTestUtilsTests/EventCounterHandlerTest+XCTest.swift b/Tests/NIOTestUtilsTests/EventCounterHandlerTest+XCTest.swift deleted file mode 100644 index 5f86f3ad..00000000 --- a/Tests/NIOTestUtilsTests/EventCounterHandlerTest+XCTest.swift +++ /dev/null @@ -1,44 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2019-2021 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 -// -//===----------------------------------------------------------------------===// -// -// EventCounterHandlerTest+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 EventCounterHandlerTest { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (EventCounterHandlerTest) -> () throws -> Void)] { - return [ - ("testNothingButEmbeddedChannelInit", testNothingButEmbeddedChannelInit), - ("testNothing", testNothing), - ("testInboundWrite", testInboundWrite), - ("testOutboundWrite", testOutboundWrite), - ("testConnectChannel", testConnectChannel), - ("testBindChannel", testBindChannel), - ("testConnectAndCloseChannel", testConnectAndCloseChannel), - ("testError", testError), - ("testEventsWithoutArguments", testEventsWithoutArguments), - ("testInboundUserEvent", testInboundUserEvent), - ("testOutboundUserEvent", testOutboundUserEvent), - ] - } -} - diff --git a/Tests/NIOTestUtilsTests/NIOHTTP1TestServerTest+XCTest.swift b/Tests/NIOTestUtilsTests/NIOHTTP1TestServerTest+XCTest.swift deleted file mode 100644 index 6cab56a8..00000000 --- a/Tests/NIOTestUtilsTests/NIOHTTP1TestServerTest+XCTest.swift +++ /dev/null @@ -1,41 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2017-2021 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 -// -//===----------------------------------------------------------------------===// -// -// NIOHTTP1TestServerTest+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 NIOHTTP1TestServerTest { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (NIOHTTP1TestServerTest) -> () throws -> Void)] { - return [ - ("testTheExampleInTheDocs", testTheExampleInTheDocs), - ("testSimpleRequest", testSimpleRequest), - ("testConcurrentRequests", testConcurrentRequests), - ("testTestWebServerCanBeReleased", testTestWebServerCanBeReleased), - ("testStopClosesAcceptedChannel", testStopClosesAcceptedChannel), - ("testReceiveAndVerify", testReceiveAndVerify), - ("testReceive", testReceive), - ("testReceiveAndVerifyWrongPart", testReceiveAndVerifyWrongPart), - ] - } -} - diff --git a/Tests/NIOTests/NIOTests+XCTest.swift b/Tests/NIOTests/NIOTests+XCTest.swift deleted file mode 100644 index 5093e4fc..00000000 --- a/Tests/NIOTests/NIOTests+XCTest.swift +++ /dev/null @@ -1,34 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2017-2021 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 -// -//===----------------------------------------------------------------------===// -// -// NIOTests+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 NIOTests { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (NIOTests) -> () throws -> Void)] { - return [ - ("testCanUseTheVariousNIOTypes", testCanUseTheVariousNIOTypes), - ] - } -} - diff --git a/Tests/NIOWebSocketTests/Base64Test+XCTest.swift b/Tests/NIOWebSocketTests/Base64Test+XCTest.swift deleted file mode 100644 index 66b4b567..00000000 --- a/Tests/NIOWebSocketTests/Base64Test+XCTest.swift +++ /dev/null @@ -1,36 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2017-2021 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 -// -//===----------------------------------------------------------------------===// -// -// Base64Test+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 Base64Test { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (Base64Test) -> () throws -> Void)] { - return [ - ("testEncodeEmptyData", testEncodeEmptyData), - ("testBase64EncodingArrayOfNulls", testBase64EncodingArrayOfNulls), - ("testBase64EncodingAllTheBytesSequentially", testBase64EncodingAllTheBytesSequentially), - ] - } -} - diff --git a/Tests/NIOWebSocketTests/NIOWebSocketClientUpgraderTests+XCTest.swift b/Tests/NIOWebSocketTests/NIOWebSocketClientUpgraderTests+XCTest.swift deleted file mode 100644 index ea1afb92..00000000 --- a/Tests/NIOWebSocketTests/NIOWebSocketClientUpgraderTests+XCTest.swift +++ /dev/null @@ -1,35 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2017-2021 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 -// -//===----------------------------------------------------------------------===// -// -// NIOWebSocketClientUpgraderTests+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 NIOWebSocketClientUpgraderTests { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (NIOWebSocketClientUpgraderTests) -> () throws -> Void)] { - return [ - ("testRandomRequestKey", testRandomRequestKey), - ("testRandomRequestKeyWithSystemRandomNumberGenerator", testRandomRequestKeyWithSystemRandomNumberGenerator), - ] - } -} - diff --git a/Tests/NIOWebSocketTests/NIOWebSocketFrameAggregatorTests+XCTest.swift b/Tests/NIOWebSocketTests/NIOWebSocketFrameAggregatorTests+XCTest.swift deleted file mode 100644 index 58dc9e9a..00000000 --- a/Tests/NIOWebSocketTests/NIOWebSocketFrameAggregatorTests+XCTest.swift +++ /dev/null @@ -1,44 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2021 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 -// -//===----------------------------------------------------------------------===// -// -// NIOWebSocketFrameAggregatorTests+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 NIOWebSocketFrameAggregatorTests { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (NIOWebSocketFrameAggregatorTests) -> () throws -> Void)] { - return [ - ("testEmptyButFinalFrameIsForwardedEvenIfMinNonFinalFragmentSizeIsGreaterThanZero", testEmptyButFinalFrameIsForwardedEvenIfMinNonFinalFragmentSizeIsGreaterThanZero), - ("testTooSmallAndNonFinalFrameThrows", testTooSmallAndNonFinalFrameThrows), - ("testTooBigFrameThrows", testTooBigFrameThrows), - ("testTooBigAccumulatedFrameThrows", testTooBigAccumulatedFrameThrows), - ("testTooManyFramesThrow", testTooManyFramesThrow), - ("testAlmostTooManyFramesDoNotThrow", testAlmostTooManyFramesDoNotThrow), - ("testTextFrameIsStillATextFrameAfterAggregation", testTextFrameIsStillATextFrameAfterAggregation), - ("testPingFrameIsForwarded", testPingFrameIsForwarded), - ("testPongFrameIsForwarded", testPongFrameIsForwarded), - ("testCloseConnectionFrameIsForwarded", testCloseConnectionFrameIsForwarded), - ("testFrameAggregationWithMask", testFrameAggregationWithMask), - ] - } -} - diff --git a/Tests/NIOWebSocketTests/WebSocketClientEndToEndTests+XCTest.swift b/Tests/NIOWebSocketTests/WebSocketClientEndToEndTests+XCTest.swift deleted file mode 100644 index 55938294..00000000 --- a/Tests/NIOWebSocketTests/WebSocketClientEndToEndTests+XCTest.swift +++ /dev/null @@ -1,39 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2017-2021 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 -// -//===----------------------------------------------------------------------===// -// -// WebSocketClientEndToEndTests+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 WebSocketClientEndToEndTests { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (WebSocketClientEndToEndTests) -> () throws -> Void)] { - return [ - ("testSimpleUpgradeSucceeds", testSimpleUpgradeSucceeds), - ("testRejectUpgradeIfMissingAcceptKey", testRejectUpgradeIfMissingAcceptKey), - ("testRejectUpgradeIfIncorrectAcceptKey", testRejectUpgradeIfIncorrectAcceptKey), - ("testRejectUpgradeIfNotWebsocket", testRejectUpgradeIfNotWebsocket), - ("testSendAFewFrames", testSendAFewFrames), - ("testReceiveAFewFrames", testReceiveAFewFrames), - ] - } -} - diff --git a/Tests/NIOWebSocketTests/WebSocketFrameDecoderTest+XCTest.swift b/Tests/NIOWebSocketTests/WebSocketFrameDecoderTest+XCTest.swift deleted file mode 100644 index 5e211049..00000000 --- a/Tests/NIOWebSocketTests/WebSocketFrameDecoderTest+XCTest.swift +++ /dev/null @@ -1,55 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2018-2021 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 -// -//===----------------------------------------------------------------------===// -// -// WebSocketFrameDecoderTest+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 WebSocketFrameDecoderTest { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (WebSocketFrameDecoderTest) -> () throws -> Void)] { - return [ - ("testFramesWithoutBodies", testFramesWithoutBodies), - ("testFramesWithExtensionDataDontRoundTrip", testFramesWithExtensionDataDontRoundTrip), - ("testFramesWithExtensionDataCanBeRecovered", testFramesWithExtensionDataCanBeRecovered), - ("testFramesWithReservedBitsSetRoundTrip", testFramesWithReservedBitsSetRoundTrip), - ("testFramesWith16BitLengthsRoundTrip", testFramesWith16BitLengthsRoundTrip), - ("testFramesWith64BitLengthsRoundTrip", testFramesWith64BitLengthsRoundTrip), - ("testMaskedFramesRoundTripWithMaskingIntact", testMaskedFramesRoundTripWithMaskingIntact), - ("testMaskedFramesRoundTripWithMaskingIntactEvenWithExtensions", testMaskedFramesRoundTripWithMaskingIntactEvenWithExtensions), - ("testDecoderRejectsOverlongFrames", testDecoderRejectsOverlongFrames), - ("testDecoderRejectsFragmentedControlFrames", testDecoderRejectsFragmentedControlFrames), - ("testDecoderRejectsMultibyteControlFrameLengths", testDecoderRejectsMultibyteControlFrameLengths), - ("testIgnoresFurtherDataAfterRejectedFrame", testIgnoresFurtherDataAfterRejectedFrame), - ("testClosingSynchronouslyOnChannelRead", testClosingSynchronouslyOnChannelRead), - ("testDecoderRejectsOverlongFramesWithNoAutomaticErrorHandling", testDecoderRejectsOverlongFramesWithNoAutomaticErrorHandling), - ("testDecoderRejectsFragmentedControlFramesWithNoAutomaticErrorHandling", testDecoderRejectsFragmentedControlFramesWithNoAutomaticErrorHandling), - ("testDecoderRejectsMultibyteControlFrameLengthsWithNoAutomaticErrorHandling", testDecoderRejectsMultibyteControlFrameLengthsWithNoAutomaticErrorHandling), - ("testIgnoresFurtherDataAfterRejectedFrameWithNoAutomaticErrorHandling", testIgnoresFurtherDataAfterRejectedFrameWithNoAutomaticErrorHandling), - ("testDecoderRejectsOverlongFramesWithSeparateErrorHandling", testDecoderRejectsOverlongFramesWithSeparateErrorHandling), - ("testDecoderRejectsFragmentedControlFramesWithSeparateErrorHandling", testDecoderRejectsFragmentedControlFramesWithSeparateErrorHandling), - ("testDecoderRejectsMultibyteControlFrameLengthsWithSeparateErrorHandling", testDecoderRejectsMultibyteControlFrameLengthsWithSeparateErrorHandling), - ("testIgnoresFurtherDataAfterRejectedFrameWithSeparateErrorHandling", testIgnoresFurtherDataAfterRejectedFrameWithSeparateErrorHandling), - ("testErrorHandlerDoesNotSwallowRandomErrors", testErrorHandlerDoesNotSwallowRandomErrors), - ] - } -} - diff --git a/Tests/NIOWebSocketTests/WebSocketFrameEncoderTest+XCTest.swift b/Tests/NIOWebSocketTests/WebSocketFrameEncoderTest+XCTest.swift deleted file mode 100644 index 832ea8e6..00000000 --- a/Tests/NIOWebSocketTests/WebSocketFrameEncoderTest+XCTest.swift +++ /dev/null @@ -1,47 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2017-2021 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 -// -//===----------------------------------------------------------------------===// -// -// WebSocketFrameEncoderTest+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 WebSocketFrameEncoderTest { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (WebSocketFrameEncoderTest) -> () throws -> Void)] { - return [ - ("testBasicFrameEncoding", testBasicFrameEncoding), - ("test16BitFrameLength", test16BitFrameLength), - ("test64BitFrameLength", test64BitFrameLength), - ("testEncodesEachReservedBitProperly", testEncodesEachReservedBitProperly), - ("testEncodesExtensionDataCorrectly", testEncodesExtensionDataCorrectly), - ("testMasksDataCorrectly", testMasksDataCorrectly), - ("testFrameEncoderReusesHeaderBufferWherePossible", testFrameEncoderReusesHeaderBufferWherePossible), - ("testFrameEncoderCanPrependHeaderToApplicationBuffer", testFrameEncoderCanPrependHeaderToApplicationBuffer), - ("testFrameEncoderCanPrependHeaderToExtensionBuffer", testFrameEncoderCanPrependHeaderToExtensionBuffer), - ("testFrameEncoderCanPrependMediumHeader", testFrameEncoderCanPrependMediumHeader), - ("testFrameEncoderCanPrependLargeHeader", testFrameEncoderCanPrependLargeHeader), - ("testFrameEncoderFailsToPrependHeaderWithInsufficientSpace", testFrameEncoderFailsToPrependHeaderWithInsufficientSpace), - ("testFrameEncoderFailsToPrependMediumHeaderWithInsufficientSpace", testFrameEncoderFailsToPrependMediumHeaderWithInsufficientSpace), - ("testFrameEncoderFailsToPrependLargeHeaderWithInsufficientSpace", testFrameEncoderFailsToPrependLargeHeaderWithInsufficientSpace), - ] - } -} - diff --git a/Tests/NIOWebSocketTests/WebSocketMaskingKeyTests+XCTest.swift b/Tests/NIOWebSocketTests/WebSocketMaskingKeyTests+XCTest.swift deleted file mode 100644 index 81cd8c2a..00000000 --- a/Tests/NIOWebSocketTests/WebSocketMaskingKeyTests+XCTest.swift +++ /dev/null @@ -1,35 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2017-2021 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 -// -//===----------------------------------------------------------------------===// -// -// WebSocketMaskingKeyTests+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 WebSocketMaskingKeyTests { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (WebSocketMaskingKeyTests) -> () throws -> Void)] { - return [ - ("testRandomMaskingKey", testRandomMaskingKey), - ("testRandomMaskingKeyIsNotAlwaysZero", testRandomMaskingKeyIsNotAlwaysZero), - ] - } -} - diff --git a/Tests/NIOWebSocketTests/WebSocketServerEndToEndTests+XCTest.swift b/Tests/NIOWebSocketTests/WebSocketServerEndToEndTests+XCTest.swift deleted file mode 100644 index 3a16f162..00000000 --- a/Tests/NIOWebSocketTests/WebSocketServerEndToEndTests+XCTest.swift +++ /dev/null @@ -1,46 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2017-2021 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 -// -//===----------------------------------------------------------------------===// -// -// WebSocketServerEndToEndTests+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 WebSocketServerEndToEndTests { - - @available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings") - static var allTests : [(String, (WebSocketServerEndToEndTests) -> () throws -> Void)] { - return [ - ("testBasicUpgradeDance", testBasicUpgradeDance), - ("testUpgradeWithProtocolName", testUpgradeWithProtocolName), - ("testCanRejectUpgrade", testCanRejectUpgrade), - ("testCanDelayAcceptingUpgrade", testCanDelayAcceptingUpgrade), - ("testRequiresVersion13", testRequiresVersion13), - ("testRequiresVersionHeader", testRequiresVersionHeader), - ("testRequiresKeyHeader", testRequiresKeyHeader), - ("testUpgradeMayAddCustomHeaders", testUpgradeMayAddCustomHeaders), - ("testMayRegisterMultipleWebSocketEndpoints", testMayRegisterMultipleWebSocketEndpoints), - ("testSendAFewFrames", testSendAFewFrames), - ("testMaxFrameSize", testMaxFrameSize), - ("testAutomaticErrorHandling", testAutomaticErrorHandling), - ("testNoAutomaticErrorHandling", testNoAutomaticErrorHandling), - ] - } -} - diff --git a/docker/docker-compose.2004.55.yaml b/docker/docker-compose.2004.55.yaml deleted file mode 100644 index 211bfb14..00000000 --- a/docker/docker-compose.2004.55.yaml +++ /dev/null @@ -1,85 +0,0 @@ -version: "3" - -services: - - runtime-setup: - image: swift-nio:20.04-5.5 - build: - args: - ubuntu_version: "focal" - swift_version: "5.5" - - unit-tests: - image: swift-nio:20.04-5.5 - - integration-tests: - image: swift-nio:20.04-5.5 - - documentation-check: - image: swift-nio:20.04-5.5 - - test: - image: swift-nio:20.04-5.5 - environment: - - MAX_ALLOCS_ALLOWED_10000000_asyncsequenceproducer=24 - - MAX_ALLOCS_ALLOWED_1000000_asyncwriter=1000050 - - MAX_ALLOCS_ALLOWED_1000_addHandlers=44050 - - MAX_ALLOCS_ALLOWED_1000_addHandlers_sync=38050 - - MAX_ALLOCS_ALLOWED_1000_addRemoveHandlers_handlercontext=8050 - - MAX_ALLOCS_ALLOWED_1000_addRemoveHandlers_handlername=8050 - - MAX_ALLOCS_ALLOWED_1000_addRemoveHandlers_handlertype=8050 - - MAX_ALLOCS_ALLOWED_1000_autoReadGetAndSet=19050 - - MAX_ALLOCS_ALLOWED_1000_autoReadGetAndSet_sync=0 - - MAX_ALLOCS_ALLOWED_1000_copying_bytebufferview_to_array=1050 - - MAX_ALLOCS_ALLOWED_1000_copying_circularbuffer_to_array=1050 - - MAX_ALLOCS_ALLOWED_1000_getHandlers=8050 - - MAX_ALLOCS_ALLOWED_1000_getHandlers_sync=35 - - MAX_ALLOCS_ALLOWED_1000_reqs_1_conn=26400 - - MAX_ALLOCS_ALLOWED_1000_tcpbootstraps=4050 - - MAX_ALLOCS_ALLOWED_1000_tcpconnections=155050 - - MAX_ALLOCS_ALLOWED_1000_udp_reqs=6050 - - MAX_ALLOCS_ALLOWED_1000_udpbootstraps=2050 - - MAX_ALLOCS_ALLOWED_1000_udpconnections=80050 - - MAX_ALLOCS_ALLOWED_1_reqs_1000_conn=401000 - - MAX_ALLOCS_ALLOWED_bytebuffer_lots_of_rw=2050 - - MAX_ALLOCS_ALLOWED_creating_10000_headers=0 - - MAX_ALLOCS_ALLOWED_decode_1000_ws_frames=2050 - - MAX_ALLOCS_ALLOWED_encode_1000_ws_frames_holding_buffer=3 - - MAX_ALLOCS_ALLOWED_encode_1000_ws_frames_holding_buffer_with_mask=2050 - - MAX_ALLOCS_ALLOWED_encode_1000_ws_frames_holding_buffer_with_space=3 - - MAX_ALLOCS_ALLOWED_encode_1000_ws_frames_holding_buffer_with_space_with_mask=2050 - - MAX_ALLOCS_ALLOWED_encode_1000_ws_frames_new_buffer=3050 - - MAX_ALLOCS_ALLOWED_encode_1000_ws_frames_new_buffer_with_mask=5050 - - MAX_ALLOCS_ALLOWED_encode_1000_ws_frames_new_buffer_with_space=3050 - - MAX_ALLOCS_ALLOWED_encode_1000_ws_frames_new_buffer_with_space_with_mask=5050 - - MAX_ALLOCS_ALLOWED_execute_hop_10000_tasks=0 - - MAX_ALLOCS_ALLOWED_future_erase_result=4050 - - MAX_ALLOCS_ALLOWED_future_lots_of_callbacks=54050 - - MAX_ALLOCS_ALLOWED_get_100000_headers_canonical_form=700050 - - MAX_ALLOCS_ALLOWED_get_100000_headers_canonical_form_trimming_whitespace=700050 - - MAX_ALLOCS_ALLOWED_get_100000_headers_canonical_form_trimming_whitespace_from_long_string=700050 - - MAX_ALLOCS_ALLOWED_get_100000_headers_canonical_form_trimming_whitespace_from_short_string=700050 - - MAX_ALLOCS_ALLOWED_modifying_1000_circular_buffer_elements=0 - - MAX_ALLOCS_ALLOWED_modifying_byte_buffer_view=2050 - - MAX_ALLOCS_ALLOWED_ping_pong_1000_reqs_1_conn=342 - - MAX_ALLOCS_ALLOWED_read_10000_chunks_from_file=170050 - - MAX_ALLOCS_ALLOWED_schedule_10000_tasks=60100 - - MAX_ALLOCS_ALLOWED_schedule_and_run_10000_tasks=60050 - - MAX_ALLOCS_ALLOWED_scheduling_10000_executions=89 - - MAX_ALLOCS_ALLOWED_udp_1000_reqs_1_conn=6200 - - MAX_ALLOCS_ALLOWED_udp_1_reqs_1000_conn=163050 - - FORCE_TEST_DISCOVERY=--enable-test-discovery - # - WARN_AS_ERROR_ARG=-Xswiftc -warnings-as-errors - # - SANITIZER_ARG=--sanitize=thread # TSan broken still - - performance-test: - image: swift-nio:20.04-5.5 - - shell: - image: swift-nio:20.04-5.5 - - echo: - image: swift-nio:20.04-5.5 - - http: - image: swift-nio:20.04-5.5 diff --git a/scripts/generate_linux_tests.rb b/scripts/generate_linux_tests.rb deleted file mode 100755 index 4794f984..00000000 --- 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 ef493221..0422938c 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][890123]/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 :).