Skip to content

Commit

Permalink
disable test broken on 1.6
Browse files Browse the repository at this point in the history
  • Loading branch information
jkrumbiegel committed Jan 1, 2024
1 parent cd64de3 commit ad95659
Showing 1 changed file with 48 additions and 44 deletions.
92 changes: 48 additions & 44 deletions ReferenceTests/src/tests/examples2d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1171,50 +1171,54 @@ end
fig
end

@reference_test "Triplot of a constrained triangulation with holes and a custom bounding box" begin
curve_1 = [[
(0.0, 0.0), (4.0, 0.0), (8.0, 0.0), (12.0, 0.0), (12.0, 4.0),
(12.0, 8.0), (14.0, 10.0), (16.0, 12.0), (16.0, 16.0),
(14.0, 18.0), (12.0, 20.0), (12.0, 24.0), (12.0, 28.0),
(8.0, 28.0), (4.0, 28.0), (0.0, 28.0), (-2.0, 26.0), (0.0, 22.0),
(0.0, 18.0), (0.0, 10.0), (0.0, 8.0), (0.0, 4.0), (-4.0, 4.0),
(-4.0, 0.0), (0.0, 0.0),
]]
curve_2 = [[
(4.0, 26.0), (8.0, 26.0), (10.0, 26.0), (10.0, 24.0),
(10.0, 22.0), (10.0, 20.0), (8.0, 20.0), (6.0, 20.0),
(4.0, 20.0), (4.0, 22.0), (4.0, 24.0), (4.0, 26.0)
]]
curve_3 = [[(4.0, 16.0), (12.0, 16.0), (12.0, 14.0), (4.0, 14.0), (4.0, 16.0)]]
curve_4 = [[(4.0, 8.0), (10.0, 8.0), (8.0, 6.0), (6.0, 6.0), (4.0, 8.0)]]
curves = [curve_1, curve_2, curve_3, curve_4]
points = [
(2.0, 26.0), (2.0, 24.0), (6.0, 24.0), (6.0, 22.0), (8.0, 24.0), (8.0, 22.0),
(2.0, 22.0), (0.0, 26.0), (10.0, 18.0), (8.0, 18.0), (4.0, 18.0), (2.0, 16.0),
(2.0, 12.0), (6.0, 12.0), (2.0, 8.0), (2.0, 4.0), (4.0, 2.0),
(-2.0, 2.0), (4.0, 6.0), (10.0, 2.0), (10.0, 6.0), (8.0, 10.0), (4.0, 10.0),
(10.0, 12.0), (12.0, 12.0), (14.0, 26.0), (16.0, 24.0), (18.0, 28.0),
(16.0, 20.0), (18.0, 12.0), (16.0, 8.0), (14.0, 4.0), (14.0, -2.0),
(6.0, -2.0), (2.0, -4.0), (-4.0, -2.0), (-2.0, 8.0), (-2.0, 16.0),
(-4.0, 22.0), (-4.0, 26.0), (-2.0, 28.0), (6.0, 15.0), (7.0, 15.0),
(8.0, 15.0), (9.0, 15.0), (10.0, 15.0), (6.2, 7.8),
(5.6, 7.8), (5.6, 7.6), (5.6, 7.4), (6.2, 7.4), (6.0, 7.6),
(7.0, 7.8), (7.0, 7.4)]
boundary_nodes, points = convert_boundary_points_to_indices(curves; existing_points=points)
tri = triangulate(points; boundary_nodes=boundary_nodes, rng = RNG.STABLE_RNG)
refine!(tri, max_area = 1e-3get_total_area(tri), rng = RNG.STABLE_RNG)
fig, ax, sc = triplot(tri,
show_points=true,
show_constrained_edges=true,
constrained_edge_linewidth=2,
strokewidth=0.2,
markersize=15,
point_color=:blue,
show_ghost_edges=true, # not as good because the outer boundary is not convex, but just testing
marker='x',
bounding_box = (-5,20,-5,35)) # also testing the conversion to Float64 for bbox here
fig
end
# TODO: as noted in https://github.com/MakieOrg/Makie.jl/pull/3520#issuecomment-1873382060
# this test has some issues with random number generation across Julia 1.6 and 1, for now
# it's disabled until someone has time to look into it

