Skip to content

Add missing Foundation imports to fix test build errors on iOS with MemberImportVisibility enabled #1108

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Tests/TestingTests/ConfirmationTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@

@testable @_spi(Experimental) @_spi(ForToolsIntegrationOnly) import Testing

#if canImport(Foundation)
private import Foundation
#endif

@Suite("Confirmation Tests")
struct ConfirmationTests {
@Test("Successful confirmations")
Expand Down
4 changes: 4 additions & 0 deletions Tests/TestingTests/MiscellaneousTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
@_spi(Experimental) @_spi(ForToolsIntegrationOnly) import _TestDiscovery
private import _TestingInternals

#if canImport(Foundation)
private import Foundation
#endif

@Test(/* name unspecified */ .hidden)
@Sendable func freeSyncFunction() {}
@Sendable func freeAsyncFunction() async {}
Expand Down
4 changes: 4 additions & 0 deletions Tests/TestingTests/SwiftPMTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
@testable @_spi(Experimental) @_spi(ForToolsIntegrationOnly) import Testing
private import _TestingInternals

#if canImport(Foundation)
private import Foundation
#endif

private func configurationForEntryPoint(withArguments args: [String]) throws -> Configuration {
let args = try parseCommandLineArguments(from: args)
return try configurationForEntryPoint(from: args)
Expand Down
4 changes: 4 additions & 0 deletions Tests/TestingTests/Traits/TagListTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
@testable @_spi(Experimental) @_spi(ForToolsIntegrationOnly) import Testing
private import _TestingInternals

#if canImport(Foundation)
private import Foundation
#endif

@Suite("Tag/Tag List Tests", .tags(.traitRelated))
struct TagListTests {
@Test(".tags() factory method with one tag")
Expand Down
4 changes: 4 additions & 0 deletions Tests/TestingTests/Traits/TimeLimitTraitTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@

@testable @_spi(Experimental) @_spi(ForToolsIntegrationOnly) import Testing

#if canImport(Foundation)
private import Foundation
#endif

@Suite("TimeLimitTrait Tests", .tags(.traitRelated))
struct TimeLimitTraitTests {
@available(_clockAPI, *)
Expand Down