Skip to content

Commit

Permalink
update generated test script from swift-nio (#188)
Browse files Browse the repository at this point in the history
The newer version of the script automatically calculates accurate
copyright date statements.
  • Loading branch information
rnro authored Dec 2, 2022
1 parent b89549b commit 54def83
Show file tree
Hide file tree
Showing 28 changed files with 157 additions and 60 deletions.
69 changes: 40 additions & 29 deletions Tests/LinuxMain.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// This source file is part of the SwiftNIO open source project
//
// Copyright (c) 2017-2018 Apple Inc. and the SwiftNIO project authors
// Copyright (c) 2018-2022 Apple Inc. and the SwiftNIO project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
Expand All @@ -22,36 +22,47 @@ import XCTest
/// Do NOT edit this file directly as it will be regenerated automatically when needed.
///

#if os(Linux) || os(FreeBSD)
#if !compiler(>=5.5)
#if os(Linux) || os(FreeBSD) || os(Android)
@testable import NIOExtrasTests
@testable import NIOHTTPCompressionTests
@testable import NIOSOCKSTests

XCTMain([
testCase(ClientGreetingTests.allTests),
testCase(ClientRequestTests.allTests),
testCase(ClientStateMachineTests.allTests),
testCase(DebugInboundEventsHandlerTest.allTests),
testCase(DebugOutboundEventsHandlerTest.allTests),
testCase(FixedLengthFrameDecoderTest.allTests),
testCase(HTTPRequestCompressorTest.allTests),
testCase(HTTPRequestDecompressorTest.allTests),
testCase(HTTPResponseCompressorTest.allTests),
testCase(HTTPResponseDecompressorTest.allTests),
testCase(HelperTests.allTests),
testCase(JSONRPCFramingContentLengthHeaderDecoderTests.allTests),
testCase(JSONRPCFramingContentLengthHeaderEncoderTests.allTests),
testCase(LengthFieldBasedFrameDecoderTest.allTests),
testCase(LengthFieldPrependerTest.allTests),
testCase(LineBasedFrameDecoderTest.allTests),
testCase(MethodSelectionTests.allTests),
testCase(PCAPRingBufferTest.allTests),
testCase(QuiescingHelperTest.allTests),
testCase(RequestResponseHandlerTest.allTests),
testCase(SOCKSServerHandlerTests.allTests),
testCase(ServerResponseTests.allTests),
testCase(ServerStateMachineTests.allTests),
testCase(SocksClientHandlerTests.allTests),
testCase(WritePCAPHandlerTest.allTests),
])
@available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings")
@main
class LinuxMainRunner {
@available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings")
static func main() {
XCTMain([
testCase(ClientGreetingTests.allTests),
testCase(ClientRequestTests.allTests),
testCase(ClientStateMachineTests.allTests),
testCase(DebugInboundEventsHandlerTest.allTests),
testCase(DebugOutboundEventsHandlerTest.allTests),
testCase(FixedLengthFrameDecoderTest.allTests),
testCase(HTTPRequestCompressorTest.allTests),
testCase(HTTPRequestDecompressorTest.allTests),
testCase(HTTPResponseCompressorTest.allTests),
testCase(HTTPResponseDecompressorTest.allTests),
testCase(HelperTests.allTests),
testCase(JSONRPCFramingContentLengthHeaderDecoderTests.allTests),
testCase(JSONRPCFramingContentLengthHeaderEncoderTests.allTests),
testCase(LengthFieldBasedFrameDecoderTest.allTests),
testCase(LengthFieldPrependerTest.allTests),
testCase(LineBasedFrameDecoderTest.allTests),
testCase(MethodSelectionTests.allTests),
testCase(PCAPRingBufferTest.allTests),
testCase(QuiescingHelperTest.allTests),
testCase(RequestResponseHandlerTest.allTests),
testCase(SOCKSServerHandlerTests.allTests),
testCase(ServerResponseTests.allTests),
testCase(ServerStateMachineTests.allTests),
testCase(SocksClientHandlerTests.allTests),
testCase(WritePCAPHandlerTest.allTests),
])
}
}
#endif
#else
#error("on Swift 5.5 and newer, --enable-test-discovery is required")
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// This source file is part of the SwiftNIO open source project
//
// Copyright (c) 2017-2018 Apple Inc. and the SwiftNIO project authors
// Copyright (c) 2018-2022 Apple Inc. and the SwiftNIO project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
Expand All @@ -24,6 +24,7 @@ import XCTest

extension DebugInboundEventsHandlerTest {

@available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings")
static var allTests : [(String, (DebugInboundEventsHandlerTest) -> () throws -> Void)] {
return [
("testRegistered", testRegistered),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// This source file is part of the SwiftNIO open source project
//
// Copyright (c) 2017-2018 Apple Inc. and the SwiftNIO project authors
// Copyright (c) 2018-2022 Apple Inc. and the SwiftNIO project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
Expand All @@ -24,6 +24,7 @@ import XCTest

extension DebugOutboundEventsHandlerTest {

@available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings")
static var allTests : [(String, (DebugOutboundEventsHandlerTest) -> () throws -> Void)] {
return [
("testRegister", testRegister),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// This source file is part of the SwiftNIO open source project
//
// Copyright (c) 2017-2018 Apple Inc. and the SwiftNIO project authors
// Copyright (c) 2018-2022 Apple Inc. and the SwiftNIO project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
Expand All @@ -24,6 +24,7 @@ import XCTest

extension FixedLengthFrameDecoderTest {

@available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings")
static var allTests : [(String, (FixedLengthFrameDecoderTest) -> () throws -> Void)] {
return [
("testDecodeIfFewerBytesAreSent", testDecodeIfFewerBytesAreSent),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// This source file is part of the SwiftNIO open source project
//
// Copyright (c) 2017-2018 Apple Inc. and the SwiftNIO project authors
// Copyright (c) 2019-2022 Apple Inc. and the SwiftNIO project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
Expand All @@ -24,6 +24,7 @@ import XCTest

extension JSONRPCFramingContentLengthHeaderDecoderTests {

@available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings")
static var allTests : [(String, (JSONRPCFramingContentLengthHeaderDecoderTests) -> () throws -> Void)] {
return [
("testBasicMessage", testBasicMessage),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// This source file is part of the SwiftNIO open source project
//
// Copyright (c) 2017-2018 Apple Inc. and the SwiftNIO project authors
// Copyright (c) 2018-2022 Apple Inc. and the SwiftNIO project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
Expand All @@ -24,6 +24,7 @@ import XCTest

extension JSONRPCFramingContentLengthHeaderEncoderTests {

@available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings")
static var allTests : [(String, (JSONRPCFramingContentLengthHeaderEncoderTests) -> () throws -> Void)] {
return [
("testEmptyMessage", testEmptyMessage),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// This source file is part of the SwiftNIO open source project
//
// Copyright (c) 2017-2018 Apple Inc. and the SwiftNIO project authors
// Copyright (c) 2018-2022 Apple Inc. and the SwiftNIO project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
Expand All @@ -24,6 +24,7 @@ import XCTest

extension LengthFieldBasedFrameDecoderTest {

@available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings")
static var allTests : [(String, (LengthFieldBasedFrameDecoderTest) -> () throws -> Void)] {
return [
("testReadUInt32From3Bytes", testReadUInt32From3Bytes),
Expand Down
3 changes: 2 additions & 1 deletion Tests/NIOExtrasTests/LengthFieldPrependerTest+XCTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// This source file is part of the SwiftNIO open source project
//
// Copyright (c) 2017-2018 Apple Inc. and the SwiftNIO project authors
// Copyright (c) 2019-2022 Apple Inc. and the SwiftNIO project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
Expand All @@ -24,6 +24,7 @@ import XCTest

extension LengthFieldPrependerTest {

@available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings")
static var allTests : [(String, (LengthFieldPrependerTest) -> () throws -> Void)] {
return [
("testWrite3BytesOfUInt32Write", testWrite3BytesOfUInt32Write),
Expand Down
3 changes: 2 additions & 1 deletion Tests/NIOExtrasTests/LineBasedFrameDecoderTest+XCTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// This source file is part of the SwiftNIO open source project
//
// Copyright (c) 2017-2018 Apple Inc. and the SwiftNIO project authors
// Copyright (c) 2018-2022 Apple Inc. and the SwiftNIO project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
Expand All @@ -24,6 +24,7 @@ import XCTest

extension LineBasedFrameDecoderTest {

@available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings")
static var allTests : [(String, (LineBasedFrameDecoderTest) -> () throws -> Void)] {
return [
("testDecodeOneCharacterAtATime", testDecodeOneCharacterAtATime),
Expand Down
3 changes: 2 additions & 1 deletion Tests/NIOExtrasTests/PCAPRingBufferTest+XCTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// This source file is part of the SwiftNIO open source project
//
// Copyright (c) 2017-2018 Apple Inc. and the SwiftNIO project authors
// Copyright (c) 2018-2022 Apple Inc. and the SwiftNIO project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
Expand All @@ -24,6 +24,7 @@ import XCTest

extension PCAPRingBufferTest {

@available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings")
static var allTests : [(String, (PCAPRingBufferTest) -> () throws -> Void)] {
return [
("testNotLimited", testNotLimited),
Expand Down
3 changes: 2 additions & 1 deletion Tests/NIOExtrasTests/QuiescingHelperTest+XCTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// This source file is part of the SwiftNIO open source project
//
// Copyright (c) 2017-2018 Apple Inc. and the SwiftNIO project authors
// Copyright (c) 2018-2022 Apple Inc. and the SwiftNIO project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
Expand All @@ -24,6 +24,7 @@ import XCTest

extension QuiescingHelperTest {

@available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings")
static var allTests : [(String, (QuiescingHelperTest) -> () throws -> Void)] {
return [
("testShutdownIsImmediateWhenNoChannelsCollected", testShutdownIsImmediateWhenNoChannelsCollected),
Expand Down
3 changes: 2 additions & 1 deletion Tests/NIOExtrasTests/RequestResponseHandlerTest+XCTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// This source file is part of the SwiftNIO open source project
//
// Copyright (c) 2017-2018 Apple Inc. and the SwiftNIO project authors
// Copyright (c) 2018-2022 Apple Inc. and the SwiftNIO project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
Expand All @@ -24,6 +24,7 @@ import XCTest

extension RequestResponseHandlerTest {

@available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings")
static var allTests : [(String, (RequestResponseHandlerTest) -> () throws -> Void)] {
return [
("testSimpleRequestWorks", testSimpleRequestWorks),
Expand Down
3 changes: 2 additions & 1 deletion Tests/NIOExtrasTests/WritePCAPHandlerTest+XCTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// This source file is part of the SwiftNIO open source project
//
// Copyright (c) 2017-2018 Apple Inc. and the SwiftNIO project authors
// Copyright (c) 2019-2022 Apple Inc. and the SwiftNIO project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
Expand All @@ -24,6 +24,7 @@ import XCTest

extension WritePCAPHandlerTest {

@available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings")
static var allTests : [(String, (WritePCAPHandlerTest) -> () throws -> Void)] {
return [
("testConnectIssuesThreePacketsForIPv4", testConnectIssuesThreePacketsForIPv4),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// This source file is part of the SwiftNIO open source project
//
// Copyright (c) 2017-2018 Apple Inc. and the SwiftNIO project authors
// Copyright (c) 2020-2022 Apple Inc. and the SwiftNIO project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
Expand All @@ -24,6 +24,7 @@ import XCTest

extension HTTPRequestCompressorTest {

@available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings")
static var allTests : [(String, (HTTPRequestCompressorTest) -> () throws -> Void)] {
return [
("testGzipContentEncoding", testGzipContentEncoding),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// This source file is part of the SwiftNIO open source project
//
// Copyright (c) 2017-2018 Apple Inc. and the SwiftNIO project authors
// Copyright (c) 2018-2022 Apple Inc. and the SwiftNIO project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
Expand All @@ -24,6 +24,7 @@ import XCTest

extension HTTPRequestDecompressorTest {

@available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings")
static var allTests : [(String, (HTTPRequestDecompressorTest) -> () throws -> Void)] {
return [
("testDecompressionNoLimit", testDecompressionNoLimit),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// This source file is part of the SwiftNIO open source project
//
// Copyright (c) 2017-2018 Apple Inc. and the SwiftNIO project authors
// Copyright (c) 2019-2022 Apple Inc. and the SwiftNIO project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
Expand All @@ -24,6 +24,7 @@ import XCTest

extension HTTPResponseCompressorTest {

@available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings")
static var allTests : [(String, (HTTPResponseCompressorTest) -> () throws -> Void)] {
return [
("testCanCompressSimpleBodies", testCanCompressSimpleBodies),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// This source file is part of the SwiftNIO open source project
//
// Copyright (c) 2017-2018 Apple Inc. and the SwiftNIO project authors
// Copyright (c) 2018-2022 Apple Inc. and the SwiftNIO project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
Expand All @@ -24,6 +24,7 @@ import XCTest

extension HTTPResponseDecompressorTest {

@available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings")
static var allTests : [(String, (HTTPResponseDecompressorTest) -> () throws -> Void)] {
return [
("testDecompressionNoLimit", testDecompressionNoLimit),
Expand Down
3 changes: 2 additions & 1 deletion Tests/NIOSOCKSTests/ClientGreeting+Tests+XCTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// This source file is part of the SwiftNIO open source project
//
// Copyright (c) 2017-2018 Apple Inc. and the SwiftNIO project authors
// Copyright (c) 2018-2022 Apple Inc. and the SwiftNIO project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
Expand All @@ -24,6 +24,7 @@ import XCTest

extension ClientGreetingTests {

@available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings")
static var allTests : [(String, (ClientGreetingTests) -> () throws -> Void)] {
return [
("testInitFromBuffer", testInitFromBuffer),
Expand Down
3 changes: 2 additions & 1 deletion Tests/NIOSOCKSTests/ClientRequest+Tests+XCTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// This source file is part of the SwiftNIO open source project
//
// Copyright (c) 2017-2018 Apple Inc. and the SwiftNIO project authors
// Copyright (c) 2018-2022 Apple Inc. and the SwiftNIO project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
Expand All @@ -24,6 +24,7 @@ import XCTest

extension ClientRequestTests {

@available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings")
static var allTests : [(String, (ClientRequestTests) -> () throws -> Void)] {
return [
("testWriteClientRequest", testWriteClientRequest),
Expand Down
Loading

0 comments on commit 54def83

Please sign in to comment.