# @reference_test "Triplot of a constrained triangulation with holes and a custom bounding box" begin
# curve_1 = [[
# (0.0, 0.0), (4.0, 0.0), (8.0, 0.0), (12.0, 0.0), (12.0, 4.0),
# (12.0, 8.0), (14.0, 10.0), (16.0, 12.0), (16.0, 16.0),
# (14.0, 18.0), (12.0, 20.0), (12.0, 24.0), (12.0, 28.0),
# (8.0, 28.0), (4.0, 28.0), (0.0, 28.0), (-2.0, 26.0), (0.0, 22.0),
# (0.0, 18.0), (0.0, 10.0), (0.0, 8.0), (0.0, 4.0), (-4.0, 4.0),
# (-4.0, 0.0), (0.0, 0.0),
# ]]
# curve_2 = [[
# (4.0, 26.0), (8.0, 26.0), (10.0, 26.0), (10.0, 24.0),
# (10.0, 22.0), (10.0, 20.0), (8.0, 20.0), (6.0, 20.0),
# (4.0, 20.0), (4.0, 22.0), (4.0, 24.0), (4.0, 26.0)
# ]]
# curve_3 = [[(4.0, 16.0), (12.0, 16.0), (12.0, 14.0), (4.0, 14.0), (4.0, 16.0)]]
# curve_4 = [[(4.0, 8.0), (10.0, 8.0), (8.0, 6.0), (6.0, 6.0), (4.0, 8.0)]]
# curves = [curve_1, curve_2, curve_3, curve_4]
# points = [
# (2.0, 26.0), (2.0, 24.0), (6.0, 24.0), (6.0, 22.0), (8.0, 24.0), (8.0, 22.0),
# (2.0, 22.0), (0.0, 26.0), (10.0, 18.0), (8.0, 18.0), (4.0, 18.0), (2.0, 16.0),
# (2.0, 12.0), (6.0, 12.0), (2.0, 8.0), (2.0, 4.0), (4.0, 2.0),
# (-2.0, 2.0), (4.0, 6.0), (10.0, 2.0), (10.0, 6.0), (8.0, 10.0), (4.0, 10.0),
# (10.0, 12.0), (12.0, 12.0), (14.0, 26.0), (16.0, 24.0), (18.0, 28.0),
# (16.0, 20.0), (18.0, 12.0), (16.0, 8.0), (14.0, 4.0), (14.0, -2.0),
# (6.0, -2.0), (2.0, -4.0), (-4.0, -2.0), (-2.0, 8.0), (-2.0, 16.0),
# (-4.0, 22.0), (-4.0, 26.0), (-2.0, 28.0), (6.0, 15.0), (7.0, 15.0),
# (8.0, 15.0), (9.0, 15.0), (10.0, 15.0), (6.2, 7.8),
# (5.6, 7.8), (5.6, 7.6), (5.6, 7.4), (6.2, 7.4), (6.0, 7.6),
# (7.0, 7.8), (7.0, 7.4)]
# boundary_nodes, points = convert_boundary_points_to_indices(curves; existing_points=points)
# tri = triangulate(points; boundary_nodes=boundary_nodes, rng = RNG.STABLE_RNG)
# refine!(tri, max_area = 1e-3get_total_area(tri), rng = RNG.STABLE_RNG)
# fig, ax, sc = triplot(tri,
# show_points=true,
# show_constrained_edges=true,
# constrained_edge_linewidth=2,
# strokewidth=0.2,
# markersize=15,
# point_color=:blue,
# show_ghost_edges=true, # not as good because the outer boundary is not convex, but just testing
# marker='x',
# bounding_box = (-5,20,-5,35)) # also testing the conversion to Float64 for bbox here
# fig
# end

@reference_test "Triplot with nonlinear transformation" begin
f = Figure()
Expand Down

0 comments on commit ad95659

Please sign in to comment.