|
@@ -69,7 +69,15 @@ class ImageExtensionTests: XCTestCase {
|
|
|
XCTAssertEqual(image!.kf.duration, 0.8, accuracy: 0.001, "The image duration should be 0.8s")
|
|
XCTAssertEqual(image!.kf.duration, 0.8, accuracy: 0.001, "The image duration should be 0.8s")
|
|
|
#endif
|
|
#endif
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
+#if os(iOS) || os(tvOS)
|
|
|
|
|
+ func testScaleForGIFImage() {
|
|
|
|
|
+ let image = Kingfisher<Image>.animated(with: testImageGIFData, scale: 2.0, duration: 0.0, preloadAll: false, onlyFirstFrame: false)
|
|
|
|
|
+ XCTAssertNotNil(image, "The image should be initiated.")
|
|
|
|
|
+ XCTAssertEqual(image!.scale, 2.0, "should have correct scale")
|
|
|
|
|
+ }
|
|
|
|
|
+#endif
|
|
|
|
|
+
|
|
|
func testGIFRepresentation() {
|
|
func testGIFRepresentation() {
|
|
|
let options = ImageCreatingOptions()
|
|
let options = ImageCreatingOptions()
|
|
|
let image = KingfisherClass<Image>.animatedImage(data: testImageGIFData, options: options)!
|
|
let image = KingfisherClass<Image>.animatedImage(data: testImageGIFData, options: options)!
|