Skip to content

Commit

Permalink
Update tests and test data
Browse files Browse the repository at this point in the history
  • Loading branch information
juliohm committed Oct 20, 2017
1 parent 8ffee38 commit f6c9670
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 12 deletions.
Binary file modified test/data/GeoStatsAPI.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/data/RealsStoneWall.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/data/RealsStrebelle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/data/VoxelStoneWall.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/data/VoxelWalkerLake.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 13 additions & 12 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -165,24 +165,14 @@ if ismaintainer || istravislinux
end
end

if ImageQuilting.cl nothing && ImageQuilting.clfft nothing
@testset "GPU" begin
# CPU and GPU give same results
TI = ones(20,20,20)
TI[10:end,:,:] = 2
srand(0); realscpu = iqsim(TI, 10, 10, 10, size(TI)..., gpu=false)
srand(0); realsgpu = iqsim(TI, 10, 10, 10, size(TI)..., gpu=true)
@test realscpu[1] == realsgpu[1]
end
end

@testset "GeoStats.jl API" begin
geodata = GeoDataFrame(DataFrames.DataFrame(x=[25.,50.,75.], y=[25.,75.,50.], variable=[1.,0.,1.]), [:x,:y])
grid = RegularGrid{Float64}(100,100)
problem = SimulationProblem(geodata, grid, :variable, 3)

TI = training_image("Strebelle")
solver = ImgQuilt(:variable => @NT(TI=TI, template=(30,30,1)))
inactive = [(i,j,1) for i in 1:30 for j in 1:30]
solver = ImgQuilt(:variable => @NT(TI=TI, template=(30,30,1), inactive=inactive))

srand(2017)
solution = solve(problem, solver)
Expand All @@ -201,3 +191,14 @@ end
@test test_images(VisualTest(plot_solution, refimg), popup=!istravislinux) |> success
end
end

if ImageQuilting.cl nothing && ImageQuilting.clfft nothing
@testset "GPU" begin
# CPU and GPU give same results
TI = ones(20,20,20)
TI[10:end,:,:] = 2
srand(0); realscpu = iqsim(TI, 10, 10, 10, size(TI)..., gpu=false)
srand(0); realsgpu = iqsim(TI, 10, 10, 10, size(TI)..., gpu=true)
@test realscpu[1] == realsgpu[1]
end
end

0 comments on commit f6c9670

Please sign in to comment.