Skip to content

Commit

Permalink
Increase code coverage
Browse files Browse the repository at this point in the history
and sort test-sets by duration
  • Loading branch information
adrhill committed Feb 7, 2022
1 parent 599b2f3 commit d3ebff3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@ using DitherPunk
using Test

@testset "DitherPunk.jl" begin
@testset "Utilities" begin
include("test_utils.jl")
end
@testset "Bayer matrices" begin
include("test_bayer.jl")
end
@testset "Gradient image" begin
include("test_gradient.jl")
end
@testset "Color image" begin
@testset "Custom palette" begin
include("test_color.jl")
end
@testset "Fixed palette" begin
include("test_fixed_color.jl")
end
end
@testset "Utilities" begin
include("test_utils.jl")
@testset "Custom palette" begin
include("test_color.jl")
end
end
end
3 changes: 3 additions & 0 deletions test/test_gradient.jl
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,6 @@ d4 = dither!(img2, alg)
@test img2 == d # image updated in-place
@test eltype(d4) == eltype(img)
@test eltype(img2) == eltype(img)

## Test error messages
@test_throws DomainError ConstantThreshold(; threshold=-0.5)
1 change: 1 addition & 0 deletions test/test_utils.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using DitherPunk
using DitherPunk: srgb2linear, clamp_limits
using ImageCore

@test srgb2linear(true) == true
@test srgb2linear(false) == false
Expand Down

0 comments on commit d3ebff3

Please sign in to comment.