Skip to content

Conversation

@weissi
Copy link
Contributor

@weissi weissi commented May 19, 2020

Motivation:

AHC's tests were split in HTTPClientTests (which only use the public
API) and HTTPClientInternalTests (which can use internal API by using
@testable). At some point, the public API tests had @testable added
to the AHC import which breaks this idea.

Modification:

Restore the intent by removing @testable and moving the 2 tests that
needed it over.

Result:

Cleaner test suite.

Motivation:

AHC's tests were split in HTTPClientTests (which only use the public
API) and HTTPClientInternalTests (which can use `internal` API by using
`@testable`). At some point, the public API tests had `@testable` added
to the AHC import which breaks this idea.

Modification:

Restore the intent by removing `@testable` and moving the 2 tests that
needed it over.

Result:

Cleaner test suite.
@weissi weissi requested a review from artemredkin May 19, 2020 15:52
Copy link
Collaborator

@artemredkin artemredkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

//===----------------------------------------------------------------------===//

@testable import AsyncHTTPClient
/* NOT @testable */ import AsyncHTTPClient // Tests that need @testable go into HTTPClientInternalTests.swift
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice strategy to only have a specific file for those, +1

@weissi weissi merged commit b1bb7ae into swift-server:master May 19, 2020
@weissi weissi deleted the jw-internal-tests branch May 19, 2020 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants