Drop Swift 5.5 (#2406)

* Drop Swift 5.5

* Use `swift-atomics` 1.1.0 with `Sendable` adoption
This commit is contained in:
David Nadoba 2023-04-17 09:40:35 +02:00 committed by GitHub
parent a2fd8ad077
commit 6720612111
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
144 changed files with 32 additions and 5750 deletions

View File

@ -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

View File

@ -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

View File

@ -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"),
],

View File

@ -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
)

View File

@ -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] <br> SwiftNIO core | `from: "2.0.0"`
[https://github.com/apple/swift-nio-ssl][repo-nio-ssl] <br> 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)

View File

@ -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.

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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<OutboundOut: Sendable>: Sendable {
self._outboundWriter.finish()
}
}
#endif

View File

@ -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

View File

@ -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

View File

@ -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 }

View File

@ -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

View File

@ -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

View File

@ -13,7 +13,6 @@
//===----------------------------------------------------------------------===//
extension EventLoopFuture {
#if swift(>=5.6)
/// When the current `EventLoopFuture<Value>` 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<NewValue>(_ callback: @escaping @Sendable (Value, EventLoop) -> EventLoopFuture<NewValue>) -> EventLoopFuture<NewValue> {
self._flatMapWithEventLoop(callback)
}
@usableFromInline typealias FlatMapWithEventLoopCallback<NewValue> = @Sendable (Value, EventLoop) -> EventLoopFuture<NewValue>
#else
/// When the current `EventLoopFuture<Value>` 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<Value>` 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<NewValue> in
/// eventLoop.makeSucceededFuture(t + 1)
/// }
/// d2.whenSuccess { u in
/// NSLog("Result of second request: \(u)")
/// }
/// ```
///
/// Note: In a sense, the `EventLoopFuture<NewValue>` 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<NewValue>(_ callback: @escaping (Value, EventLoop) -> EventLoopFuture<NewValue>) -> EventLoopFuture<NewValue> {
self._flatMapWithEventLoop(callback)
}
@usableFromInline typealias FlatMapWithEventLoopCallback<NewValue> = (Value, EventLoop) -> EventLoopFuture<NewValue>
#endif
@inlinable
func _flatMapWithEventLoop<NewValue>(_ callback: @escaping FlatMapWithEventLoopCallback<NewValue>) -> EventLoopFuture<NewValue> {
let next = EventLoopPromise<NewValue>.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<Value>` is in an error state, run the provided callback, which
/// may recover from the error by returning an `EventLoopFuture<NewValue>`. 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<Value>) -> EventLoopFuture<Value> {
self._flatMapErrorWithEventLoop(callback)
}
@usableFromInline typealias FlatMapWithErrorWithEventLoopCallback = @Sendable (Error, EventLoop) -> EventLoopFuture<Value>
#else
/// When the current `EventLoopFuture<Value>` is in an error state, run the provided callback, which
/// may recover from the error by returning an `EventLoopFuture<NewValue>`. 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<Value>) -> EventLoopFuture<Value> {
self._flatMapErrorWithEventLoop(callback)
}
@usableFromInline typealias FlatMapWithErrorWithEventLoopCallback = (Error, EventLoop) -> EventLoopFuture<Value>
#endif
@inlinable
func _flatMapErrorWithEventLoop(_ callback: @escaping FlatMapWithErrorWithEventLoopCallback) -> EventLoopFuture<Value> {
let next = EventLoopPromise<Value>.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<OtherValue> = @Sendable (Value, OtherValue, EventLoop) -> EventLoopFuture<Value>
#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<NewValue>` 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<OtherValue>(
_ futures: [EventLoopFuture<OtherValue>],
with combiningFunction: @escaping (Value, OtherValue, EventLoop) -> EventLoopFuture<Value>
) -> EventLoopFuture<Value> {
self._foldWithEventLoop(futures, with: combiningFunction)
}
@usableFromInline typealias FoldWithEventLoop<OtherValue> = (Value, OtherValue, EventLoop) -> EventLoopFuture<Value>
#endif
@inlinable
func _foldWithEventLoop<OtherValue>(
_ futures: [EventLoopFuture<OtherValue>],
with combiningFunction: @escaping FoldWithEventLoop<OtherValue>
) -> EventLoopFuture<Value> {
func fold0(eventLoop: EventLoop) -> EventLoopFuture<Value> {
let body = futures.reduce(self) { (f1: EventLoopFuture<Value>, f2: EventLoopFuture<OtherValue>) -> EventLoopFuture<Value> in
let newFuture = f1.and(f2).flatMap { (args: (Value, OtherValue)) -> EventLoopFuture<Value> 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 {

View File

@ -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.

View File

@ -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 {

View File

@ -257,10 +257,8 @@ public struct NIOAny {
}
}
#if swift(>=5.6)
@available(*, unavailable)
extension NIOAny: Sendable {}
#endif
extension NIOAny: CustomStringConvertible {
public var description: String {

View File

@ -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.

View File

@ -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

View File

@ -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 }

View File

@ -848,7 +848,5 @@ extension EmbeddedChannel {
}
}
#if swift(>=5.6)
@available(*, unavailable)
extension EmbeddedChannel.SynchronousOptions: Sendable {}
#endif

View File

@ -744,10 +744,8 @@ public final class HTTPDecoder<In, Out>: 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 {

View File

@ -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) {

View File

@ -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

View File

@ -471,7 +471,5 @@ public final class HTTPServerPipelineHandler: ChannelDuplexHandler, RemovableCha
}
}
#if swift(>=5.6)
@available(*, unavailable)
extension HTTPServerPipelineHandler: Sendable {}
#endif

View File

@ -72,7 +72,5 @@ public final class HTTPServerProtocolErrorHandler: ChannelDuplexHandler, Removab
}
}
#if swift(>=5.6)
@available(*, unavailable)
extension HTTPServerProtocolErrorHandler: Sendable {}
#endif

View File

@ -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

View File

@ -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<Void>) -> EventLoopFuture<Void> {
@ -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

View File

@ -191,7 +191,5 @@ public final class NIORawSocketBootstrap {
}
}
#if swift(>=5.6)
@available(*, unavailable)
extension NIORawSocketBootstrap: Sendable {}
#endif

View File

@ -141,7 +141,5 @@ public final class ApplicationProtocolNegotiationHandler: ChannelInboundHandler,
}
}
#if swift(>=5.6)
@available(*, unavailable)
extension ApplicationProtocolNegotiationHandler: Sendable {}
#endif

