Skip to content

Commit dc05379

Browse files
committed
Add WebP tests
1 parent e7341f7 commit dc05379

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Tests/ImageDecoderTests.swift

+12
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,18 @@ class ImageDecoderTests: XCTestCase {
133133
XCTAssertNotNil(container)
134134
XCTAssertNil(container?.data)
135135
}
136+
137+
func testDecodeBaselineWebP() {
138+
let data = Test.data(name: "baseline", extension: "webp")
139+
let container = ImageDecoders.Default().decode(data)
140+
if #available(OSX 15, iOS 14.0, watchOS 7.0, tvOS 14.0, *) {
141+
XCTAssertNotNil(container)
142+
XCTAssertNil(container?.data)
143+
} else {
144+
XCTAssertNil(container)
145+
XCTAssertNil(container?.data)
146+
}
147+
}
136148
}
137149

138150
class ImageTypeTests: XCTestCase {

0 commit comments

Comments
 (0)