Update test case

This commit is contained in:
DreamPiggy 2023-01-17 16:50:16 +08:00
parent 0bdb7865c7
commit 9dd8b6c08b
1 changed files with 1 additions and 1 deletions

View File

@ -140,7 +140,7 @@
expect(maxEncodedData).notTo.beNil();
expect(maxEncodedData.length).beGreaterThan(limitFileSize);
// 0 quality (smallest)
NSData *minEncodedData = [SDImageCodersManager.sharedManager encodedDataWithImage:image format:SDImageFormatJPEG options:@{SDImageCoderEncodeCompressionQuality : @(0)}];
NSData *minEncodedData = [SDImageCodersManager.sharedManager encodedDataWithImage:image format:SDImageFormatJPEG options:@{SDImageCoderEncodeCompressionQuality : @(0.01)}]; // Seems 0 has some bugs in old macOS
expect(minEncodedData).notTo.beNil();
expect(minEncodedData.length).beLessThan(limitFileSize);
NSData *limitEncodedData = [SDImageCodersManager.sharedManager encodedDataWithImage:image format:SDImageFormatJPEG options:@{SDImageCoderEncodeMaxFileSize : @(limitFileSize)}];