Files
swift-nio-http2/Tests/NIOHTTP2Tests/HTTP2ToHTTP1CodecTests+XCTest.swift
T
Cory Benfield 273e6deaa8 Remove crashers from HTTP2ToHTTP1Codecs. (#57)
Motivation:

When we spiked out these codecs we were missing a number of error handling
paths, which meant that erroneous input would lead to crashes. While we
don't expect these handlers to have to face that kind of input, we should
still aim to tolerate it where doing so is reasonable.

Modifications:

- Replaced all force unwraps and preconditions with throwing.

Result:

Fewer crashes on bad input.
2019-03-13 18:06:14 +00:00

60 lines
3.2 KiB
Swift

//===----------------------------------------------------------------------===//
//
// This source file is part of the SwiftNIO open source project
//
// Copyright (c) 2017-2018 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
//
//===----------------------------------------------------------------------===//
//
// HTTP2ToHTTP1CodecTests+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 HTTP2ToHTTP1CodecTests {
static var allTests : [(String, (HTTP2ToHTTP1CodecTests) -> () throws -> Void)] {
return [
("testBasicRequestServerSide", testBasicRequestServerSide),
("testRequestWithOnlyHeadServerSide", testRequestWithOnlyHeadServerSide),
("testRequestWithTrailers", testRequestWithTrailers),
("testSendingSimpleResponse", testSendingSimpleResponse),
("testResponseWithoutTrailers", testResponseWithoutTrailers),
("testResponseWith100Blocks", testResponseWith100Blocks),
("testPassingPromisesThroughWritesOnServer", testPassingPromisesThroughWritesOnServer),
("testBasicResponseClientSide", testBasicResponseClientSide),
("testResponseWithOnlyHeadClientSide", testResponseWithOnlyHeadClientSide),
("testResponseWithTrailers", testResponseWithTrailers),
("testSendingSimpleRequest", testSendingSimpleRequest),
("testRequestWithoutTrailers", testRequestWithoutTrailers),
("testResponseWith100BlocksClientSide", testResponseWith100BlocksClientSide),
("testPassingPromisesThroughWritesOnClient", testPassingPromisesThroughWritesOnClient),
("testReceiveRequestWithoutMethod", testReceiveRequestWithoutMethod),
("testReceiveRequestWithDuplicateMethod", testReceiveRequestWithDuplicateMethod),
("testReceiveRequestWithoutPath", testReceiveRequestWithoutPath),
("testReceiveRequestWithDuplicatePath", testReceiveRequestWithDuplicatePath),
("testReceiveRequestWithoutAuthority", testReceiveRequestWithoutAuthority),
("testReceiveRequestWithDuplicateAuthority", testReceiveRequestWithDuplicateAuthority),
("testReceiveRequestWithoutScheme", testReceiveRequestWithoutScheme),
("testReceiveRequestWithDuplicateScheme", testReceiveRequestWithDuplicateScheme),
("testReceiveResponseWithoutStatus", testReceiveResponseWithoutStatus),
("testReceiveResponseWithDuplicateStatus", testReceiveResponseWithDuplicateStatus),
("testReceiveResponseWithNonNumericalStatus", testReceiveResponseWithNonNumericalStatus),
("testSendRequestWithoutHost", testSendRequestWithoutHost),
("testSendRequestWithDuplicateHost", testSendRequestWithDuplicateHost),
]
}
}