Skip to content

Commit 26e57c6

Browse files
authored
Merge pull request #493 from trentxintong/master
Renable tests after investigation. rdar://27604350
2 parents 3b9a917 + f395284 commit 26e57c6

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

TestFoundation/TestNSJSONSerialization.swift

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -291,39 +291,35 @@ extension TestNSJSONSerialization {
291291
}
292292

293293
func test_deserialize_unicodeEscapeSequence() {
294-
// DISABLED: changes for SE-128 have apparently changed the result of parsing
295-
// TODO: Investigate and re-enable test.
296-
/*
297294
let subject = "[\"\\u2728\"]"
298295
do {
299296
guard let data = subject.data(using: .utf8) else {
300297
XCTFail("Unable to convert string to data")
301298
return
302299
}
303300
let result = try JSONSerialization.jsonObject(with: data, options: []) as? [Any]
301+
// result?[0] as? String returns an Optional<String> and RHS is promoted
302+
// to Optional<String>
304303
XCTAssertEqual(result?[0] as? String, "")
305304
} catch {
306305
XCTFail("Unexpected error: \(error)")
307306
}
308-
*/
309307
}
310308

311309
func test_deserialize_unicodeSurrogatePairEscapeSequence() {
312-
// DISABLED: changes for SE-128 have apparently changed the result of parsing
313-
// TODO: Investigate and re-enable test.
314-
/*
315310
let subject = "[\"\\uD834\\udd1E\"]"
316311
do {
317312
guard let data = subject.data(using: .utf8) else {
318313
XCTFail("Unable to convert string to data")
319314
return
320315
}
321316
let result = try JSONSerialization.jsonObject(with: data, options: []) as? [Any]
317+
// result?[0] as? String returns an Optional<String> and RHS is promoted
318+
// to Optional<String>
322319
XCTAssertEqual(result?[0] as? String, "\u{1D11E}")
323320
} catch {
324321
XCTFail("Unexpected error: \(error)")
325322
}
326-
*/
327323
}
328324

329325
func test_deserialize_allowFragments() {

0 commit comments

Comments
 (0)