File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -97,7 +97,7 @@ extension NSLocale {
97
97
open class var availableLocaleIdentifiers : [ String ] {
98
98
var identifiers = Array < String > ( )
99
99
for obj in CFLocaleCopyAvailableLocaleIdentifiers ( ) . _nsObject {
100
- identifiers. append ( ( obj as! NSString ) . _swiftObject )
100
+ identifiers. append ( obj as! String )
101
101
}
102
102
return identifiers
103
103
}
Original file line number Diff line number Diff line change @@ -20,7 +20,8 @@ class TestNSLocale : XCTestCase {
20
20
return [
21
21
( " test_constants " , test_constants) ,
22
22
( " test_Identifier " , test_Identifier) ,
23
- ( " test_copy " , test_copy)
23
+ ( " test_copy " , test_copy) ,
24
+ ( " test_availableIdentifiers " , test_availableIdentifiers) ,
24
25
]
25
26
}
26
27
@@ -107,4 +108,8 @@ class TestNSLocale : XCTestCase {
107
108
108
109
XCTAssertTrue ( locale == localeCopy)
109
110
}
111
+
112
+ func test_availableIdentifiers( ) {
113
+ XCTAssertNoThrow ( Locale . availableIdentifiers)
114
+ }
110
115
}
You can’t perform that action at this time.
0 commit comments