Skip to content

Commit

Permalink
Added test for encode with quality outside range
Browse files Browse the repository at this point in the history
  • Loading branch information
stemann committed Apr 21, 2024
1 parent d488e51 commit d342acd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/encoding_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ using WebP
end

@testset "Lossy" begin
@testset "encode throws ArgumentError for quality outside range" begin
@test_throws ArgumentError WebP.encode(input_image; quality = -1)
@test_throws ArgumentError WebP.encode(input_image; quality = 101)
end
qualities = [1, 10, 50, 100]
quality_types = [Int, Float32, Float64]
for quality in qualities, TQuality in quality_types
Expand Down

0 comments on commit d342acd

Please sign in to comment.