View File

@ -427,7 +427,5 @@ public final class SNIHandler: ByteToMessageDecoder {
}
}
#if swift(>=5.6)
@available(*, unavailable)
extension SNIHandler: Sendable {}
#endif

View File

@ -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<Int>(0)
private let _channelUnregisteredCalls = ManagedAtomic<Int>(0)
private let _channelActiveCalls = ManagedAtomic<Int>(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

View File

@ -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

View File

@ -137,7 +137,5 @@ public final class NIOWebSocketFrameAggregator: ChannelInboundHandler {
}
}
#if swift(>=5.6)
@available(*, unavailable)
extension NIOWebSocketFrameAggregator: Sendable {}
#endif

View File

@ -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 {

View File

@ -270,7 +270,5 @@ public final class WebSocketFrameDecoder: ByteToMessageDecoder {
}
}
#if swift(>=5.6)
@available(*, unavailable)
extension WebSocketFrameDecoder: Sendable {}
#endif

View File

@ -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 {

View File

@ -43,7 +43,5 @@ public final class WebSocketProtocolErrorHandler: ChannelInboundHandler {
}
}
#if swift(>=5.6)
@available(*, unavailable)
extension WebSocketProtocolErrorHandler: Sendable {}
#endif

View File

@ -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

View File

@ -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),
]
}
}

View File

@ -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),
]
}
}

View File

@ -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
}
}

View File

@ -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),
]
}
}

View File

@ -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),
]
}
}

View File

@ -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),
]
}
}

View File

@ -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),
]
}
}

View File

@ -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),
]
}
}

View File

@ -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),
]
}
}

View File

@ -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),
]
}
}

View File

@ -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),
]
}
}

View File

@ -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),
]
}
}

View File

@ -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),
]
}
}

View File

@ -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),
]
}
}

View File

@ -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),
]
}
}

View File

@ -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),
]
}
}

View File

@ -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),
]
}
}

View File

@ -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),
]
}
}

View File

@ -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),
]
}
}

View File

@ -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),
]
}
}

View File

@ -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),
]
}
}

View File

@ -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),
]
}
}

View File

@ -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),
]
}
}

View File

@ -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),
]
}
}

View File

@ -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),
]
}
}

View File

@ -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),
]
}
}

View File

@ -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),
]
}
}

View File

@ -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 { }

View File

@ -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),
]
}
}

View File

@ -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),
]
}
}

View File

@ -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),
]
}
}

View File

@ -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),
]
}
}

View File

@ -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),
]
}
}

View File

@ -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),
]
}
}

View File

@ -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),
]
}
}

View File

@ -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),
]
}
}

View File

@ -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),
]
}
}

View File

@ -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),
]
}
}

View File

@ -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),
]
}
}

View File

@ -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),
]
}
}

View File

@ -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),
]
}
}

View File

@ -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),
]
}
}

View File

@ -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),
]
}
}

View File

@ -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),
]
}
}

View File

@ -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),
]
}
}

View File

@ -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),
]
}
}

View File

@ -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),
]
}
}

View File

@ -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),
]
}
}

View File

@ -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),
]
}
}

View File

@ -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),
]
}
}

View File

@ -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),
]
}
}

View File

@ -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),
]
}
}

View File

@ -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),
]
}
}

View File

@ -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),
]
}
}

View File

@ -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),
]
}
}

View File

@ -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),
]
}
}

View File

@ -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),
]
}
}

View File

@ -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),
]
}
}

View File

@ -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),
]
}
}

Some files were not shown because too many files have changed in this diff Show More