Skip to content

Commit

Permalink
Add test for delaunay_compute_neighbors
Browse files Browse the repository at this point in the history
  • Loading branch information
bennibolm committed Jan 26, 2024
1 parent e8df8e4 commit 7377f26
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions examples/build_delaunay_triangulation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ data_points = collect([0.0 0.0

# Create triangulation
ve = build_delaunay_triangulation(data_points; verbose = true)

ne = delaunay_compute_neighbors(data_points, ve)
10 changes: 10 additions & 0 deletions test/test_unit.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,16 @@ using Smesh
@test build_delaunay_triangulation(data_points) == [3 1; 1 3; 2 4]
end

@testset verbose=true showtiming=true "delaunay_compute_neighbors" begin
data_points = collect([0.0 0.0
1.0 0.0
1.0 1.0
0.0 1.0]')
vertices = Cint[3 1; 1 3; 2 4]

@test delaunay_compute_neighbors(data_points, vertices) == [0 0; 0 0; 2 1]
end

end # @testset "test_unit.jl"

end # module
Expand Down

0 comments on commit 7377f26

Please sign in to comment.