ソースを参照

Remove the force_try

tokorom 9 年 前
コミット
53504ec69e
1 ファイル変更2 行追加2 行削除
  1. 2 2
      Tests/KingfisherTests/KingfisherTestHelper.swift

+ 2 - 2
Tests/KingfisherTests/KingfisherTestHelper.swift

@@ -37,8 +37,8 @@ let testImageData = Data(base64Encoded:testImageString, options: Data.Base64Deco
 
 let testImagePNGData = ImagePNGRepresentation(testImage)!
 let testImageJEPGData = ImageJPEGRepresentation(testImage, 1.0)!
-let testImageGIFData = try! Data(contentsOf: URL(fileURLWithPath: Bundle(for: ImageExtensionTests.self).pathForResource("dancing-banana", ofType: "gif")!))
-let testImageSingleFrameGIFData = try! Data(contentsOf: URL(fileURLWithPath: Bundle(for: ImageExtensionTests.self).pathForResource("single-frame", ofType: "gif")!))
+let testImageGIFData = try? Data(contentsOf: URL(fileURLWithPath: Bundle(for: ImageExtensionTests.self).pathForResource("dancing-banana", ofType: "gif")!))
+let testImageSingleFrameGIFData = try? Data(contentsOf: URL(fileURLWithPath: Bundle(for: ImageExtensionTests.self).pathForResource("single-frame", ofType: "gif")!))
 
 let testKeys = ["http://stackoverflow.com/questions/11251340/convert-image-to-base64-string-in-ios-swift", "https://onevcat.com", "http://onevcat.com/content/images/2014/May/200.jpg", "http://onevcat.com/content/images/2014/May/200.jpg?fads#kj1asf"]