Skip to content

Commit

Permalink
Make all XCTestCase classses final to stop swift 6 compiler complaini…
Browse files Browse the repository at this point in the history
…ng (#547)
  • Loading branch information
adam-fowler authored Sep 11, 2024
1 parent 195aeef commit 6c568da
Show file tree
Hide file tree
Showing 16 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion Tests/HummingbirdCoreTests/CoreTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import NIOPosix
import ServiceLifecycle
import XCTest

class HummingBirdCoreTests: XCTestCase {
final class HummingBirdCoreTests: XCTestCase {
static let eventLoopGroup: EventLoopGroup = {
#if os(iOS)
NIOTSEventLoopGroup.singleton
Expand Down
2 changes: 1 addition & 1 deletion Tests/HummingbirdCoreTests/HTTP2Tests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import NIOSSL
import NIOTransportServices
import XCTest

class HummingBirdHTTP2Tests: XCTestCase {
final class HummingBirdHTTP2Tests: XCTestCase {
func testConnect() async throws {
let eventLoopGroup = MultiThreadedEventLoopGroup(numberOfThreads: 2)
defer { XCTAssertNoThrow(try eventLoopGroup.syncShutdownGracefully()) }
Expand Down
2 changes: 1 addition & 1 deletion Tests/HummingbirdCoreTests/TLSTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import NIOSSL
import NIOTransportServices
import XCTest

class HummingBirdTLSTests: XCTestCase {
final class HummingBirdTLSTests: XCTestCase {
func testConnect() async throws {
let eventLoopGroup = MultiThreadedEventLoopGroup(numberOfThreads: 2)
defer { XCTAssertNoThrow(try eventLoopGroup.syncShutdownGracefully()) }
Expand Down
2 changes: 1 addition & 1 deletion Tests/HummingbirdCoreTests/TSTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import NIOSSL
import NIOTransportServices
import XCTest

class TransportServicesTests: XCTestCase {
final class TransportServicesTests: XCTestCase {
func randomBuffer(size: Int) -> ByteBuffer {
var data = [UInt8](repeating: 0, count: size)
data = data.map { _ in UInt8.random(in: 0...255) }
Expand Down
2 changes: 1 addition & 1 deletion Tests/HummingbirdTests/CookiesTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import HummingbirdTesting
import XCTest

class CookieTests: XCTestCase {
final class CookieTests: XCTestCase {
func testNameValue() {
let cookie = Cookie(from: "name=value")
XCTAssertEqual(cookie?.name, "name")
Expand Down
2 changes: 1 addition & 1 deletion Tests/HummingbirdTests/DateCacheTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import Foundation
import HummingbirdTesting
import XCTest

class HummingbirdDateTests: XCTestCase {
final class HummingbirdDateTests: XCTestCase {
func testRFC1123Renderer() {
let formatter = DateFormatter()
formatter.locale = Locale(identifier: "en_US_POSIX")
Expand Down
2 changes: 1 addition & 1 deletion Tests/HummingbirdTests/FileIOTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import Hummingbird
import HummingbirdTesting
import XCTest

class FileIOTests: XCTestCase {
final class FileIOTests: XCTestCase {
static func randomBuffer(size: Int) -> ByteBuffer {
var data = [UInt8](repeating: 0, count: size)
data = data.map { _ in UInt8.random(in: 0...255) }
Expand Down
2 changes: 1 addition & 1 deletion Tests/HummingbirdTests/FileMiddlewareTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import Hummingbird
import HummingbirdTesting
import XCTest

class FileMiddlewareTests: XCTestCase {
final class FileMiddlewareTests: XCTestCase {
static func randomBuffer(size: Int) -> ByteBuffer {
var data = [UInt8](repeating: 0, count: size)
data = data.map { _ in UInt8.random(in: 0...255) }
Expand Down
2 changes: 1 addition & 1 deletion Tests/HummingbirdTests/HTTPTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import Hummingbird
import HummingbirdCore
import XCTest

class HTTPTests: XCTestCase {
final class HTTPTests: XCTestCase {
func testURI<T: Equatable>(_ uri: URI, _ component: KeyPath<URI, T>, _ value: T) {
XCTAssertEqual(uri[keyPath: component], value)
}
Expand Down
2 changes: 1 addition & 1 deletion Tests/HummingbirdTests/HummingBirdJSONTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import HummingbirdTesting
import Logging
import XCTest

class HummingbirdJSONTests: XCTestCase {
final class HummingbirdJSONTests: XCTestCase {
struct User: ResponseCodable {
let name: String
let email: String
Expand Down
2 changes: 1 addition & 1 deletion Tests/HummingbirdTests/TrieRouterTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
@testable @_spi(Internal) import Hummingbird
import XCTest

class TrieRouterTests: XCTestCase {
final class TrieRouterTests: XCTestCase {
func testPathComponentsTrie() {
let trieBuilder = RouterPathTrieBuilder<String>()
trieBuilder.addEntry("/usr/local/bin", value: "test1")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import Logging
import NIOCore
import XCTest

class HummingBirdURLEncodedTests: XCTestCase {
final class HummingBirdURLEncodedTests: XCTestCase {
struct User: ResponseCodable {
let name: String
let email: String
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
@testable import Hummingbird
import XCTest

class URLDecodedFormDecoderTests: XCTestCase {
final class URLDecodedFormDecoderTests: XCTestCase {
func testForm<Input: Decodable & Equatable>(_ value: Input, query: String, decoder: URLEncodedFormDecoder = .init()) {
do {
let value2 = try decoder.decode(Input.self, from: query)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
@testable import Hummingbird
import XCTest

class URLEncodedFormNodeTests: XCTestCase {
final class URLEncodedFormNodeTests: XCTestCase {
static func XCTAssertEncodedEqual(_ lhs: String, _ rhs: String) {
let lhs = lhs.split(separator: "&")
.sorted { $0 < $1 }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import Hummingbird
import XCTest

class URLEncodedFormEncoderTests: XCTestCase {
final class URLEncodedFormEncoderTests: XCTestCase {
static func XCTAssertEncodedEqual(_ lhs: String, _ rhs: String) {
let lhs = lhs.split(separator: "&")
.sorted { $0 < $1 }
Expand Down
2 changes: 1 addition & 1 deletion Tests/HummingbirdTests/UtilsTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import HummingbirdCore
import XCTest

class FlatDictionaryTests: XCTestCase {
final class FlatDictionaryTests: XCTestCase {
func testLiteralInit() {
let a: FlatDictionary<String, String> = ["test": "value", "key2": "value2"]
XCTAssertEqual(a["test"], "value")
Expand Down

0 comments on commit 6c568da

Please sign in to comment.