Skip to content

Commit

Permalink
new tests
Browse files Browse the repository at this point in the history
see file
  • Loading branch information
martinheida committed Dec 6, 2023
1 parent 79a1ae6 commit 77f28c6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ using SparseArrays
println("-----------------------------------------------------------------")
println("testing Voronoi Data and related stuff")
println("-----------------------------------------------------------------")
function test_fast_poly()
VG = VoronoiGeometry(VoronoiNodes(rand(4,500)),cuboid(4,periodic=[]),integrator=HighVoronoi.VI_FAST_POLYGON,silence=true,integrate=true,integrand=x->[x[1],x[2]^2])
return abs(0.5-sum(VG.Integrator.Integral.bulk_integral)[1])<0.05
end
function test_2000()
# the following is necessary since unbounded domains can lead to a crash in very rare events
#try
Expand Down Expand Up @@ -81,7 +85,7 @@ using SparseArrays
return true
end
@test test_2000()

@test test_fast_poly()
println("-----------------------------------------------------------------")
println("testing Heuristic integrator in high dimensions")
println("-----------------------------------------------------------------")
Expand Down

0 comments on commit 77f28c6

Please sign in to comment.