File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
test/platform/swift/unit_integration/core Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -13,10 +13,15 @@ final class DeviceAttributesTests: XCTestCase {
1313 func testLocale( ) {
1414 let deviceAttributes = DeviceAttributes ( )
1515 // Confirm that attributes are initialized with the `locale` field value.
16- XCTAssertEqual ( " en_US " , deviceAttributes. getFields ( ) [ " _locale " ] as? String )
16+ let localeStr = deviceAttributes. getFields ( ) [ " _locale " ] as! String
17+ XCTAssertNotNil ( Locale ( identifier: localeStr) )
1718
1819 deviceAttributes. start ( )
1920 // Confirm that the `locale` field looks OK after starting device attributes.
20- XCTAssertEqual ( " en_US " , deviceAttributes. getFields ( ) [ " _locale " ] as? String )
21+ let nowLocaleStr = deviceAttributes. getFields ( ) [ " _locale " ] as! String
22+ XCTAssertNotNil ( Locale ( identifier: nowLocaleStr) )
23+
24+ // And is the same as before.
25+ XCTAssertEqual ( localeStr, nowLocaleStr)
2126 }
2227}
You can’t perform that action at this time.
0 commit comments