Skip to content

Commit

Permalink
Merge pull request #120 from timholy/teh/testcontrast
Browse files Browse the repository at this point in the history
Add a test for the contrast GUI (test for problem fixed in #119)
  • Loading branch information
timholy authored Aug 28, 2017
2 parents 7cb11ac + ee5ffb4 commit 7179b24
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/contrast.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
using ImageView, FixedPointNumbers, Reactive
using Base.Test

@testset "contrast GUI" begin
# test for the fix in #119
img = rand(N0f16, 100, 100)
clim = Signal(CLim(extrema(img)...))
imgsig = Signal(img)
enabled, histsig, imgc = ImageView.prep_contrast(imgsig, clim)
push!(enabled, true)
yield()
ret = ImageView.contrast_gui(enabled, histsig, clim)
@test isa(ret, Dict)
Gtk.destroy(ret["window"])
end
1 change: 1 addition & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
include("simple.jl")
include("contrast.jl")
include("scalesigned.jl")
include("tile.jl")
include("annotations.jl")
Expand Down

0 comments on commit 7179b24

Please sign in to comment.