Skip to content

Commit 561962d

Browse files
authored
Merge pull request #63 from JuliaGeometry/sjk/fix62
[tests] remove dependency on hash ordering, closes #62
2 parents 7e1d4ea + 4cf7541 commit 561962d

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

test/verify_vertices.jl

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,9 @@ include("testdata.jl")
232232
cts = Contour.contours(x, y, z)
233233
@test length(cts.contours) == 10
234234
cts_ct = (8, 8, 8, 8, 126, 7, 5, 5, 5, 4)
235-
lines_ct = ([138, 220, 469, 138, 469, 208, 143, 143],
235+
236+
# Length need to be sorted as hashing might change see #62
237+
lines_ct = sort!.([[138, 220, 469, 138, 469, 208, 143, 143],
236238
[220, 475, 140, 210, 146, 475, 140, 146],
237239
[222, 481, 140, 214, 481, 145, 140, 145],
238240
[228, 485, 214, 142, 485, 142, 146, 146],
@@ -241,10 +243,10 @@ lines_ct = ([138, 220, 469, 138, 469, 208, 143, 143],
241243
[29, 12, 29, 15, 12],
242244
[26, 10, 13, 26, 10],
243245
[11, 11, 23, 11, 21],
244-
[18, 19, 7, 7])
246+
[18, 19, 7, 7]])
245247
for i in eachindex(cts_ct)
246248
@test length(cts.contours[i].lines) == cts_ct[i]
247-
@test all(lines_ct[i] .== [length(c.vertices) for c in cts.contours[i].lines])
249+
@test all(lines_ct[i] .== sort!([length(c.vertices) for c in cts.contours[i].lines]))
248250
end
249251

250252

0 commit comments

Comments
 (0)