|
| 1 | +import XCTest |
| 2 | + |
| 3 | +extension BasicTests { |
| 4 | + static let __allTests = [ |
| 5 | + ("testCanInitializeInnerSession", testCanInitializeInnerSession), |
| 6 | + ("testThrowsErrorOnBasicProtocolViolation", testThrowsErrorOnBasicProtocolViolation), |
| 7 | + ] |
| 8 | +} |
| 9 | + |
| 10 | +extension HTTP2StreamMultiplexerTests { |
| 11 | + static let __allTests = [ |
| 12 | + ("testChannelsCloseAfterGoawayFrameFirstThenEvent", testChannelsCloseAfterGoawayFrameFirstThenEvent), |
| 13 | + ("testChannelsCloseAfterResetStreamFrameFirstThenEvent", testChannelsCloseAfterResetStreamFrameFirstThenEvent), |
| 14 | + ("testChannelsCloseThemselvesWhenToldTo", testChannelsCloseThemselvesWhenToldTo), |
| 15 | + ("testClosePromiseFailsWithError", testClosePromiseFailsWithError), |
| 16 | + ("testClosePromiseIsSatisfiedWithTheEvent", testClosePromiseIsSatisfiedWithTheEvent), |
| 17 | + ("testClosingActiveChannels", testClosingActiveChannels), |
| 18 | + ("testClosingIdleChannels", testClosingIdleChannels), |
| 19 | + ("testCreatingOutboundChannel", testCreatingOutboundChannel), |
| 20 | + ("testFailingInitializerDoesNotWrite", testFailingInitializerDoesNotWrite), |
| 21 | + ("testFlushingOneChannelDoesntFlushThemAll", testFlushingOneChannelDoesntFlushThemAll), |
| 22 | + ("testFramesAreNotDeliveredIfSetUpFails", testFramesAreNotDeliveredIfSetUpFails), |
| 23 | + ("testFramesAreNotDeliveredUntilStreamIsSetUp", testFramesAreNotDeliveredUntilStreamIsSetUp), |
| 24 | + ("testFramesForClosedStreamsAreReported", testFramesForClosedStreamsAreReported), |
| 25 | + ("testFramesForUnknownStreamsAreReported", testFramesForUnknownStreamsAreReported), |
| 26 | + ("testHandlersAreRemovedOnClosure", testHandlersAreRemovedOnClosure), |
| 27 | + ("testHandlersAreRemovedOnClosureWithError", testHandlersAreRemovedOnClosureWithError), |
| 28 | + ("testHeadersFramesCreateNewChannels", testHeadersFramesCreateNewChannels), |
| 29 | + ("testMultipleClosePromisesAreSatisfied", testMultipleClosePromisesAreSatisfied), |
| 30 | + ("testMultiplexerIgnoresFramesOnStream0", testMultiplexerIgnoresFramesOnStream0), |
| 31 | + ("testReadIsPerChannel", testReadIsPerChannel), |
| 32 | + ("testReadPullsInAllFrames", testReadPullsInAllFrames), |
| 33 | + ("testReadWillCauseAutomaticFrameDelivery", testReadWillCauseAutomaticFrameDelivery), |
| 34 | + ("testReadWithNoPendingDataCausesReadOnParentChannel", testReadWithNoPendingDataCausesReadOnParentChannel), |
| 35 | + ("testUnflushedWritesFailOnClose", testUnflushedWritesFailOnClose), |
| 36 | + ("testUnflushedWritesFailOnError", testUnflushedWritesFailOnError), |
| 37 | + ("testWritesAreCancelledOnFailingInitializer", testWritesAreCancelledOnFailingInitializer), |
| 38 | + ("testWritesFailOnClosedStreamChannels", testWritesFailOnClosedStreamChannels), |
| 39 | + ("testWritesOnCreatedChannelAreDelayed", testWritesOnCreatedChannelAreDelayed), |
| 40 | + ] |
| 41 | +} |
| 42 | + |
| 43 | +extension HTTP2ToHTTP1CodecTests { |
| 44 | + static let __allTests = [ |
| 45 | + ("testBasicRequestServerSide", testBasicRequestServerSide), |
| 46 | + ("testBasicResponseClientSide", testBasicResponseClientSide), |
| 47 | + ("testPassingPromisesThroughWritesOnClient", testPassingPromisesThroughWritesOnClient), |
| 48 | + ("testPassingPromisesThroughWritesOnServer", testPassingPromisesThroughWritesOnServer), |
| 49 | + ("testRequestWithOnlyHeadServerSide", testRequestWithOnlyHeadServerSide), |
| 50 | + ("testRequestWithoutTrailers", testRequestWithoutTrailers), |
| 51 | + ("testRequestWithTrailers", testRequestWithTrailers), |
| 52 | + ("testResponseWith100Blocks", testResponseWith100Blocks), |
| 53 | + ("testResponseWith100BlocksClientSide", testResponseWith100BlocksClientSide), |
| 54 | + ("testResponseWithOnlyHeadClientSide", testResponseWithOnlyHeadClientSide), |
| 55 | + ("testResponseWithoutTrailers", testResponseWithoutTrailers), |
| 56 | + ("testResponseWithTrailers", testResponseWithTrailers), |
| 57 | + ("testSendingSimpleRequest", testSendingSimpleRequest), |
| 58 | + ("testSendingSimpleResponse", testSendingSimpleResponse), |
| 59 | + ] |
| 60 | +} |
| 61 | + |
| 62 | +extension ReentrancyTests { |
| 63 | + static let __allTests = [ |
| 64 | + ("testReenterInactiveOnRead", testReenterInactiveOnRead), |
| 65 | + ("testReenterReadEOFOnRead", testReenterReadEOFOnRead), |
| 66 | + ("testReEnterReadOnRead", testReEnterReadOnRead), |
| 67 | + ] |
| 68 | +} |
| 69 | + |
| 70 | +extension SimpleClientServerTests { |
| 71 | + static let __allTests = [ |
| 72 | + ("test1XXResponseHeaderFields", test1XXResponseHeaderFields), |
| 73 | + ("testAutomaticFlowControl", testAutomaticFlowControl), |
| 74 | + ("testBadClientMagic", testBadClientMagic), |
| 75 | + ("testBasicPingFrames", testBasicPingFrames), |
| 76 | + ("testBasicRequestResponse", testBasicRequestResponse), |
| 77 | + ("testCachingInteractionWithMaxConcurrentStreams", testCachingInteractionWithMaxConcurrentStreams), |
| 78 | + ("testDontRemoveActiveStreams", testDontRemoveActiveStreams), |
| 79 | + ("testFailingFlushedWritesForGoaway", testFailingFlushedWritesForGoaway), |
| 80 | + ("testFailingFlushedWritesForResetStream", testFailingFlushedWritesForResetStream), |
| 81 | + ("testFailingUnflushedWritesForGoaway", testFailingUnflushedWritesForGoaway), |
| 82 | + ("testFailingUnflushedWritesForResetStream", testFailingUnflushedWritesForResetStream), |
| 83 | + ("testFrameReceivesDoNotTriggerFlushes", testFrameReceivesDoNotTriggerFlushes), |
| 84 | + ("testGoAwayWithStreamsUpQuiescing", testGoAwayWithStreamsUpQuiescing), |
| 85 | + ("testLargeDataFramesAreSplit", testLargeDataFramesAreSplit), |
| 86 | + ("testManyConcurrentInactiveStreams", testManyConcurrentInactiveStreams), |
| 87 | + ("testManyRequestsAtOnce", testManyRequestsAtOnce), |
| 88 | + ("testMoreRequestsThanMaxConcurrentStreamsAtOnce", testMoreRequestsThanMaxConcurrentStreamsAtOnce), |
| 89 | + ("testNothingButGoaway", testNothingButGoaway), |
| 90 | + ("testOverridingDefaultSettings", testOverridingDefaultSettings), |
| 91 | + ("testPartialFrame", testPartialFrame), |
| 92 | + ("testPriorityFramesAreNotEmitted", testPriorityFramesAreNotEmitted), |
| 93 | + ("testSendingDataFrameWithLargeFile", testSendingDataFrameWithLargeFile), |
| 94 | + ("testSendingDataFrameWithSmallFile", testSendingDataFrameWithSmallFile), |
| 95 | + ("testSendingTrailers", testSendingTrailers), |
| 96 | + ("testStreamClosedViaGoaway", testStreamClosedViaGoaway), |
| 97 | + ("testStreamClosedViaRstStream", testStreamClosedViaRstStream), |
| 98 | + ("testStreamClosedWithNoError", testStreamClosedWithNoError), |
| 99 | + ("testStreamCloseEventForGoawayFiresAfterFrame", testStreamCloseEventForGoawayFiresAfterFrame), |
| 100 | + ("testStreamCloseEventForRstStreamFiresAfterFrame", testStreamCloseEventForRstStreamFiresAfterFrame), |
| 101 | + ("testUnflushedWritesAreFailedOnChannelInactive", testUnflushedWritesAreFailedOnChannelInactive), |
| 102 | + ("testUnflushedWritesAreFailedOnChannelInactiveRentrant", testUnflushedWritesAreFailedOnChannelInactiveRentrant), |
| 103 | + ("testUnflushedWritesAreFailedOnHalfClosure", testUnflushedWritesAreFailedOnHalfClosure), |
| 104 | + ("testUnflushedWritesAreFailedOnHalfClosureReentrant", testUnflushedWritesAreFailedOnHalfClosureReentrant), |
| 105 | + ] |
| 106 | +} |
| 107 | + |
| 108 | +#if !os(macOS) |
| 109 | +public func __allTests() -> [XCTestCaseEntry] { |
| 110 | + return [ |
| 111 | + testCase(BasicTests.__allTests), |
| 112 | + testCase(HTTP2StreamMultiplexerTests.__allTests), |
| 113 | + testCase(HTTP2ToHTTP1CodecTests.__allTests), |
| 114 | + testCase(ReentrancyTests.__allTests), |
| 115 | + testCase(SimpleClientServerTests.__allTests), |
| 116 | + ] |
| 117 | +} |
| 118 | +#endif |
0 commit comments