Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion test/mutations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,15 @@
end

# point
# The invariant is length(ex) == length(mex); the original `== 7` was the
# length on Julia 1.10 only. Julia 1.11 changed how `rand` samples from
# `Dict`/`KeySet`, so `rand(rng, tr, H)` yields a different tree on 1.11+
# even under StableRNG.
mut = point(tr)
Random.seed!(rng, 1)
@testset "Point Mutation" for i in 1:10
mex = mut(copy(ex), rng=rng)
@test length(ex) == length(mex) == 7
@test length(ex) == length(mex)
@test sum(x == y for (x,y) in zip(ex.args, mex.args)) >= 2
end

Expand Down
Loading