Skip to content

Commit

Permalink
fixes warning about deserializing NSData during tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
hfutrell committed Nov 12, 2021
1 parent 83b1c47 commit 252f34f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions BezierKit/BezierKitTests/PathTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ class PathTests: XCTestCase {
let decodedPath: Path?
if #available(OSX 10.13, iOS 11.0, *) {
if let data = try? NSKeyedArchiver.archivedData(withRootObject: path, requiringSecureCoding: true) {
decodedPath = try? NSKeyedUnarchiver.unarchivedObject(ofClass: Path.self, from: data)
decodedPath = try? NSKeyedUnarchiver.unarchivedObject(ofClasses: [Path.self, NSData.self], from: data) as? Path
} else {
decodedPath = nil
}
Expand Down Expand Up @@ -863,7 +863,7 @@ class PathTests: XCTestCase {
let decodedPath: Path?
if #available(OSX 10.13, iOS 11.0, *) {
if let data = try? NSKeyedArchiver.archivedData(withRootObject: path, requiringSecureCoding: true) {
decodedPath = try? NSKeyedUnarchiver.unarchivedObject(ofClass: Path.self, from: data)
decodedPath = try? NSKeyedUnarchiver.unarchivedObject(ofClasses: [Path.self, NSData.self], from: data) as? Path
} else {
decodedPath = nil
}
Expand Down

0 comments on commit 252f34f

Please sign in to comment.