Skip to content

Commit a23e682

Browse files
committed
Remove imports of Foundation(Essentials|Internationalization|) when TestSupport is imported
TestSupport has `@_exported` imports for those modules.
1 parent b9a6d4d commit a23e682

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+1
-320
lines changed

Tests/FoundationEssentialsTests/AttributedString/AttributedStringCOWTests.swift

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,6 @@
1414
import TestSupport
1515
#endif
1616

17-
#if FOUNDATION_FRAMEWORK
18-
import Foundation
19-
#else
20-
import FoundationEssentials
21-
#endif
22-
2317
extension AttributedStringProtocol {
2418
fileprivate mutating func genericSetAttribute() {
2519
self.testInt = 3

Tests/FoundationEssentialsTests/AttributedString/AttributedStringTests.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@
1414
import TestSupport
1515
#endif
1616

17-
#if canImport(FoundationEssentials)
18-
import FoundationEssentials
19-
#endif // FOUNDATION_FRAMEWORK
20-
2117
#if FOUNDATION_FRAMEWORK
2218
@_spi(AttributedString) import Foundation
2319
// For testing default attribute scope conversion

Tests/FoundationEssentialsTests/BufferViewTests.swift

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,6 @@
1414
import TestSupport
1515
#endif
1616

17-
#if canImport(FoundationEssentials)
18-
import FoundationEssentials
19-
#endif
20-
21-
#if FOUNDATION_FRAMEWORK
22-
import Foundation
23-
#endif
24-
2517
final class BufferViewTests: XCTestCase {
2618

2719
func testOptionalStorage() {

Tests/FoundationEssentialsTests/DataIOTests.swift

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,6 @@ import TestSupport
1818
@preconcurrency import Glibc
1919
#endif
2020

21-
#if FOUNDATION_FRAMEWORK
22-
import Foundation
23-
#else
24-
import FoundationEssentials
25-
#endif // FOUNDATION_FRAMEWORK
26-
2721
class DataIOTests : XCTestCase {
2822

2923
// MARK: - Helpers

Tests/FoundationEssentialsTests/DataTests.swift

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,6 @@ import TestSupport
1818
@preconcurrency import Glibc
1919
#endif
2020

21-
#if FOUNDATION_FRAMEWORK
22-
import Foundation
23-
#else
24-
import FoundationEssentials
25-
#endif // FOUNDATION_FRAMEWORK
26-
2721
extension Data {
2822
func withUnsafeUInt8Bytes<R>(_ c: (UnsafePointer<UInt8>) throws -> R) rethrows -> R {
2923
return try self.withUnsafeBytes { (ptr) in

Tests/FoundationEssentialsTests/DateTests.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@
1414
import TestSupport
1515
#endif
1616

17-
#if canImport(FoundationEssentials)
18-
import FoundationEssentials
19-
#endif
20-
2117
final class DateTests : XCTestCase {
2218

2319
func testDateComparison() {

Tests/FoundationEssentialsTests/DecimalTests.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@
1414
import TestSupport
1515
#endif // canImport(TestSupport)
1616

17-
#if FOUNDATION_FRAMEWORK
18-
import Foundation
19-
#else
17+
#if canImport(FoundationEssentials)
2018
@_spi(SwiftCorelibsFoundation)
2119
import FoundationEssentials
2220
#endif

Tests/FoundationEssentialsTests/ErrorTests.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@
1414
import TestSupport
1515
#endif
1616

17-
#if canImport(FoundationEssentials)
18-
import FoundationEssentials
19-
#endif
20-
2117
final class ErrorTests : XCTestCase {
2218
func thisThrows() throws {
2319
throw CocoaError(CocoaError.Code(rawValue: 42), userInfo: ["hi" : "there"])

Tests/FoundationEssentialsTests/FileManager/FileManagerPlayground.swift

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,6 @@
1414
import TestSupport
1515
#endif
1616

17-
#if FOUNDATION_FRAMEWORK
18-
import Foundation
19-
#else
20-
import FoundationEssentials
21-
#endif
22-
2317
private protocol Buildable {
2418
func build(in path: String, using fileManager: FileManager) throws
2519
}

Tests/FoundationEssentialsTests/FileManager/FileManagerTests.swift

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,6 @@
1515
import TestSupport
1616
#endif // canImport(TestSupport)
1717

18-
#if canImport(FoundationEssentials)
19-
import FoundationEssentials
20-
#endif
21-
22-
#if FOUNDATION_FRAMEWORK
23-
import Foundation
24-
#endif
25-
2618
#if canImport(Android)
2719
@preconcurrency import Android
2820
#endif

0 commit comments

Comments
 (0)