Skip to content

Upgrade SwiftFoundationICU to version 74 #802

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 1 commit into from
Aug 1, 2024
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
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ var dependencies: [Package.Dependency] {
from: "1.1.0"),
.package(
url: "https://github.com/apple/swift-foundation-icu",
exact: "0.0.9"),
branch: "main"),
.package(
url: "https://github.com/swiftlang/swift-syntax",
from: "600.0.0-latest")
Expand Down
18 changes: 0 additions & 18 deletions Tests/FoundationInternationalizationTests/LocaleTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -161,15 +161,9 @@ final class LocaleTests : XCTestCase {
return localeComponents
}

#if FIXED_ICU_20187
verify(cldr: "root", bcp47: "und", icu: "") {
return Locale.Components(identifier: "")
}
#else
verify(cldr: "root", bcp47: "und", icu: "en_US_POSIX") {
return Locale.Components(identifier: "")
}
#endif

verify(cldr: "und_US", bcp47: "und-US", icu: "_US") {
return Locale.Components(languageRegion: .unitedStates)
Expand Down Expand Up @@ -757,11 +751,7 @@ extension LocaleTests {

// TODO: Reenable once (Locale.canonicalIdentifier) is implemented
func test_identifierTypesFromSpecialIdentifier() throws {
#if FIXED_ICU_20187
verify("", cldr: "root", bcp47: "und", icu: "")
#else
verify("", cldr: "root", bcp47: "und", icu: "en_US_POSIX")
#endif
verify("root", cldr: "root", bcp47: "root", icu: "root")
verify("und", cldr: "root", bcp47: "und", icu: "und")

Expand All @@ -780,20 +770,12 @@ extension LocaleTests {

// If there's only one component, it is treated as the language code
verify("123", cldr: "root", bcp47: "und", icu: "123")
#if FIXED_ICU_20187
verify("😀123", cldr: "root", bcp47: "und", icu: "")
#else
verify("😀123", cldr: "root", bcp47: "und", icu: "en_US_POSIX")
#endif

// The "_" prefix marks the start of the region
verify("_ZZ", cldr: "und_ZZ", bcp47: "und-ZZ", icu: "_ZZ")
verify("_123", cldr: "und_123", bcp47: "und-123", icu: "_123")
#if FIXED_ICU_20187
verify("_😀123", cldr: "root", bcp47: "und", icu: "")
#else
verify("_😀123", cldr: "root", bcp47: "und", icu: "en_US_POSIX")
#endif

// Starting an ID with script code is an acceptable special case
verify("Hant", cldr: "hant", bcp47: "hant", icu: "hant")
Expand Down