File tree Expand file tree Collapse file tree 1 file changed +9
-10
lines changed
Tests/FoundationInternationalizationTests Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Original file line number Diff line number Diff line change 1010//
1111//===----------------------------------------------------------------------===//
1212
13+ import Testing
14+
1315#if FOUNDATION_FRAMEWORK
1416@testable import Foundation
1517#else
1618@testable import FoundationEssentials
1719@testable import FoundationInternationalization
1820#endif // FOUNDATION_FRAMEWORK
1921
20- #if canImport(TestSupport)
21- import TestSupport
22- #endif
23-
24- final class URLUIDNATests : XCTestCase {
25- func testURLHostUIDNAEncoding( ) {
22+ @Suite ( " URL UIDNA " )
23+ private struct URLUIDNATests {
24+ @Test func urlHostUIDNAEncoding( ) {
2625 let emojiURL = URL ( string: " https://i❤️tacos.ws/🏳️🌈/冰淇淋 " )
2726 let emojiURLEncoded = " https://xn--itacos-i50d.ws/%F0%9F%8F%B3%EF%B8%8F%E2%80%8D%F0%9F%8C%88/%E5%86%B0%E6%B7%87%E6%B7%8B "
28- XCTAssertEqual ( emojiURL? . absoluteString, emojiURLEncoded)
29- XCTAssertEqual ( emojiURL? . host ( percentEncoded: false ) , " xn--itacos-i50d.ws " )
27+ #expect ( emojiURL? . absoluteString == emojiURLEncoded)
28+ #expect ( emojiURL? . host ( percentEncoded: false ) == " xn--itacos-i50d.ws " )
3029
3130 let chineseURL = URL ( string: " http://見.香港/热狗/🌭 " )
3231 let chineseURLEncoded = " http://xn--nw2a.xn--j6w193g/%E7%83%AD%E7%8B%97/%F0%9F%8C%AD "
33- XCTAssertEqual ( chineseURL? . absoluteString, chineseURLEncoded)
34- XCTAssertEqual ( chineseURL? . host ( percentEncoded: false ) , " xn--nw2a.xn--j6w193g " )
32+ #expect ( chineseURL? . absoluteString == chineseURLEncoded)
33+ #expect ( chineseURL? . host ( percentEncoded: false ) == " xn--nw2a.xn--j6w193g " )
3534 }
3635}
You can’t perform that action at this time.
0 commit comments