Skip to content
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

Migrate swift-foundation to swift-testing #908

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
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
16 changes: 9 additions & 7 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ let package = Package(
.target(
name: "TestSupport",
dependencies: [
"FoundationEssentials",
"FoundationInternationalization",
"FoundationEssentials"
],
path: "Tests/TestSupport",
cSettings: wasiLibcCSettings,
swiftSettings: availabilityMacros + concurrencyChecking
),
Expand Down Expand Up @@ -144,8 +144,8 @@ let package = Package(
.testTarget(
name: "FoundationEssentialsTests",
dependencies: [
"TestSupport",
"FoundationEssentials"
"FoundationEssentials",
"TestSupport"
],
resources: [
.copy("Resources")
Expand Down Expand Up @@ -181,7 +181,10 @@ let package = Package(
name: "FoundationInternationalizationTests",
dependencies: [
"TestSupport",
"FoundationInternationalization",
"FoundationInternationalization"
],
resources: [
.copy("Resources")
],
swiftSettings: availabilityMacros + concurrencyChecking
),
Expand Down Expand Up @@ -212,8 +215,7 @@ package.targets.append(contentsOf: [
.testTarget(
name: "FoundationMacrosTests",
dependencies: [
"FoundationMacros",
"TestSupport"
"FoundationMacros"
],
swiftSettings: availabilityMacros + concurrencyChecking
)
Expand Down
9 changes: 0 additions & 9 deletions Sources/FoundationEssentials/TimeZone/TimeZone.swift
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,6 @@ public struct TimeZone : Hashable, Equatable, Sendable {
_tz = cached
}

internal init?(name: String) {
// Try the cache first
if let cached = TimeZoneCache.cache.fixed(name) {
_tz = cached
} else {
return nil
}
}

/// Returns a time zone identified by a given abbreviation.
///
/// In general, you are discouraged from using abbreviations except for unique instances such as "GMT". Time Zone abbreviations are not standardized and so a given abbreviation may have multiple meanings--for example, "EST" refers to Eastern Time in both the United States and Australia
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ extension NSTimeZone {
static func _timeZoneWith(name: String, data: Data?) -> _NSSwiftTimeZone? {
if let data {
// We don't cache data-based TimeZones
guard let tz = TimeZone(name: name) else {
guard let tz = TimeZone(identifier: name) else {
return nil
}
return _NSSwiftTimeZone(timeZone: tz, data: data)
Expand Down
233 changes: 0 additions & 233 deletions Sources/TestSupport/TestSupport.swift

This file was deleted.

Loading